countsquares.cpp: In function 'int main()':
countsquares.cpp:8:14: error: conflicting declaration 'std::vector<int> v'
8 | vector<int> v(h), w(v);
| ^
countsquares.cpp:6:9: note: previous declaration as 'int v'
6 | int h, v; cin >> h >> v;
| ^
countsquares.cpp:9:13: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
9 | for(int& i:v) cin >> i;
| ^
| std::begin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from countsquares.cpp:1:
/usr/include/c++/9/valarray:1224:5: note: 'std::begin' declared here
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
countsquares.cpp:9:13: error: 'end' was not declared in this scope; did you mean 'std::end'?
9 | for(int& i:v) cin >> i;
| ^
| std::end
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from countsquares.cpp:1:
/usr/include/c++/9/valarray:1244:5: note: 'std::end' declared here
1244 | end(const valarray<_Tp>& __va)
| ^~~
countsquares.cpp:11:57: error: invalid types 'int[int]' for array subscript
11 | for(int i=0; i<h; ++i) for(int j=i+1; j<h; ++j) ++m[v[j]-v[i]];
| ^
countsquares.cpp:11:62: error: invalid types 'int[int]' for array subscript
11 | for(int i=0; i<h; ++i) for(int j=i+1; j<h; ++j) ++m[v[j]-v[i]];
| ^