# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
733376 | 2023-04-30T15:24:56 Z | rainboy | 지능형 기차 2 (KOI11_train2) | C | 1 ms | 284 KB |
#include <stdio.h> #define N 10 int max(int a, int b) { return a > b ? a : b; } int main() { int i, a, b, c, c_; c = 0, c_ = 0; for (i = 0; i < N; i++) { scanf("%d%d", &a, &b); c_ = max(c_, c += b - a); } printf("%d\n", c_); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 284 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |