Pagini recente » Borderou de evaluare (job #1362708) | Borderou de evaluare (job #422609) | Borderou de evaluare (job #29368) | Borderou de evaluare (job #3165653) | Borderou de evaluare (job #2628707)
Borderou de evaluare (job #2628707)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
#import<fstream>
^~~~~~
main.cpp:2:63: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
std::ifstream f("sushi.in");std::ofstream g("sushi.out");main(){int n,i,x,m=0,a,b;f>>n;for(i=1;i<=n;i++){f>>x;if(x>m)m=x,a=b=i;else if(x==m&&i==b+1)b++;}g<<a<<" "<<b<<" "<<m+m;}
^
main.cpp: In function 'int main()':
main.cpp:2:168: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
std::ifstream f("sushi.in");std::ofstream g("sushi.out");main(){int n,i,x,m=0,a,b;f>>n;for(i=1;i<=n;i++){f>>x;if(x>m)m=x,a=b=i;else if(x==m&&i==b+1)b++;}g<<a<<" "<<b<<" "<<m+m;}
^~~
main.cpp:2:160: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
std::ifstream f("sushi.in");std::ofstream g("sushi.out");main(){int n,i,x,m=0,a,b;f>>n;for(i=1;i<=n;i++){f>>x;if(x>m)m=x,a=b=i;else if(x==m&&i==b+1)b++;}g<<a<<" "<<b<<" "<<m+m;}
^~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
Punctaj/grupa |
1 | 2ms | 131kb | OK | 10 | 10 |
2 | 2ms | 131kb | OK | 10 | 10 |
3 | 2ms | 131kb | OK | 10 | 10 |
4 | 4ms | 131kb | OK | 10 | 10 |
5 | 24ms | 131kb | OK | 10 | 30 |
6 | 192ms | 131kb | OK | 10 |
7 | 217ms | 262kb | OK | 10 |
8 | 202ms | 131kb | OK | 10 | 10 |
9 | 217ms | 131kb | OK | 10 | 10 |
10 | 205ms | 131kb | OK | 10 | 10 |
Punctaj total | 100 |