Borderou de evaluare (job #624741)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Divprimi (clasa a 10-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 12 ian. 2022 10:02:40 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:1: error: expected initializer before 'int'
8 | int frecv[10];
| ^~~
main.cpp: In function 'int main()':
main.cpp:13:5: error: 'cin' was not declared in this scope
13 | cin>>n>>m;
| ^~~
main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <fstream>
+++ |+#include <iostream>
2 |
main.cpp:14:5: error: 'ciur' was not declared in this scope
14 | ciur[0] = ciur[1] = 1;
| ^~~~
main.cpp:22:7: error: 'frecv' was not declared in this scope
22 | frecv[ciur[i]]++;
| ^~~~~
main.cpp:23:21: error: 'maxi' was not declared in this scope
23 | if( ciur[i] > maxi )
| ^~~~
main.cpp:27:7: error: 'cout' was not declared in this scope
27 | cout<<1;
| ^~~~
main.cpp:27:7: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:29:7: error: 'pp' was not declared in this scope
29 | pp=0;
| ^~
main.cpp:30:22: error: 'maxi' was not declared in this scope
30 | for( i = 0; i <= maxi && pp == 0; i++ )
| ^~~~
main.cpp:31:11: error: 'frecv' was not declared in this scope
31 | if( frecv[i] <= m )
| ^~~~~
main.cpp:30:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
30 | for( i = 0; i <= maxi && pp == 0; i++ )
| ^~~
main.cpp:35:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
35 | for( i = 1; i <= n && m != 0; i++ )
| ^~~
main.cpp:38:7: error: 'cout' was not declared in this scope
38 | cout<<i-1;
| ^~~~
main.cpp:38:7: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?