Tiny's blog

By Tiny, history, 8 years ago, In English

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"?

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

»
8 years ago, # |
  Vote: I like it +12 Vote: I do not like it

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 years ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

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 years ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

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