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

Автор rn201, история, 14 месяцев назад, По-английски

This is the problem . https://codeforces.me/contest/1867/problem/C In one solution i am deleting the #define which are not used and in the program and the program gets accepted . But in another the #define function are given but is of no use But it's Idleness limit exceeded on test 1. These are the two solution== Correct one= https://codeforces.me/contest/1867/submission/226153692 Wrong One= https://codeforces.me/contest/1867/submission/226154349

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

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

std::endl is equivalent to \n + std::flush. In interactive problems, you want to flush the output stream everytime you ask a query. Your template replaces std::endl with \n which is usually not an issue (and even increases speed) but is something to be weary of in interactive problems.

»
14 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

You can't do this in interactive problems:

#define endl "\n"