I have been working on this problem, I don’t get how to solve this
Please help me…haven’t worked on the problem much…
I have been working on this problem, I don’t get how to solve this
Please help me…haven’t worked on the problem much…
Please read the problem carefully and list everything you know about the problem. From there, maybe I can assist you better.
The best way would be to list the cases and use if/else to solve them.
On the USACO website, there is a C++ solution to that problem here
Hi! I actually trying it the if/else way…i will tell if it succeeds
You can solve it using math. Try using math to solve it. Not that hard.
thank you guys for your hints! I solved it
I used the math way with min and abs