제출 #77225

#제출 시각아이디문제언어결과실행 시간메모리
77225farukkastamonuda무제 (POI11_tem)C++14
8 / 100
334 ms33792 KiB
#include <bits/stdc++.h> #define li 1000005 #define inf 1000000007 using namespace std; int n,x[li],y[li],cev,ans; int main(){ scanf("%d",&n); if(n==1){ printf("1\n"); return 0; } for(int i=1;i<=n;i++){ scanf("%d %d",&x[i],&y[i]); } int konum=-inf; for(int i=1;i<=n;i++){ if(y[i]>=konum){ cev++; konum=max(konum,x[i]); ans=max(ans,cev); } else{ ans=max(ans,cev); konum=x[i]; cev=1; } } printf("%d\n",ans); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

tem.cpp: In function 'int main()':
tem.cpp:7:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
tem.cpp:13:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d",&x[i],&y[i]);
         ~~~~~^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...