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

Автор fofao_funk, 10 лет назад, По-английски

Hi all.

This week I solved two problems here on codeforces, both on C++. For my surprise, in those two problems, I received TLE as a verdict on really small testcases when using GNU C++11 as a language. The solutions for those tests were running pretty fast on my machine, so I decided to submit them with GNU C++14; surprisingly, those solutions were accepted, having really small execution time on the said tests.

Problem 1:

C++11, C++14

Problem 2:

C++11, C++14

What is the issue?

Appreciate the help!

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

»
10 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

You've used "%lld" in scanf,which is not supported by old version of mingw while using c++11 standard.So the mod you read might be an invaild number which caused TLE.But c++14 works with "%lld" well.

More information about c++14 Codeforces: С++14 is supported

There mentions works correctly to read-write long long both with %lld and %I64d