This problem will always remind me how important it is to read the problem carefully. Very carefully. Most of the mistakes that I did could have been avoided, had I read the problem statement with patience.
Mistakes I did :
One mistake that I was going to do, was I didn't yet got what to do if user submits wrong answer after a correct submission. Guess what?! It was clearly mentioned what's needed to be done in the question itself. My first mistake saved me from this one.
I also learned a few new C++ features, namely, stable_sort, peek, get. I am yet to understand how to use stable_sort properly.
[5:57 PM] And yeah, I made another mistake just now. Foolish me!! Once again I have to say that I didn't read the problem properly because I missed the case that there is no penalty for unsolved problems. Damn it, it look a long time to correct this mistake.
I also got to know of stringstream, although I haven't used it yet.
Here is my solution for the same : https://github.com/ashwani-pandey/UVAoj-solutions/blob/master/10258.cpp
Mistakes I did :
- I didn't read what was required in the output correctly. They asked for all those who have made a submission, I rather gave the output only for those contestants who made a correct submission.
- I didn't take care of the test case where the user will submit the correct output for the same problem more than once. I thought of it while starting to program, but then ignored it. Big mistake, indeed !
One mistake that I was going to do, was I didn't yet got what to do if user submits wrong answer after a correct submission. Guess what?! It was clearly mentioned what's needed to be done in the question itself. My first mistake saved me from this one.
I also learned a few new C++ features, namely, stable_sort, peek, get. I am yet to understand how to use stable_sort properly.
[5:57 PM] And yeah, I made another mistake just now. Foolish me!! Once again I have to say that I didn't read the problem properly because I missed the case that there is no penalty for unsolved problems. Damn it, it look a long time to correct this mistake.
I also got to know of stringstream, although I haven't used it yet.
Here is my solution for the same : https://github.com/ashwani-pandey/UVAoj-solutions/blob/master/10258.cpp
No comments:
Post a Comment