Undefined Behavior of C++

Revision en1, by ironsoul, 2017-02-18 18:57:08

See this submission -> Click.

As you see, I got a runtime error because of "assert" function that I added while debugging my code. My array S is an array of pairs where second value is an index from (1..m). I can not understrand why my code is getting a runtime error. "assert(s[i].second <= m)" should be fine but it leads to an error. Why?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ironsoul 2017-02-18 18:57:08 426 Initial revision (published)