Submission #4602

#TimeUsernameProblemLanguageResultExecution timeMemory
4602Namnamseo지능형 기차 2 (KOI11_train2)C++98
Compilation error
0 ms0 KiB
#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 (stderr)

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]