File tree Expand file tree Collapse file tree 2 files changed +3
-21
lines changed
src/main/java/com/lzw/solutions/uva/p138 Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change 119
119
<artifactId >exec-maven-plugin</artifactId >
120
120
<version >3.5.0</version >
121
121
<configuration >
122
- <executable >java </executable >
122
+ <executable >bash </executable >
123
123
<arguments >
124
- <argument >-cp</argument >
125
- <argument >${project.build.directory} /classes</argument >
126
- <argument >com.lzw.solutions.uva.${problem} .Main</argument >
127
- <argument >< </argument >
128
- <argument >src/main/resources/uva/${problem} /1.in</argument >
124
+ <argument >-c</argument >
125
+ <argument >java -cp ${project.build.directory} /classes com.lzw.solutions.uva.${problem} .Main < src/main/resources/uva/${problem} /1.in</argument >
129
126
</arguments >
130
127
</configuration >
131
128
</plugin >
Original file line number Diff line number Diff line change @@ -51,23 +51,8 @@ void close() throws IOException {
51
51
}
52
52
53
53
public static void main (String [] args ) throws Exception {
54
- FileInputStream inStream = null ;
55
- PrintStream outStream = null ;
56
- boolean isLocal = System .getProperty ("os.name" ).equals ("Mac OS X" );
57
- if (isLocal ) {
58
- inStream = new FileInputStream ("1.in" );
59
- // outStream = new PrintStream("1.out");
60
- System .setIn (inStream );
61
- // System.setOut(outStream);
62
- }
63
-
64
54
Main main = new Main ();
65
55
main .solve ();
66
56
main .close ();
67
-
68
- if (isLocal ) {
69
- inStream .close ();
70
- // outStream.close();
71
- }
72
57
}
73
58
}
You can’t perform that action at this time.
0 commit comments