Skip to content

Commit a6d8ad1

Browse files
committed
Shorten FastInput a tiny bit
1 parent 290e4d3 commit a6d8ad1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

content/various/FastInput.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ struct GC {
2323
}
2424
} gc;
2525
int readInt() {
26-
char c;
27-
while ((c = gc()) < 40);
28-
if (c == '-') return -readInt();
29-
int a = c - '0';
30-
while (isdigit(c = gc())) a = a * 10 + c -'0';
31-
return a;
26+
int a, c;
27+
while ((a = gc()) < 40);
28+
if (a == '-') return -readInt();
29+
while ((c = gc()) >= 48) a = a * 10 + c - 480;
30+
return a - 48;
3231
}

0 commit comments

Comments
 (0)