hosseinmp's blog

By hosseinmp, history, 7 years ago, In English

Hi I solved the question but get time limit many times.

so I saw my friends code and it was the same some so I copied his code to test and I saw the I get time limit again

here is his submit

his code that I submit

Can anyone help me?

I change that *** compiler and it get accepted

here

Why gnu g++ and gnu g++11 does nit work and gnu g++14 works.

I think codeforces should change time limit for these compilers

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

»
7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

use three Magical lines
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);

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

Change the compiler from GNU C++ to GNU C++ 14 I did it and it worked Here

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    cin works faster in C++14 than in other compilers.