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

Автор Tiny, история, 8 лет назад, По-английски

As everyone knows, it's forbidden to submit code containing "%lld". Once I thought this is because "%lld" doesn't work in Codeforces' system. However, I happened to submit code using (#define LLD "%l" "ld") and use the macro LLD for printf, and it works all the time just like "%I64d", does anyone know the reason? Does it really always work with "%lld"?

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

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

A warning does indeed pop up when you try to submit with "%lld" for the first time. Just click "Don't show again", and you will be able to submit it without any problems.

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

Some old compilers do not recognize "%lld". In the past, using "%lld" on CodeForces would cause "Wrong Answer". But the compilers used by CF had been upgraded. And now (at least in the recent half year), I never encounter problems with "%lld".

  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    So the warning info should be upgraded too. It's confusing to new user :)