advitiyabrijesh's blog

By advitiyabrijesh, history, 7 years ago, In English

I was doing this brute force problem, when I submitted my Code in GNU C++14 it gives WA whereas same code gets AC in GNU C++ ?

  • Vote: I like it
  • -3
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it +1 Vote: I do not like it

You have no return statement at the end of prt function. The result may vary depending on how the compiler handles this. By the way, using both printf and cout may result in WA as well (the order will swap e.g.), but it's not the case here.