Metaphysics? Strange thing in Mo's algorithm

Revision en1, by DaiDaiBear, 2018-03-06 08:46:59

There is a quite strange thing when I try to solve 940F - Machine Learning, which is I submit a dozens of solutions and all of them get Runtime Error on test 46. But finally I create a new array and do not use it anywhere except give it some value in the beginning, and the solution got Accepted.

Details can be found by the difference between 35980539 and 35980530. The name of the unused array is dk, and initialized in the 4th line in solve() function, and not anywhere else appears.

Does anyone know the reason why this happens? It really confused me and spend a lot of time on finding the error. Any comments will be helpful, thanks in advance!

Tags mos algorithm, metaphysics

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English DaiDaiBear 2018-03-06 08:46:59 732 Initial revision (published)