Skip to content

Commit e2dceba

Browse files
committed
TwoSAT: rangeCheck の修正
1 parent e7d9874 commit e2dceba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2SAT/TwoSAT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public boolean[] answer() {
5151
}
5252

5353
private void rangeCheck(int x) {
54-
if (0 < x || x >= n) {
54+
if (x < 0 || x >= n) {
5555
throw new IndexOutOfBoundsException(
5656
String.format("Index %d out of bounds for length %d", x, n)
5757
);

0 commit comments

Comments
 (0)