Find_me_if_you_can__'s blog

By Find_me_if_you_can__, history, 6 weeks ago, In English

So I was solving 1370C - Number Game yesterday and I was able to figure out the conditions for this question after some paperwork but when I implemented my answer it kept on showing wrong answer when I was using GNU C++17 compiler and frustrated after 3 hours I finally gave up and checked the editorial and realized that what I was doing was in fact correct.

What's more while doing this question compiler on my laptop and another online IDE were giving right answers but the solution was wrong according to Codeforces. So after that I tried changing the compiler to GNU C++ 14 because the IDE and my laptop both were using that compiler and to my surprise my answer actually got accepted.

Now since I'm new to all this and I really don't know the differences between GNU C++14 and GNU C++17 so can someone help me and point out what's wrong in my answer because of which it won't work on GNU C++17. This is solution for the question 93378850 This got accepted with GNU C++14 but failed for GNU C++17 you can check that yourselves.

Any help will be appreciated!

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

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Find_me_if_you_can__ (previous revision, new revision, compare).

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

because of this

double temp1 = log(temp)/log(2);
int a = floor(temp1);

try to use logl or log2 or integers

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

downvoteforces

  • »
    »
    6 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah..Lol I don't get why people are downvoting...I tried to understand what was wrong for more than 2hours but I still didn't knew what was wrong so I asked.