Skip to content

Commit dacb118

Browse files
committed
Initial commit
0 parents commit dacb118

File tree

13 files changed

+234
-0
lines changed

13 files changed

+234
-0
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/description.html

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/project-template.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 William Zhang
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## USACO Training and Test Solutions
2+
USACO Code (all written in Java)
3+
4+
## Solution Format
5+
- The code needs to have a comment on the above listing that includes
6+
your USACO ID (aerialc1), the language (JAVA), and the task that you
7+
were delegated to complete.
8+
- Use BufferedReader, PrinterWriter, and StringTokenizer
9+
- Make sure you use the correct inputs!
10+
- Below is a sample submission:
11+
12+
13+
/*
14+
ID: your_id_here
15+
LANG: JAVA
16+
TASK: Example
17+
*/
18+
import java.io.*;
19+
import java.util.*;
20+
21+
class Example {
22+
public static void main (String [] args) throws IOException {
23+
// Use BufferedReader rather than RandomAccessFile; it's much faster
24+
BufferedReader f = new BufferedReader(new FileReader("Example.in"));
25+
// input file name goes above
26+
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("Example.out")));
27+
// Use StringTokenizer vs. readLine/split -- lots faster
28+
StringTokenizer st = new StringTokenizer(f.readLine());
29+
// Get line, break into tokens
30+
int i1 = Integer.parseInt(st.nextToken()); // first integer
31+
int i2 = Integer.parseInt(st.nextToken()); // second integer
32+
out.println(i1+i2); // output result
33+
out.close(); // close the output file
34+
}
35+
}

USACO Training and Competition.iml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.example.myapplication;
2+
3+
public class Main {
4+
5+
public static void main(String[] args) {
6+
}
7+
}

0 commit comments

Comments
 (0)