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

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

I have been seeing this used in people's codes and wondered what are the uses of this in Competitive Programming? I am genuinely curious.

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

it forces your code to throw an exception if you have an input error. so for example, if you were reading a number up to $$$10^{18}$$$ into an int, it would cause your code to get an RTE instead of WA. it helps to figure out what's wrong when you get a WA verdict vs. an RTE.

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

Can you share link to the submission?