November 08, 2026, 08:37:32 pm

Author Topic: [Java](Partial Exam) type of Problem  (Read 147 times)

0 Members and 1 Guest are viewing this topic.

Offline 'PL'

[Java](Partial Exam) type of Problem
« on: October 24, 2015, 12:26:04 am »
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.



Here are all the sample inputs
« Last Edit: October 24, 2015, 12:31:09 am by 'PL' »

Offline Al Capon #

Re: [Java](Partial Exam) type of Problem
« Reply #1 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 .
To live one day as a lion , or 100 years as a sheep ?

Offline 'PL'

Re: [Java](Partial Exam) type of Problem
« Reply #2 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.
« Last Edit: November 12, 2015, 06:25:14 pm by 'PL' »