Input and Output in Java

I have a few questions and I’m wondering if I’m using Java, which are the libraries or reference sources I’m allowed to use in contest, also in terms of reading and printing input/output, if I can use something prewritten like I ave seen on USACO Guide with Kattio or if I cannot. If not, what is the common solution, to use Scanner or BuffedReader when you’re new and memorize the Kattio code? I’m just not sure what exactly happens on test day after getting the problems, what we can use and what methods are used to prevent cheating.

1 Like

Probably you should stick to the official documentation (Overview (Java SE 11 & JDK 11 )). Though if you look up small code snippets about basic functionality elsewhere that’s also okay (see USACO).

You should not refer to Kattio during a contest because it is a “substantial” amount of prewritten code. If you want to use Kattio during a USACO contest you should memorize the necessary parts. Method 2 is the recommended way of doing I/O in a USACO contest; feel free to refer to it during a contest.

(As noted by the module, Kattio is just a slightly more convenient version of method 2.)

Idk, I assume most cases of cheating aren’t caught.