Ambrosia Community

General Category => Support Section => Nerdy Corner => Topic started by: 'PL' on October 24, 2015, 12:26:04 am

Title: [Java](Partial Exam) type of Problem
Post by: 'PL' on October 24, 2015, 12:26:04 am
http://pastebin.com/H3w312em (http://pastebin.com/H3w312em)

If you can minimize the 3 for cycles to 1 with preset functions(methods), I'll pay in csgo skins or paypal money.

I solved this with the code(in the link) that passes 100% with all 10 samples, if you make the algorithm better, please help.

(http://puu.sh/kVd9U.png)

Here are all the sample inputs
Title: Re: [Java](Partial Exam) type of Problem
Post by: Al Capon # on November 12, 2015, 04:05:11 pm
If you could share any kind of website sharing this kind of exercises related to Electronics and Electrical engineering ; It would really help . Also C ( not C++) , Matlab , LabView exercises .


Thanks in advance .
Title: Re: [Java](Partial Exam) type of Problem
Post by: 'PL' on November 12, 2015, 06:20:22 pm
This website/Online IDE is only permitted to students from my university (this is used for evaluation of on exams and laboratory work)

Anyway the problem I sent to reverse engineers didn't manage to minimize the problem, so the code in the pastebin is the only optimal solution with a greedy algorithm.