Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

Блог пользователя nubb

Автор nubb, история, 39 часов назад, По-английски

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?

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

»
38 часов назад, # |
Rev. 2   Проголосовать: нравится -38 Проголосовать: не нравится

u'r so dumb

»
38 часов назад, # |
  Проголосовать: нравится -35 Проголосовать: не нравится

u'r so dumb

»
38 часов назад, # |
Rev. 2   Проголосовать: нравится -29 Проголосовать: не нравится

probably because of cbrt implemented in c++17.

»
38 часов назад, # |
  Проголосовать: нравится -33 Проголосовать: не нравится

ur so dumbbbbbbbbbbb

»
38 часов назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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

»
38 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 :)

»
36 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
32 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
32 часа назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

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