This commit is contained in:
Benjamin Qi 2020-06-18 20:11:19 -04:00
parent bb202d94a6
commit 5f16a8a8cd
3 changed files with 6 additions and 7 deletions

View file

@ -10,9 +10,9 @@ Demonstrates how to read input and print output for USACO.
## C++
In CodeForces and CSES, input and output are **standard**, meaning that using the library [\<iostream\>](http://www.cplusplus.com/reference/iostream/) suffices.
In CodeForces and CSES, input and output are **standard**, meaning that using the library [<iostream\>](http://www.cplusplus.com/reference/iostream/) suffices.
However, in USACO, input is read from a file called `problemname.in`, and printing output to a file called `problemname.out`. Note that you'll have to rename the `.in` and `.out` files. You will need the [\<cstdio\>](http://www.cplusplus.com/reference/cstdio/) or the [\<fstream\>](http://www.cplusplus.com/reference/fstream/) library. Essentially, replace every instance of the word *template* in the word below with the input/output file name, which should be given in the problem.
However, in USACO, input is read from a file called `problemname.in`, and printing output to a file called `problemname.out`. Note that you'll have to rename the `.in` and `.out` files. You will need the [<cstdio\>](http://www.cplusplus.com/reference/cstdio/) or the [<fstream\>](http://www.cplusplus.com/reference/fstream/) library. Essentially, replace every instance of the word *template* in the word below with the input/output file name, which should be given in the problem.
In order to test a program, create a file called `problemname.in`, and then run the program. The output will be printed to `problemname.out`.

View file

@ -195,8 +195,6 @@ Note that all occurrences of `$1` are replaced with `name`.
## Text Editors
- [Sublime Text 3](https://www.sublimetext.com/)
- a fast, lightweight text editor for Windows, Mac, and Linux
- [Editing Build Settings](https://stackoverflow.com/questions/23789410/how-to-edit-sublime-text-build-settings)
@ -205,8 +203,8 @@ Note that all occurrences of `$1` are replaced with `name`.
- [Symlink](https://www.sublimetext.com/docs/3/osx_command_line.html)
- Using `/usr/local/bin/subl` instead of `~/bin/subl` worked for me on OS X Mojave.
- [Atom](https://atom.io/)
- another text editor for Windows, Mac, and Linux, from the makers of Github
- another text editor for Windows, Mac, and Linux from the makers of Github
- [Vim](https://www.vim.org/)
- the classic text editor, usually preinstalled on Mac and Linux, and also available for Windows
- probably easiest way to print syntax-highlighted code on Mac, see [here](https://stackoverflow.com/questions/1656914/printing-code-with-syntax-highlighting)
- classic text editor, usually preinstalled on Mac and Linux, and also available for Windows
- probably easiest way to print syntax-highlighted code on Mac, see the response to [this](https://stackoverflow.com/questions/1656914/printing-code-with-syntax-highlighting) post
- Others?

View file

@ -21,6 +21,7 @@ Given a static array $A[1],A[2],\ldots,A[N]$, you want to answer queries in the
- Use for $O(1)$ LCA
- CPH 9.1
- [cp-algorithms RMQ](https://cp-algorithms.com/sequences/rmq.html)
- [$O(1)$ Query RMQ with $O(N)$ build](https://codeforces.com/blog/entry/78931)
### Divide & Conquer