I’ve saw a strange thing recently, my code C# code was approved and 100% successful.
I logged in and I was looking to improve my code golf projects and I saw that I was very far in the rankings. My score is suddenly 75%, my code failed on Optimal Angle.
Did validations changed? Thanks a lot for your help
I don’t get the point. The validators have changed but without correcting the previous flaw. It is still possible to hardcode the solution and it still lacks a direction …
This rewards once again the people who are ready to reverse the validators and takes us further away from the real interest of the problem, the code golf …
Actually, for this specific puzzle, setting up a good hardcoding solution is a way more interesting challenge than solving the real problem.
You could sure add a dozen of validators to make it check all 16 kind of angles and make it impossible to hardcode but if you do so, I predict a LOT of tied first place solutions.
Cause there is not much to golf in the initial problem so everyone will figure out the optimal solution fast enough.
Hello, it seems CodinGame does not support last C# version. In the last version it is possible to create a program without declaring a class containing a “Main” method. It is possible to just write code and the compiler will automatically generate a “Program” class containing a “Main” method executing the code you wrote. With this feature, everyone could decrease its code by about 30 characters.
I have found that cutting things that are necessary for proper programming helps. Start by cutting the includes if you keep using them. Try running the code and see if it “works” . Of course, doing it in a normal program could cause it to explode or something, but doing it here might work.
Thank you, but already done, except i can’t remove include iostream in c++ (in C i removed all includes).
I removed the using namespace, I optimized conditions in for loop, I named datas with only 1 letter, … i can’t see what i can do. But i’m very far from the others.
I don’t want the ultimate solution, but i want to understand what i can do to divide by 2 or 3 my code.
Now my code’s length is 169 in C++ (best : 67) and 173 in C (best : 47).
Is there something shorter than cin>>/cout<< or scanf/printf ? Is there something you can use without including iostream ?
What a mess in the leaderboard… I didn’t think there were so many hard coded solutions ! It was just all top leaderboard !
Too bad it wasn’t some newly added test cases and that they are already broken.
Now i’m curious to know 2 things :
What are the real score of top player
What will be the don’t panic leaderboard if tests change
You can get to 81 chars in Python if you want a fully deterministic script that would pass any set of validators, would actually check all directions etc.
(Note: I never really tried to improve my “clean” 81 chars solution so there might even be a few chars to shave.)
And if you want to get really lower, you must go dirty ^^