Borderou de evaluare (job #716401)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Pietricele (Clasa a 9-a) | Compilator | cpp-32 |
| Rundă | ONI 2023, Clasa a 9-a | Status | evaluat |
| Dată | 23 apr. 2023 16:46:50 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:4:1: error: 'ifstream' does not name a type
4 | ifstream fin("pietricele.in");
| ^~~~~~~~
main.cpp:5:1: error: 'ofstream' does not name a type
5 | ofstream fout("pietricele.out");
| ^~~~~~~~
main.cpp: In function 'bool check(long long int)':
main.cpp:33:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
33 | if(cnt >= k)
| ^~
main.cpp:35:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
35 | return false;
| ^~~~~~
main.cpp: In function 'int main()':
main.cpp:40:5: error: 'fin' was not declared in this scope; did you mean 'sin'?
40 | fin >> caz >> n >> k;
| ^~~
| sin
main.cpp:41:5: error: 'string' was not declared in this scope; did you mean 'std::string'?
41 | string s;
| ^~~~~~
| std::string
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/iosfwd:39,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ios:38,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/istream:38,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/sstream:38,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/complex:45,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/ccomplex:39,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/i686-pc-linux-gnu/bits/stdc++.h:54,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stringfwd.h:79:33: note: 'std::string' declared here
79 | typedef basic_string<char> string;
| ^~~~~~
main.cpp:42:16: error: 's' was not declared in this scope
42 | fin >> s;
| ^
main.cpp:49:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
49 | sort(v, v + n);
| ^~~~
| std::sort
In file included from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/algorithm:62,
from /usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/i686-pc-linux-gnu/bits/stdc++.h:65,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/11/include/g++-v11/bits/stl_algo.h:4863:5: note: 'std::sort' declared here
4863 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
| ^~~~
main.cpp:55:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
55 | for(int i = k - 1; i < n; i++)
| ^~~
main.cpp:57:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'