Borderou de evaluare (job #837360)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Balon (clasa a 6-a) | Compilator | cpp |
| Rundă | lasm_16_10_2025_clasa11 | Status | evaluat |
| Dată | 16 oct. 2025 15:59:25 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:20:10: error: invalid types 'int[int]' for array subscript
20 | d[x][y] += 1;
| ^
main.cpp:21:23: error: invalid types 'int[int]' for array subscript
21 | if(x+d <= n) d[x+d][y] -= 1;
| ^
main.cpp:22:23: error: invalid types 'int[int]' for array subscript
22 | if(y+d <= m) d[x][y+d] -= 1;
| ^
main.cpp:23:35: error: invalid types 'int[int]' for array subscript
23 | if(x+d <= n && y+d <= m) d[x+d][y+d] += 1;
| ^
main.cpp:31:15: error: conflicting declaration 'long long int b'
31 | long long b = 0;
| ^
main.cpp:10:25: note: previous declaration as 'std::vector<std::vector<int> > b'
10 | vector<vector<int>> b(n+2, vector<int>(m+2));
| ^
main.cpp:41:19: error: no match for 'operator+=' (operand types are 'std::vector<std::vector<int> >' and 'int')
41 | b += (fin - 1) / k;
| ~~^~~~~~~~~~~~~~~~
main.cpp:54:21: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::vector<int> >')
54 | if(C == 2) cout << b;
| ~~~~ ^~ ~
| | |
| | std::vector<std::vector<int> >
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/istream:41,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/sstream:40,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/complex:45,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ccomplex:39,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/x86_64-pc-linux-gnu/bits/stdc++.h:127,
from main.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ostream:116:36: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ostream:125:32: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ostream:135:30: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::ios_base& (*)(std::ios_base&)'