Borderou de evaluare (job #795079)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | em1 (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 15 nov. 2024 20:30:49 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:15:5: error: redefinition of 'int n'
15 | int n,m,aparitii=0;
| ^
main.cpp:12:5: note: 'int n' previously declared here
12 | int n,m,k=0;
| ^
main.cpp:15:7: error: redefinition of 'int m'
15 | int n,m,aparitii=0;
| ^
main.cpp:12:7: note: 'int m' previously declared here
12 | int n,m,k=0;
| ^
main.cpp:16:8: error: redefinition of 'std::string S'
16 | string S;
| ^
main.cpp:13:8: note: 'std::string S' previously declared here
13 | string S;
| ^
main.cpp:17:16: error: redefinition of 'std::vector<std::__cxx11::basic_string<char> > A'
17 | vector<string> A;
| ^
main.cpp:14:16: note: 'std::vector<std::__cxx11::basic_string<char> > A' previously declared here
14 | vector<string> A;
| ^
main.cpp: In function 'int32_t main()':
main.cpp:25:19: error: 'in' was not declared in this scope; did you mean 'yn'?
25 | while(getline(in,linie))A.push_back(linie);
| ^~
| yn
main.cpp:42:5: error: 'out' was not declared in this scope
42 | out<<aparitii<<"\n";
| ^~~
main.cpp:60:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'} [-Wsign-compare]
60 | if(j>=0&&j<A[i].size())
| ~^~~~~~~~~~~~
main.cpp:22:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | freopen("em1.in", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
main.cpp:23:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | freopen("em1.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~