Borderou de evaluare (job #647478)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Trio (clasa a 5-a) | Compilator | cpp-32 |
Rundă | simulare60 | Status | evaluat |
Dată | 16 apr. 2022 11:54:34 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:11: error: conflicting declaration 'int f [1005]'
9 | int n, c, f[1005];
| ^
main.cpp:5:10: note: previous declaration as 'std::ifstream f'
5 | ifstream f("trio.in");
| ^
main.cpp: In function 'int main()':
main.cpp:23:14: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
23 | f[a[i].c1*100+a[i].c2*10+a[i].c3]++;
| ^
main.cpp:24:14: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
24 | f[a[i].c3*100+a[i].c2*10+a[i].c1]++;
| ^
main.cpp:25:29: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
25 | maxi=max(maxi, f[a[i].c1*100+a[i].c2*10+a[i].c3]++);
| ^
main.cpp:36:14: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
36 | f[v[1]*100+v[2]*10+v[3]]++;
| ^
main.cpp:40:17: error: no match for 'operator[]' (operand types are 'std::ifstream' {aka 'std::basic_ifstream<char>'} and 'int')
40 | if(f[i]){
| ^