Submission #4602

# Submission time Handle Problem Language Result Execution time Memory
4602 2013-11-10T02:50:12 Z Namnamseo 지능형 기차 2 (KOI11_train2) C++
Compilation error
0 ms 0 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;
}

Compilation message

train.cpp: In function 'int main(int, char**)':
train.cpp:19:18: error: 'printF' was not declared in this scope
train.cpp:15:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]