Runtime Error Bug in System Testing
Difference between en2 and en3, changed 209 character(s)
I'm sorry to complain, but I've just seen the results of system testing in [contest:1957] and my submission on problem C received a runtime error on test 33. ↵
I think the problem is related to the return statement in the `void solve()` function because after the contest I've tried submitting the same code but just removing the return and using `if else`.↵
I link here the two solutions :↵

- Runtime error of contest submission [submission:257632795]↵

- Post contest accepted [submission:257649765]↵

I don't really care that much about rating and I'm not here to ask for a re-judgment,  but I'm really curious about what could be causing this, so I don't make the same mistake in the future.↵

UPDATE:↵

I found the problem, int the first part i'm accessing dp[1] and dp[2] but dp[2] is out of bounds for n = 1.↵

It's still strange to me how adding return in the function got accepted. ↵

Sorry.↵


History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English TommasoUlian 2024-04-21 21:43:19 209
en2 English TommasoUlian 2024-04-21 21:16:20 12
en1 English TommasoUlian 2024-04-21 21:11:02 734 Initial revision (published)