REtoAC2001's blog

By REtoAC2001, history, 3 years ago, In English

In yesterday's div-3 (Round #756) I got WA on test 2 in problem C when I submitted it in GNU C++ 14 and now the same code gives AC when I submitted it in GNU C++ 17 (64 bit). Can anyone explain why this is happening? Link to Submission: WA Code(C++ 14) : https://mirror.codeforces.com/contest/1611/submission/136859793. AC Code(C++ 17-64 bit) : https://mirror.codeforces.com/contest/1611/submission/136967042. Both the codes are exactly same .

  • Vote: I like it
  • +1
  • Vote: I do not like it

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

Remove these `#pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx,avx2,fma")`

lines. It'll be accepted in GNU C++ 14 too.