Pagini recente » Borderou de evaluare (job #37212) | Borderou de evaluare (job #18478) | Borderou de evaluare (job #78808) | Borderou de evaluare (job #202860) | Borderou de evaluare (job #2025250)
Borderou de evaluare (job #2025250)
Raport evaluator
Compilare:
user.cpp: In function ‘int main()’:
user.cpp:2:61: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int main(){freopen("sushi.in","r",stdin);freopen("sushi.out","w",stdout);int n,w,q,m=0,x;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&x);if(x>m){m=x;w=i;q=i;}else if(m==x&&q==(i-1))q=i;}printf("%d %d %d ",w,q,2*m);}
^
user.cpp:2:93: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int main(){freopen("sushi.in","r",stdin);freopen("sushi.out","w",stdout);int n,w,q,m=0,x;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&x);if(x>m){m=x;w=i;q=i;}else if(m==x&&q==(i-1))q=i;}printf("%d %d %d ",w,q,2*m);}
^
user.cpp:2:124: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int main(){freopen("sushi.in","r",stdin);freopen("sushi.out","w",stdout);int n,w,q,m=0,x;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&x);if(x>m){m=x;w=i;q=i;}else if(m==x&&q==(i-1))q=i;}printf("%d %d %d ",w,q,2*m);}
^
user.cpp:2:161: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
using namespace std;int main(){freopen("sushi.in","r",stdin);freopen("sushi.out","w",stdout);int n,w,q,m=0,x;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&x);if(x>m){m=x;w=i;q=i;}else if(m==x&&q==(i-1))q=i;}printf("%d %d %d ",w,q,2*m);}
^
user.cpp:2:195: warning: ‘q’ may be used uninitialized in this function [-Wmaybe-uninitialized]
using namespace std;int main(){freopen("sushi.in","r",stdin);freopen("sushi.out","w",stdout);int n,w,q,m=0,x;scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&x);if(x>m){m=x;w=i;q=i;}else if(m==x&&q==(i-1))q=i;}printf("%d %d %d ",w,q,2*m);}
^
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
Punctaj/grupa |
1 | 0ms | 260kb | OK | 10 | 10 |
2 | 0ms | 264kb | OK | 10 | 10 |
3 | 0ms | 264kb | OK | 10 | 10 |
4 | 0ms | 268kb | OK | 10 | 10 |
5 | 24ms | 268kb | OK | 10 | 30 |
6 | 252ms | 264kb | OK | 10 |
7 | 248ms | 264kb | OK | 10 |
8 | 240ms | 268kb | OK | 10 | 10 |
9 | 252ms | 264kb | OK | 10 | 10 |
10 | 240ms | 264kb | OK | 10 | 10 |
Punctaj total | 100 |