Pagini recente » Borderou de evaluare (job #1793420) | Borderou de evaluare (job #2188340) | Borderou de evaluare (job #488621) | Borderou de evaluare (job #3196101) | Borderou de evaluare (job #1699878)
Borderou de evaluare (job #1699878)
Raport evaluator
Compilare:
user.cpp: In function ‘int main()’:
user.cpp:3:157: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int N,M=0,r=0;struct p{int x,y;}v[16001];bool c(p a,p b){return a.x<b.x||(a.x==b.x&&a.y>b.y);}int main(){freopen("granita.in","r",stdin);freopen("granita.out","w",stdout);scanf("%d",&N);for(int i=1;i<=N;i++)scanf("%d%d",&v[i].x,&v[i].y);sort(v+1,v+N+1,c);M=v[1].y;for(int i=2;i<=N;i++){if(v[i].y<=M)r++;else M=v[i].y;}printf("%d",r);return 0;}
^
user.cpp:3:191: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int N,M=0,r=0;struct p{int x,y;}v[16001];bool c(p a,p b){return a.x<b.x||(a.x==b.x&&a.y>b.y);}int main(){freopen("granita.in","r",stdin);freopen("granita.out","w",stdout);scanf("%d",&N);for(int i=1;i<=N;i++)scanf("%d%d",&v[i].x,&v[i].y);sort(v+1,v+N+1,c);M=v[1].y;for(int i=2;i<=N;i++){if(v[i].y<=M)r++;else M=v[i].y;}printf("%d",r);return 0;}
^
user.cpp:3:206: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int N,M=0,r=0;struct p{int x,y;}v[16001];bool c(p a,p b){return a.x<b.x||(a.x==b.x&&a.y>b.y);}int main(){freopen("granita.in","r",stdin);freopen("granita.out","w",stdout);scanf("%d",&N);for(int i=1;i<=N;i++)scanf("%d%d",&v[i].x,&v[i].y);sort(v+1,v+N+1,c);M=v[1].y;for(int i=2;i<=N;i++){if(v[i].y<=M)r++;else M=v[i].y;}printf("%d",r);return 0;}
^
user.cpp:3:257: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int N,M=0,r=0;struct p{int x,y;}v[16001];bool c(p a,p b){return a.x<b.x||(a.x==b.x&&a.y>b.y);}int main(){freopen("granita.in","r",stdin);freopen("granita.out","w",stdout);scanf("%d",&N);for(int i=1;i<=N;i++)scanf("%d%d",&v[i].x,&v[i].y);sort(v+1,v+N+1,c);M=v[1].y;for(int i=2;i<=N;i++){if(v[i].y<=M)r++;else M=v[i].y;}printf("%d",r);return 0;}
^
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 256kb | OK | 10 |
2 | 0ms | 256kb | OK | 10 |
3 | 8ms | 340kb | OK | 10 |
4 | 12ms | 384kb | OK | 10 |
5 | 12ms | 384kb | OK | 10 |
6 | 8ms | 384kb | OK | 10 |
7 | 8ms | 376kb | OK | 10 |
8 | 8ms | 380kb | OK | 10 |
9 | 8ms | 380kb | OK | 10 |
10 | 16ms | 384kb | OK | 10 |
Punctaj total | 100 |