Pagini recente » Borderou de evaluare (job #19961) | Borderou de evaluare (job #2044814) | Borderou de evaluare (job #2378646) | Borderou de evaluare (job #656963) | Borderou de evaluare (job #2403821)
Borderou de evaluare (job #2403821)
Raport evaluator
Compilare:
main.cpp: In function 'int main()':
main.cpp:2:76: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
int mat[1005][1005],dp[100005];int main(){freopen("rosiimici.in","r",stdin);freopen("rosiimici.out","w",stdout);int n,m,q,x;scanf("%d %d %d",&n,&m,&q);for(int i=1;i<=n;++i){for(int j=1;j<=m;++j)scanf("%d",&mat[i][j]);std::sort(mat[i]+1,mat[i]+m+1);for(int j=1;j<=m;++j)dp[mat[i][j]]=std::max(dp[mat[i][j]],i*j);}for(int i=1;i<=n*m;++i)dp[i]=std::max(dp[i],dp[i-1]);while(q--){scanf("%d",&x);printf("%d\n",dp[x]);}return 0;}
^
main.cpp:2:112: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
int mat[1005][1005],dp[100005];int main(){freopen("rosiimici.in","r",stdin);freopen("rosiimici.out","w",stdout);int n,m,q,x;scanf("%d %d %d",&n,&m,&q);for(int i=1;i<=n;++i){for(int j=1;j<=m;++j)scanf("%d",&mat[i][j]);std::sort(mat[i]+1,mat[i]+m+1);for(int j=1;j<=m;++j)dp[mat[i][j]]=std::max(dp[mat[i][j]],i*j);}for(int i=1;i<=n*m;++i)dp[i]=std::max(dp[i],dp[i-1]);while(q--){scanf("%d",&x);printf("%d\n",dp[x]);}return 0;}
^
main.cpp:2:151: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int mat[1005][1005],dp[100005];int main(){freopen("rosiimici.in","r",stdin);freopen("rosiimici.out","w",stdout);int n,m,q,x;scanf("%d %d %d",&n,&m,&q);for(int i=1;i<=n;++i){for(int j=1;j<=m;++j)scanf("%d",&mat[i][j]);std::sort(mat[i]+1,mat[i]+m+1);for(int j=1;j<=m;++j)dp[mat[i][j]]=std::max(dp[mat[i][j]],i*j);}for(int i=1;i<=n*m;++i)dp[i]=std::max(dp[i],dp[i-1]);while(q--){scanf("%d",&x);printf("%d\n",dp[x]);}return 0;}
^
main.cpp:2:217: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int mat[1005][1005],dp[100005];int main(){freopen("rosiimici.in","r",stdin);freopen("rosiimici.out","w",stdout);int n,m,q,x;scanf("%d %d %d",&n,&m,&q);for(int i=1;i<=n;++i){for(int j=1;j<=m;++j)scanf("%d",&mat[i][j]);std::sort(mat[i]+1,mat[i]+m+1);for(int j=1;j<=m;++j)dp[mat[i][j]]=std::max(dp[mat[i][j]],i*j);}for(int i=1;i<=n*m;++i)dp[i]=std::max(dp[i],dp[i-1]);while(q--){scanf("%d",&x);printf("%d\n",dp[x]);}return 0;}
^
main.cpp:2:391: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int mat[1005][1005],dp[100005];int main(){freopen("rosiimici.in","r",stdin);freopen("rosiimici.out","w",stdout);int n,m,q,x;scanf("%d %d %d",&n,&m,&q);for(int i=1;i<=n;++i){for(int j=1;j<=m;++j)scanf("%d",&mat[i][j]);std::sort(mat[i]+1,mat[i]+m+1);for(int j=1;j<=m;++j)dp[mat[i][j]]=std::max(dp[mat[i][j]],i*j);}for(int i=1;i<=n*m;++i)dp[i]=std::max(dp[i],dp[i-1]);while(q--){scanf("%d",&x);printf("%d\n",dp[x]);}return 0;}
^
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 3ms | 262kb | Raspuns corect! | 4 |
2 | 2ms | 131kb | Raspuns corect! | 5 |
3 | 3ms | 262kb | Raspuns corect! | 5 |
4 | 2ms | 262kb | Raspuns corect! | 5 |
5 | 3ms | 262kb | Raspuns corect! | 6 |
6 | 3ms | 262kb | Raspuns corect! | 5 |
7 | 73ms | 4718kb | Raspuns corect! | 5 |
8 | 72ms | 4718kb | Raspuns corect! | 3 |
9 | 76ms | 4718kb | Raspuns corect! | 3 |
10 | 66ms | 4587kb | Raspuns corect! | 1 |
11 | 104ms | 4980kb | Raspuns corect! | 1 |
12 | 102ms | 4980kb | Raspuns corect! | 2 |
13 | 88ms | 4849kb | Raspuns corect! | 2 |
14 | 119ms | 5111kb | Raspuns corect! | 2 |
15 | 59ms | 4587kb | Raspuns corect! | 2 |
16 | 80ms | 4718kb | Raspuns corect! | 2 |
17 | 473ms | 5242kb | Raspuns corect! | 6 |
18 | 389ms | 5111kb | Raspuns corect! | 10 |
19 | 375ms | 5242kb | Raspuns corect! | 10 |
20 | 387ms | 5242kb | Raspuns corect! | 10 |
21 | 387ms | 5111kb | Raspuns corect! | 11 |
Punctaj total | 100 |