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

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

Hi! I am practicing for USACO, and I have some questions. I have never done USACO before, but I am totally excited. What is the input/output for USACO? I am a python programmer, and I have tried doing a USACO problem from a past year, and there is issues with the inputs and outputs. Thanks!

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

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

Older USACO contests use file input/output instead of stdin and stdout.

fin = open("problemname.in", "r")
fout = open("problemname.out", "w")

The rest is similar to stdin and stdout, use fin.readline() and fout.write() iirc.

Edit: forgot to mention USACO contests after December 2020 should use standard input/output.