Can I use the default starting code that comes with every new project on

When I open a new java project on, the starting sample code comes with a fast I/O class. Am I allowed to keep code this in my program during a competition?

Also, the usaco guide mentions multiple times that the Scanner class is slow and there is a way to input nearly 10 times faster. Am I allowed to copy this code and paste it into my program? If not, why even put it in your guide?

Surely I’m not meant to memorize 80 lines of code to manually type into every new program I make if I want to score competitively.

1 Like

Looking into this. My impression was that you can refer to the I/O module during a contest, but not necessarily copy-paste from it. You’re right - the starting code at the USACO Guide IDE should be replaced with this if it’s not allowed to start with the Kattio class.

You’re always free to use this outside of a contest or in contests besides the USACO.

The Kattio class here is only 27 lines long. If you remove all of the code that isn’t actually used in this example it isn’t much longer to type than the method that precedes it.

1 Like

The response I got was that it’s probably not allowed during a USACO contest since it potentially be considered more than just basic Java functionality and it counts as a substantial amount of prewritten code. Though I’m not quite sure I buy this - any code in any language reference would be considered prewritten, and it’s not clear what substantial means. Will add a note to the module.

Regardless of whether or not it’s allowed during a contest, I don’t see a problem with continuing to encourage usage of Kattio throughout the guide as a means of standardizing how everyone uses BufferedReaders / PrintWriters.