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

Автор mcGyver, история, 3 года назад, По-английски

I was solving this 520B - Две кнопки problem. Here maximum input and output size is 10^4. In my code I took N = 10^6 and it was giving Runtime Errorin my local IDE but when I submitted the same code, it got accepted. My submission 116080580. I dont know whether it's a fault of my device or the compliler I am using. Can anyone help??

Полный текст и комментарии »

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

Автор mcGyver, история, 3 года назад, По-английски

I have recently start coding in sublime text 3.

I use freopen("input.txt", "r", stdin); and freopen("output.txt", "w", stdout); to get input from input.txt and print output in output.txt.

But whenever my code falls into a infinite loop it stops responding and the program crashes as the size of the output.txt file bocomes so large.

Is there any way to avoid this? I mean can I set a file size limit or something like that?

[p.s: I have heard about terminus but I cannot make it work in my windows 10 os, so I had to use file io method. If anyone using terminus on windows 10, I would be so grateful if you share how you did make that possible too.]

Полный текст и комментарии »

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