Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 0d2a4fe

Browse files
authored
Add files via upload
1 parent ad52e6f commit 0d2a4fe

File tree

4 files changed

+1094
-0
lines changed

4 files changed

+1094
-0
lines changed

Diff for: compilestandard.java

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import java.io.*;
2+
import java.security.MessageDigest;
3+
import java.security.*;
4+
public class compilestandard extends usacotools {
5+
public static String sha256(String input) throws NoSuchAlgorithmException {
6+
MessageDigest mDigest = MessageDigest.getInstance("SHA-256");
7+
byte[] result = mDigest.digest(input.getBytes());
8+
StringBuffer sb = new StringBuffer();
9+
for (int i = 0; i < result.length; i++) {
10+
sb.append(Integer.toString((result[i] & 0xff) + 0x100, 16).substring(1));
11+
}
12+
13+
return sb.toString();
14+
}
15+
public static void main(String[] args) throws IOException{
16+
// TODO Auto-generated method stub
17+
BufferedReader f;
18+
if(args.length==1) {
19+
if(args[0].equals("eclipse")) {
20+
f=mreader("src/usacotools.java");
21+
}else {
22+
f=mreader("usacotools.java");
23+
}
24+
25+
}else {
26+
f=mreader("usacotools.java");
27+
}
28+
29+
print("build");
30+
31+
String st;
32+
String full="";
33+
34+
while ((st = f.readLine()) != null) {
35+
full=full+st+"\n";
36+
}
37+
String text=full.replace("if(!(lock)) {return null;}", "");
38+
text=text.replace("public abstract class usacotools","public abstract class utools");
39+
print(text);
40+
PrintWriter pw=mwriter("utools.java");
41+
if(args[0].equals("eclipse")) {
42+
pw=mwriter("src/utools.java");
43+
}else {
44+
45+
}
46+
pw.println(text);
47+
pw.close();
48+
print("utools.java is the one you should copy into your code but usacotools is the one you should extend");
49+
try{
50+
print("utools.java SHA256: "+sha256(text));
51+
print("usacotools.java SHA256: "+sha256(full));
52+
}catch(Exception e) {
53+
e.printStackTrace();
54+
}
55+
56+
}
57+
}

Diff for: usaco.html

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<html>
2+
<head>
3+
<title>USACO raw templates</title>
4+
<link rel="stylesheet" href="https://javaarchive.github.io/Programwebpages/theme.css">
5+
<style>
6+
footer {
7+
display: block;
8+
}
9+
</style>
10+
</head>
11+
<body>
12+
<div class="content">
13+
<h1>Welcome random people</h1>
14+
<p>This is a site for USACO starter templates. This site has also been optimized to save bandwith on slow networks.</p>
15+
<h1><a id="download"> You'll need eclipse.</h1>
16+
<h2>Downloads</h2>
17+
<a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/oxygen/1a/eclipse-java-oxygen-1a-win32.zip"> Eclipse windows 32 bit</a>
18+
<code class="language-java">
19+
20+
21+
22+
/*
23+
TASK:
24+
ID:
25+
LANG:JAVA
26+
PROG:
27+
*/
28+
//MINIMAL CODE
29+
import java.io.*;
30+
import java.util.*;
31+
public class example {
32+
public static void main(String[] args) throws IOException {
33+
BufferedReader f=new BufferedReader(new FileReader("project.in"));
34+
PrintWriter pw=new PrintWriter(new BufferedWriter(new FileWriter("project.out")));
35+
pw.close();
36+
f.close();
37+
}
38+
39+
}
40+
</code>
41+
42+
43+
<h1>CHECK OUT usacotools.java</h1>
44+
</div>
45+
</body>
46+
<footer>
47+
<h1> By the person who got pass the high cards silver problem</h1>
48+
<p> Not to brag</p>
49+
</footer>
50+
</html>

0 commit comments

Comments
 (0)