답안 #4603

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4603 2013-11-10T02:50:31 Z Namnamseo 지능형 기차 2 (KOI11_train2) C++
0 / 16
0 ms 1088 KB
#include <stdio.h>
 
int max(int x,int y)
{
  return (x>y)?x:y;
}
 
int main(int a,char** b)
{
  int x=0;
  int p,q;
  int ans=-1;
  for(a=10;a>0;a--)
  {
    scanf("%d %d",&p,&q);
    x+=q; ans=max(ans,x);
    x-=p;
  }
  printf("%d",ans);
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1088 KB Output isn't correct
2 Incorrect 0 ms 1088 KB Output isn't correct
3 Incorrect 0 ms 1088 KB Output isn't correct
4 Incorrect 0 ms 1088 KB Output isn't correct
5 Incorrect 0 ms 1088 KB Output isn't correct
6 Incorrect 0 ms 1088 KB Output isn't correct
7 Incorrect 0 ms 1088 KB Output isn't correct
8 Incorrect 0 ms 1088 KB Output isn't correct
9 Incorrect 0 ms 1088 KB Output isn't correct
10 Incorrect 0 ms 1088 KB Output isn't correct