Please read the new rule regarding the restriction on the use of AI tools. ×

C33_L0's blog

By C33_L0, history, 4 years ago, In English

For some reason my code isn't working on CodeForces but outputs the correct answer on my machine; I attached the code.91654081

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

| Write comment?
»
4 years ago, # |
  Vote: I like it +15 Vote: I do not like it

Check this out.

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

    What difference will the left shift make than multiplying by 2 here?

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

You should rather google it before posting it on a thread that way you could get your problem solved faster and without increasing the number of "compiler difference" posts. It's because your local system and codeforces don't obey to the same rules. Your local machine might initialise a vector of size n with zeroes but codeforces might do the same with some garbage value. Same with the case of overflows and underflows.