#1462
Gasti
Problema | Gasti | Operații I/O |
gasti.in /gasti.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 16 MB
/
Stivă 4 MB
|
Id soluție | #35162756 | Utilizator | |
Fișier | gasti.cpp | Dimensiune | 1.20 KB |
Data încărcării | 28 Februarie 2022, 12:42 | Scor / rezultat | Eroare de compilare |
gasti.cpp:6:47: error: conflicting declaration 'int f [100001]' int n , m , x , y , v[100001] , cnt , f[100001] , maxi , maxi2 , fmaxi , fmaxi2; ^ gasti.cpp:3:10: error: 'f' has a previous declaration as 'std::ifstream f' ifstream f("gasti.in"); ^ gasti.cpp: In function 'int main()': gasti.cpp:29:10: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') f[v[i]]++; ^ gasti.cpp:31:13: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] > maxi) maxi = f[i]; ^ gasti.cpp:31:33: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] > maxi) maxi = f[i]; ^ gasti.cpp:33:13: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] == maxi) fmaxi++; ^ gasti.cpp:41:17: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] > maxi2 && f[i] != maxi) maxi2 = f[i]; ^ gasti.cpp:41:33: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] > maxi2 && f[i] != maxi) maxi2 = f[i]; ^ gasti.cpp:41:55: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] > maxi2 && f[i] != maxi) maxi2 = f[i]; ^ gasti.cpp:43:17: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] == maxi2 && f[i] != maxi) fmaxi2++; ^ gasti.cpp:43:34: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i] == maxi2 && f[i] != maxi) fmaxi2++; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Gasti face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.