Problem brick
User om2024
Submission Time 2024-06-20 15:01:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int main()’:
brick.cpp:9:2: error: expected ‘,’ or ‘;’ before ‘for’
9 | for(int i = 0; i < n; i++) {
| ^~~
brick.cpp:9:17: error: ‘i’ was not declared in this scope
9 | for(int i = 0; i < n; i++) {
| ^
brick.cpp:16:15: error: no match for ‘operator-’ (operand types are ‘std::vector<int>’ and ‘int’)
16 | for(int j = v-1; j > 0; i--) {
| ~^~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from brick.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> con