moss3s's blog

By moss3s, history, 6 years ago, In English

I'm new on codeforces, and rarely use c++. Maybe the question was already discussed, but i cannot find anything except this.

Today i first time used c++ on the contest. And got message kind of "your code was not submitted, do not use %lld".

  1. Why is it bad idea to use %lld in 2018? Maybe this message is rudiment, and it is good time to dismiss it forever?

  2. Is it normal to not accept compilable code 1 second before end of the contest? Of course, now i see checkbox "submit anyway", but spent last seconds on testing and had no time to resubmit =(

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

»
6 years ago, # |
  Vote: I like it +19 Vote: I do not like it

For cross-platform support you can use macros from cinttypes, they look like PRId64.

Or just live a healthy life with std::cin.

  • »
    »
    6 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Thnx. PRId64 is smth new for me =)

    std::cin.. std::cout in my case. As i know, in c++ you can format string only using boost::format (not during the contest), or printf/sprintf. If we had smth like string.format like in java/python/kotlin, std::cout would be enough.

    • »
      »
      »
      6 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Yeah, I guess you are right about it, no easy format string in std c++ are implemented.