Skip to content

Commit e2efbcb

Browse files
committed
refactor(uva): remove local judge setup code
1 parent 37845f5 commit e2efbcb

File tree

20 files changed

+5
-192
lines changed

20 files changed

+5
-192
lines changed

src/main/java/com/lzw/solutions/uva/p10198/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ void close() throws IOException {
7070
}
7171

7272
public static void main(String[] args) throws Exception {
73-
FileInputStream inStream = null;
74-
PrintStream outStream = null;
75-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
76-
if (isLocal) {
77-
inStream = new FileInputStream("1.in");
78-
outStream = new PrintStream("1.out");
79-
System.setIn(inStream);
80-
System.setOut(outStream);
81-
}
8273

8374
Main main = new Main();
8475
main.solve();

src/main/java/com/lzw/solutions/uva/p10242/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,6 @@ void close() throws IOException {
163163
}
164164

165165
public static void main(String[] args) throws Exception {
166-
FileInputStream inStream = null;
167-
PrintStream outStream = null;
168-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
169-
if (isLocal) {
170-
inStream = new FileInputStream("1.in");
171-
outStream = new PrintStream("1.out");
172-
System.setIn(inStream);
173-
System.setOut(outStream);
174-
}
175166

176167
Main main = new Main();
177168
main.solve();

src/main/java/com/lzw/solutions/uva/p10347/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ void close() throws IOException {
5656
}
5757

5858
public static void main(String[] args) throws Exception {
59-
FileInputStream inStream = null;
60-
PrintStream outStream = null;
61-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
62-
if (isLocal) {
63-
inStream = new FileInputStream("1.in");
64-
outStream = new PrintStream("1.out");
65-
System.setIn(inStream);
66-
System.setOut(outStream);
67-
}
6859

6960
Main main = new Main();
7061
main.solve();

src/main/java/com/lzw/solutions/uva/p10397/Main.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.lzw.solutions.uva.p10397;
22

3-
import java.io.FileInputStream;
43
import java.io.IOException;
5-
import java.io.PrintStream;
64
import java.io.PrintWriter;
75
import java.util.ArrayList;
86
import java.util.Collections;
@@ -155,15 +153,6 @@ void close() throws IOException {
155153
}
156154

157155
public static void main(String[] args) throws Exception {
158-
FileInputStream inStream = null;
159-
PrintStream outStream = null;
160-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
161-
if (isLocal) {
162-
inStream = new FileInputStream("1.in");
163-
outStream = new PrintStream("1.out");
164-
System.setIn(inStream);
165-
System.setOut(outStream);
166-
}
167156

168157
Main main = new Main();
169158
main.solve();

src/main/java/com/lzw/solutions/uva/p104/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,6 @@ void close() throws IOException {
9696
}
9797

9898
public static void main(String[] args) throws Exception {
99-
FileInputStream inStream = null;
100-
PrintStream outStream = null;
101-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
102-
if (isLocal) {
103-
inStream = new FileInputStream("1.in");
104-
outStream = new PrintStream("1.out");
105-
System.setIn(inStream);
106-
System.setOut(outStream);
107-
}
10899

109100
Main main = new Main();
110101
main.solve();

src/main/java/com/lzw/solutions/uva/p104/MainPlus.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,6 @@ void close() throws IOException {
124124
}
125125

126126
public static void main(String[] args) throws Exception {
127-
FileInputStream inStream = null;
128-
PrintStream outStream = null;
129-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
130-
if (isLocal) {
131-
inStream = new FileInputStream("1.in");
132-
outStream = new PrintStream("1.out");
133-
System.setIn(inStream);
134-
System.setOut(outStream);
135-
}
136127

137128
MainPlus main = new MainPlus();
138129
main.solve();

src/main/java/com/lzw/solutions/uva/p10656/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,6 @@ void close() throws IOException {
5555
}
5656

5757
public static void main(String[] args) throws Exception {
58-
FileInputStream inStream = null;
59-
PrintStream outStream = null;
60-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
61-
if (isLocal) {
62-
inStream = new FileInputStream("1.in");
63-
outStream = new PrintStream("1.out");
64-
System.setIn(inStream);
65-
System.setOut(outStream);
66-
}
6758

6859
Main main = new Main();
6960
main.solve();

src/main/java/com/lzw/solutions/uva/p10905/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ void close() throws IOException {
6464
}
6565

6666
public static void main(String[] args) throws Exception {
67-
FileInputStream inStream = null;
68-
PrintStream outStream = null;
69-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
70-
if (isLocal) {
71-
inStream = new FileInputStream("1.in");
72-
outStream = new PrintStream("1.out");
73-
System.setIn(inStream);
74-
System.setOut(outStream);
75-
}
7667

7768
Main main = new Main();
7869
main.solve();

src/main/java/com/lzw/solutions/uva/p11235/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,6 @@ void close() throws IOException {
185185
}
186186

187187
public static void main(String[] args) throws Exception {
188-
FileInputStream inStream = null;
189-
PrintStream outStream = null;
190-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
191-
if (isLocal) {
192-
inStream = new FileInputStream("1.in");
193-
outStream = new PrintStream("1.out");
194-
System.setIn(inStream);
195-
System.setOut(outStream);
196-
}
197188

198189
Main main = new Main();
199190
main.solve();

src/main/java/com/lzw/solutions/uva/p11362/Main.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,6 @@ void close() throws IOException {
101101
}
102102

103103
public static void main(String[] args) throws Exception {
104-
FileInputStream inStream = null;
105-
PrintStream outStream = null;
106-
boolean isLocal = System.getenv("LOCAL_JUDGE") != null;
107-
if (isLocal) {
108-
inStream = new FileInputStream("1.in");
109-
outStream = new PrintStream("1.out");
110-
System.setIn(inStream);
111-
System.setOut(outStream);
112-
}
113104

114105
Main main = new Main();
115106
main.solve();

0 commit comments

Comments
 (0)