tibialAcorn98's blog

By tibialAcorn98, history, 7 years ago, In English

In hello 2018 round I wrote my submission to problem-C Party Lemonade, it ran well on geeksforgeeks c++14 compiler giving correct ans for test case 4 but the same code with same input gave wrong ans on codeforces c++14 compiler. why is it so.. mysubmission url:-http://codeforces.net/submissions/tibialAcorn98 submission no -34026659

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

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

Read this for most common causes. Didn't look at your code but I would guess that you have problems with floating point numbers.

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

http://codeforces.net/contest/913/submission/34037319

resubmitted your code with long long vs long (which is 32 bit). Now it goes to test 7

it still got WA so you have other bugs, but hopefully this helps

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

    thank you farmersrice. but why did it gave correct ans for case 4 on other compilers.

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

      because on some compilers, long is 64 bit (but this is very rare), most other compilers, long is be 32 bit. long long is guaranteed 64 bit.