phvu1403's blog

By phvu1403, history, 2 years ago, In English

166868615

Im solving 73C - LionAge II and when i run my code on CodeBlock 20.03 with C++11 compiler i found some different between my result and Jury. I have no UB in build message and i dont know what is it, hope somebody can help me, thanks!

Have a good day !

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

The line cin>>c1>>c2>>c[c1-'a'][c2-'a']; seems to be the issue, I don't know how the order of c1, c2 being inputted and being used goes in the direction you want it to in the various c++ compilers (it seems to work in c++17 but not c++14).