Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

HW2, all test passed on my pc but 3 failed when I upload the file

SaverioPas (710 points)
1 4 6
in HW2 by (710 points)
recategorized by
I've just uploaded my solution to  the homework. When I tested it on my pc it gives 16/16 test passed but when uploaded only 13 out of 16 test are completed successfully.

Don't know what else to do.

https://imgur.com/a/SO015wp

Here are 2 screenshot of the problem.
460 views
closed

1 Answer

Best answer
GabrielAlexandru (7760 points)
2 4 29
by (7.8k points)
selected by
If you go to the correctness tab you should see why those 3 tests failed. With only the screenshots you gave us we can't do much.
SaverioPas (710 points)
1 4 6
by (710 points)
Uh, ty, I think I got the point. The test failed were the long ones and they were failed due to exceeding the 6s timer.

I'll leave the post here in case anyone will have my same problem
GabrielAlexandru (7760 points)
2 4 29
by (7.8k points)
I'm glad that you found the error! Hopefully you find a way to solve it too!
e
elisa_terzini (180 points)
0 0 1
by (180 points)
I had the same problem, thank you for sharing, I just resubmitted the program optimizing the code, but I'm not sure it'll be fast enough, any suggestions for the optimization?
GabrielAlexandru (7760 points)
2 4 29
by (7.8k points)
The optimisation really depends on your code, so I can't suggest you a lot of things, except maybe the most obvious one: reduce the amount of loops in your code (if you even have any).

I'm sorry I can't do more...
e
elisa_terzini (180 points)
0 0 1
by (180 points)
Thank you for the tip, at the end I just created some variables at the beginning of the program and used those to shorten the code:)