Passingcars
for this one, I took 66 mins to solve the problem. Even if it would take a long time, I wanted to get correct codes. I repeated writing and deleting the codes. I tried first to use arraylist to store the indices of variables, but I did not think this question is that complicated. So I decided to use int variables only.
Test description
Test description
The codes and the score
Yeah. What the heck. When I knew I got the correct codes, I just directly submitted it without hesitation, which led to a disaster. I just forgot this line:
The function should return −1 if the number of pairs of passing cars exceeds 1,000,000,000.
So yeah. I just tried again see what I got(btw I don't still get why one of the answers returned -1794967296 for the previous codes. Any idea?):