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

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

I have 2 questions about the following 2 submission. The difference between these is only using asynchronous cin (I mean cin with cin.tie(0); ios::sync_with_stdio(false);) or using scanf.

TLE http://codeforces.net/contest/688/submission/18812536

Accepted http://codeforces.net/contest/688/submission/18812173

1) Why the TLE submission gives "participants answer" correctly, but TLE?

2) I thought the speed of an asynchronous cin input method is comparative to scanf. However, scanf was over 200 ms faster than asynchronous cin. the input size is only 1 million. Why these two have so different spending time?

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