nubb's blog

By nubb, history, 29 hours ago, In English

I was doing Problem 1033D and I was stuck. Later, one of my friends got Accepted first try. Seems like the only difference is that I was using C++17 and my friend was using C++20. Can someone explain why C++17 didn't work but C++20 did?

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

»
29 hours ago, # |
Rev. 2   Vote: I like it -38 Vote: I do not like it

u'r so dumb

»
29 hours ago, # |
  Vote: I like it -35 Vote: I do not like it

u'r so dumb

»
29 hours ago, # |
Rev. 2   Vote: I like it -29 Vote: I do not like it

probably because of cbrt implemented in c++17.

»
29 hours ago, # |
  Vote: I like it -33 Vote: I do not like it

ur so dumbbbbbbbbbbb

»
29 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

because skibidi is a sigma and you have a level 10 gyat

»
28 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

In some problems like 1137C - Museums Tour, C++17 can AC more easy but C++20 or 23 maybe a bit harder.

They're fun features :)

»
26 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Different compiler may feature different libraries, and therefore some of the functions you applied to your code file may not work at best status if run in old (or new) compilers.

»
23 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Maybe you used %lld (sorry I don't know exactly what it was spelled) instead of INT64MAX for the datatype? I'm not very sure myself, I'm saying this because that datatype requirement was shown for one of my problems in order to solve, but it can be worth a shot if you haven't quite examined your datatypes as thoroughly as you did the logic of your program?

Though, it would help to give the source programs of both your friend and you so we have more information to understand if it was the compiler.

»
22 hours ago, # |
  Vote: I like it +6 Vote: I do not like it

I replaced sqrt with sqrtl and cbrt with cbrtl in your code, and it AC'd: 310420549