# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20215 | 2016-04-12T23:41:54 Z | jjyoonki | 지능형 기차 2 (KOI11_train2) | C | 1 ms | 0 KB |
#include <stdio.h> int main(void) { int a, b, n; int s, smax; s = 0; smax = 0; for( n=0 ; n<10 ; n++ ){ scanf( "%d %d", &a, &b ); s += (b-a); if( smax<s ) smax = s; } printf( "%d\n", smax ); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 0 KB | Output is correct |
2 | Correct | 1 ms | 0 KB | Output is correct |
3 | Correct | 1 ms | 0 KB | Output is correct |
4 | Correct | 1 ms | 0 KB | Output is correct |
5 | Correct | 1 ms | 0 KB | Output is correct |
6 | Correct | 1 ms | 0 KB | Output is correct |
7 | Correct | 1 ms | 0 KB | Output is correct |
8 | Correct | 1 ms | 0 KB | Output is correct |
9 | Correct | 1 ms | 0 KB | Output is correct |
10 | Correct | 1 ms | 0 KB | Output is correct |