When I participated in the AtCoder Beginner Contest, which is held regularly, I stumbled in a place other than pure lack of ability and did a lot of waste, so to deepen my next learning Make a note of what you can do.
Participated in "ABC 170" https://atcoder.jp/contests/abc170
Yes.
A problem, I was writing code to get input from sys.args
. Naturally it is moss, but I melted it for 20 minutes with the power of my belief. It was the most meaningless time.
Input value is captured by ʻinput`.
#mistake
import sys
args = sys.argv
# do something ...
#Correct answer.The following is when the input is two integer values
x, y = [ int(i) for i input().split() ]
# do something ...
It's a bit of a hurdle to generate all the cases that can consider all the conditions nicely (probably not clogged if you can consider it), so I'll write at least the code for generating test data that can be run locally. I will.
Fortunately, the input value conditions are explicit, so you'll be able to write a little code to generate the test data right away. I think that if you pass it to the answer code over the pipe, the verification will be a little better.
If you let strerr spit out the generated data on the test case generation side, it will not interfere with the input of the answer code while checking the input value, so for the time being, I will try this when the WA gets stuck next time.
During the contest, the details of the cause of the test failure will not be given, so if there is a problem that ended by trial and error as WA, I will look back on it.
When I'm addicted, I don't really know what's wrong, so I'm worried if I don't check properly whether it's due to a lack of consideration related to logic or algorithms such as boundary conditions, or simply due to my own careless mistake. I can not sleep.
Test cases of past questions are posted in the "Convenient Links" below. It is possible to drop data from there and verify the case that was actually WA.
https://atcoder.jp/posts/261
AtCoder's Testcases This is a test case of AtCoder's past questions. It can be used for review etc. It does not support very old contests.
By observing each test case, you can see the way of thinking such as boundary conditions, which may be useful for the development work of test cases of actual projects.
I would also like to confirm the answers and official commentary of other participants. I would like to follow up on the problems that I struggled with because I could not see the solution.
At this point, we don't plan to give priority enough to commit to Procon.
However, I will continue to participate in ABC. I will look back only on the care of the problem that ended in the middle of the answer and will come next time. If you repeat it, the day will come when you can do this retrospective work with a tough problem in the second half. maybe.
Recommended Posts