Borderou de evaluare (job #822058)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Elementul Majoritar (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 2 mai 2025 09:17:07 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:25:37: error: 'c' was not declared in this scope
25 | for(int i=0;i<n;a[i]=B(),!k?k=1,c=a[i]:c==a[i]?++k:--k,++i);
| ^
main.cpp:26:32: error: 'c' was not declared in this scope
26 | for(int i=0;i<n;j+=a[i++]==c);
| ^
main.cpp:27:24: error: 'c' was not declared in this scope
27 | return j>n/2?cout<<c<<' '<<j:cout<<-1,0;
| ^