Pagini recente » Borderou de evaluare (job #3244344) | Borderou de evaluare (job #1103008) | Borderou de evaluare (job #1930294) | Borderou de evaluare (job #2430050) | Borderou de evaluare (job #2438626)
Borderou de evaluare (job #2438626)
Raport evaluator
Compilare:
main.cpp:2:86: 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[1<<20];main(){f>>n;for(;i<n;i++)f>>v[i],(!k^v[i]==c)?c=v[i],k++:k--;for(k=0;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:122: 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[1<<20];main(){f>>n;for(;i<n;i++)f>>v[i],(!k^v[i]==c)?c=v[i],k++:k--;for(k=0;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 | OK | 10 |
2 | 2ms | 131kb | Incorect | 0 |
3 | 2ms | 131kb | OK | 10 |
4 | 5ms | 131kb | OK | 10 |
5 | 15ms | 393kb | OK | 10 |
6 | 27ms | 524kb | OK | 10 |
7 | 52ms | 917kb | OK | 10 |
8 | 117ms | 2228kb | OK | 10 |
9 | 219ms | 4194kb | OK | 10 |
10 | 233ms | 4194kb | Incorect | 0 |
Punctaj total | 80 |