Pagini recente » Borderou de evaluare (job #991380) | Borderou de evaluare (job #940815) | Borderou de evaluare (job #745268) | Borderou de evaluare (job #2344884) | Borderou de evaluare (job #2438622)
Borderou de evaluare (job #2438622)
Raport evaluator
Compilare:
main.cpp:2:88: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
std::ifstream f("elmaj.in");std::ofstream g("elmaj.out");int n,c,k,i,j,v[1005000];main(){f>>n;for(;i<n;i++)f>>v[i],(k&v[i]!=c)?k--:c=v[i],k++;k=0;for(;j<n;j++)if(v[j]==c)k++;(k<n/2+1)?(g<<-1):(g<<c<<" "<<k);}
^
main.cpp: In function 'int main()':
main.cpp:2:123: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
std::ifstream f("elmaj.in");std::ofstream g("elmaj.out");int n,c,k,i,j,v[1005000];main(){f>>n;for(;i<n;i++)f>>v[i],(k&v[i]!=c)?k--:c=v[i],k++;k=0;for(;j<n;j++)if(v[j]==c)k++;(k<n/2+1)?(g<<-1):(g<<c<<" "<<k);}
~~~~^~~
| Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
| 1 | 2ms | 131kb | Incorect | 0 |
| 2 | 2ms | 131kb | Incorect | 0 |
| 3 | 3ms | 131kb | Incorect | 0 |
| 4 | 5ms | 131kb | Incorect | 0 |
| 5 | 15ms | 393kb | Incorect | 0 |
| 6 | 27ms | 524kb | Incorect | 0 |
| 7 | 50ms | 917kb | Incorect | 0 |
| 8 | 116ms | 2097kb | Incorect | 0 |
| 9 | 227ms | 4194kb | OK | 10 |
| 10 | 214ms | 4194kb | Incorect | 0 |
| Punctaj total | 10 |