Skip to content

Commit c5e365d

Browse files
committed
fix(p1433B): remove redundant decrement
refactor(lintcode): simplify package reference
1 parent 2400b5b commit c5e365d

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/main/java/com/lzw/solutions/codeforces/p1433B/Main.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ void solve() throws IOException {
5050
}
5151
}
5252
}
53-
t--;
5453
}
5554
}
5655

src/main/java/com/lzw/solutions/lintcode/p2496/Main.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ public class Main {
1010
private static int i = 0;
1111

1212
public static int increase(int number) throws Exception{
13-
com.lzw.solutions.lintcode.p2416.Main.i = ++number;
14-
return com.lzw.solutions.lintcode.p2416.Main.i;
13+
Main.i = ++number;
14+
return Main.i;
1515
}
1616

1717
public static int decrease(int number) throws Exception{
18-
com.lzw.solutions.lintcode.p2416.Main.i = --number;
19-
return com.lzw.solutions.lintcode.p2416.Main.i;
18+
Main.i = --number;
19+
return Main.i;
2020
}
2121

2222
public static void main(String[] args) {
@@ -93,11 +93,11 @@ public static void main(String[] args) {
9393
for (int i = 0; i < 4; i++) {
9494
threads[i].join();
9595
}
96-
if (com.lzw.solutions.lintcode.p2416.Main.i != instance.checkI()){
96+
if (Main.i != instance.checkI()){
9797
Exception exception = new Exception("Don't cheat!");
9898
throw exception;
9999
} else {
100-
printStream.write(String.valueOf(com.lzw.solutions.lintcode.p2416.Main.i).getBytes("Utf-8"));
100+
printStream.write(String.valueOf(Main.i).getBytes("Utf-8"));
101101
}
102102
printStream.close();
103103
} catch (Exception e) {

src/main/java/com/lzw/solutions/nowcoder/Main.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.lzw.solutions.nowcoder;
22

3-
import nowcoder.nc45.Test;
4-
53
import java.io.IOException;
64

75
public class Main {
@@ -10,7 +8,7 @@ public class Main {
108
}
119

1210
void solve() throws IOException {
13-
Test.run();
11+
1412
}
1513

1614
public static void main(String[] args) throws Exception {

0 commit comments

Comments
 (0)