seats.cpp:4:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<pair<int,int>> P;
^~~~~~
wctob
seats.cpp:5:1: error: 'pair' does not name a type; did you mean 'wait'?
pair<int,int> tree[2*SZ], lazy[2*SZ];
^~~~
wait
seats.cpp: In function 'void lazy_propagation(int, int, int)':
seats.cpp:10:2: error: 'tree' was not declared in this scope
tree[bit].first+=lazy[bit].first;
^~~~
seats.cpp:10:2: note: suggested alternative: 'free'
tree[bit].first+=lazy[bit].first;
^~~~
free
seats.cpp:10:19: error: 'lazy' was not declared in this scope
tree[bit].first+=lazy[bit].first;
^~~~
seats.cpp:10:19: note: suggested alternative: 'labs'
tree[bit].first+=lazy[bit].first;
^~~~
labs
seats.cpp: At global scope:
seats.cpp:21:22: error: 'pair' has not been declared
void add_tree(int n, pair<int,int> v, int bit=1, int s=0, int e=SZ-1)
^~~~
seats.cpp:21:26: error: expected ',' or '...' before '<' token
void add_tree(int n, pair<int,int> v, int bit=1, int s=0, int e=SZ-1)
^
seats.cpp: In function 'void add_tree(int, int)':
seats.cpp:23:9: error: 's' was not declared in this scope
int m=(s+e)>>1;
^
seats.cpp:23:11: error: 'e' was not declared in this scope
int m=(s+e)>>1;
^
seats.cpp:24:19: error: 'bit' was not declared in this scope
lazy_propagation(bit,s,e);
^~~
seats.cpp:27:3: error: 'tree' was not declared in this scope
tree[bit].first+=v.first;
^~~~
seats.cpp:27:3: note: suggested alternative: 'free'
tree[bit].first+=v.first;
^~~~
free
seats.cpp:27:20: error: 'v' was not declared in this scope
tree[bit].first+=v.first;
^
seats.cpp:30:4: error: 'lazy' was not declared in this scope
lazy[2*bit].first+=v.first;
^~~~
seats.cpp:30:4: note: suggested alternative: 'labs'
lazy[2*bit].first+=v.first;
^~~~
labs
seats.cpp:37:13: error: 'v' was not declared in this scope
add_tree(n,v,2*bit,s,m);
^
seats.cpp:39:2: error: 'tree' was not declared in this scope
tree[bit]=min(tree[2*bit],tree[2*bit+1]);
^~~~
seats.cpp:39:2: note: suggested alternative: 'free'
tree[bit]=min(tree[2*bit],tree[2*bit+1]);
^~~~
free
seats.cpp:39:12: error: 'min' was not declared in this scope
tree[bit]=min(tree[2*bit],tree[2*bit+1]);
^~~
seats.cpp:39:12: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from seats.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
seats.cpp: At global scope:
seats.cpp:53:1: error: 'pair' does not name a type; did you mean 'wait'?
pair<int,int> get_corner(int x, int y, int i)
^~~~
wait
seats.cpp:67:1: error: 'pair' does not name a type; did you mean 'wait'?
pair<int,int> get_diff(int i)
^~~~
wait
seats.cpp:90:39: error: 'vector' has not been declared
void give_initial_chart(int H, int W, vector<int> R, vector<int> C)
^~~~~~
seats.cpp:90:45: error: expected ',' or '...' before '<' token
void give_initial_chart(int H, int W, vector<int> R, vector<int> C)
^
seats.cpp: In function 'void give_initial_chart(int, int, int)':
seats.cpp:92:2: error: 'P' was not declared in this scope
P.resize(H*W);
^
seats.cpp:95:9: error: 'R' was not declared in this scope
P[i]={R[i],C[i]};
^
seats.cpp:95:14: error: 'C' was not declared in this scope
P[i]={R[i],C[i]};
^
seats.cpp:99:2: error: 'tree' was not declared in this scope
tree[SZ]=get_diff(0);
^~~~
seats.cpp:99:2: note: suggested alternative: 'free'
tree[SZ]=get_diff(0);
^~~~
free
seats.cpp:99:11: error: 'get_diff' was not declared in this scope
tree[SZ]=get_diff(0);
^~~~~~~~
seats.cpp:99:11: note: suggested alternative: 'getdate'
tree[SZ]=get_diff(0);
^~~~~~~~
getdate
seats.cpp:105:37: error: 'make_pair' was not declared in this scope
for(int i=H*W;i<SZ;i++) tree[SZ+i]=make_pair(0x1fffffff,0x1fffffff);
^~~~~~~~~
seats.cpp:105:37: note: suggested alternative:
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
from /usr/include/c++/7/bits/specfun.h:45,
from /usr/include/c++/7/cmath:1914,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from seats.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:519:5: note: 'std::make_pair'
make_pair(_T1&& __x, _T2&& __y)
^~~~~~~~~
seats.cpp:107:11: error: 'min' was not declared in this scope
tree[i]=min(tree[2*i],tree[2*i+1]);
^~~
seats.cpp:107:11: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from seats.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
seats.cpp:110:2: error: 'tout' was not declared in this scope
tout<<tree[1].first<<' '<<tree[1].second<<'\n';
^~~~
seats.cpp:110:2: note: suggested alternative: 'tcnt'
tout<<tree[1].first<<' '<<tree[1].second<<'\n';
^~~~
tcnt
seats.cpp: In function 'int swap_seat(int, int)':
seats.cpp:115:2: error: 'pair' was not declared in this scope
pair<int,int> temp;
^~~~
seats.cpp:115:2: note: suggested alternative:
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
from /usr/include/c++/7/bits/specfun.h:45,
from /usr/include/c++/7/cmath:1914,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from seats.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:198:12: note: 'std::pair'
struct pair
^~~~
seats.cpp:115:7: error: expected primary-expression before 'int'
pair<int,int> temp;
^~~
seats.cpp:116:9: error: 'P' was not declared in this scope
int x1=P[a].first, y1=P[a].second, x2=P[b].first, y2=P[b].second;
^
seats.cpp:117:2: error: 'temp' was not declared in this scope
temp=get_diff(a); temp.first*=-1; temp.second*=-1;
^~~~
seats.cpp:117:2: note: suggested alternative: 'time'
temp=get_diff(a); temp.first*=-1; temp.second*=-1;
^~~~
time
seats.cpp:117:7: error: 'get_diff' was not declared in this scope
temp=get_diff(a); temp.first*=-1; temp.second*=-1;
^~~~~~~~
seats.cpp:117:7: note: suggested alternative: 'getdate'
temp=get_diff(a); temp.first*=-1; temp.second*=-1;
^~~~~~~~
getdate
seats.cpp:122:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(valid_coord(x1+dx[k],y1+dy[k])) {
~~^~~~~~
seats.cpp:122:29: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
seats.cpp:43:6: note: initializing argument 2 of 'bool valid_coord(int, int)'
bool valid_coord(int x, int y)
^~~~~~~~~~~
seats.cpp:123:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
temp=get_diff(convert(x1+dx[k],y1+dy[k])); temp.first*=-1; temp.second*=-1;
~~^~~~~~
seats.cpp:123:37: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
seats.cpp:48:5: note: initializing argument 2 of 'int convert(int, int)'
int convert(int x, int y)
^~~~~~~
seats.cpp:124:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
add_tree(convert(x1+dx[k],y1+dy[k]),temp);
~~^~~~~~
seats.cpp:124:32: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
seats.cpp:48:5: note: initializing argument 2 of 'int convert(int, int)'
int convert(int x, int y)
^~~~~~~
seats.cpp:126:18: error: 'x2' was not declared in this scope
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
seats.cpp:126:18: note: suggested alternative: 'x1'
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
x1
seats.cpp:126:27: error: 'y2' was not declared in this scope
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
seats.cpp:126:27: note: suggested alternative: 'yn'
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
yn
seats.cpp:131:2: error: 'swap' was not declared in this scope
swap(P[a],P[b]);
^~~~
seats.cpp:131:2: note: suggested alternatives:
In file included from /usr/include/c++/7/complex:45:0,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from seats.cpp:1:
/usr/include/c++/7/sstream:796:5: note: 'std::__cxx11::swap'
swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
^~~~
In file included from /usr/include/c++/7/regex:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
from seats.cpp:1:
/usr/include/c++/7/bits/regex.h:1958:5: note: 'std::__cxx11::swap'
swap(match_results<_Bi_iter, _Alloc>& __lhs,
^~~~
In file included from /usr/include/c++/7/bits/stl_pair.h:59:0,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/bits/specfun.h:45,
from /usr/include/c++/7/cmath:1914,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from seats.cpp:1:
/usr/include/c++/7/bits/move.h:187:5: note: 'std::swap'
swap(_Tp& __a, _Tp& __b)
^~~~
/usr/include/c++/7/bits/move.h:187:5: note: 'std::swap'
In file included from /usr/include/c++/7/exception:142:0,
from /usr/include/c++/7/ios:39,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from seats.cpp:1:
/usr/include/c++/7/bits/exception_ptr.h:166:5: note: 'std::__exception_ptr::swap'
swap(exception_ptr& __lhs, exception_ptr& __rhs)
^~~~
seats.cpp:136:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(valid_coord(x1+dx[k],y1+dy[k])) {
~~^~~~~~
seats.cpp:136:29: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
seats.cpp:43:6: note: initializing argument 2 of 'bool valid_coord(int, int)'
bool valid_coord(int x, int y)
^~~~~~~~~~~
seats.cpp:137:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
add_tree(convert(x1+dx[k],y1+dy[k]),get_diff(convert(x1+dx[k],y1+dy[k])));
~~^~~~~~
seats.cpp:137:32: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
seats.cpp:48:5: note: initializing argument 2 of 'int convert(int, int)'
int convert(int x, int y)
^~~~~~~
seats.cpp:137:68: warning: pointer to a function used in arithmetic [-Wpointer-arith]
add_tree(convert(x1+dx[k],y1+dy[k]),get_diff(convert(x1+dx[k],y1+dy[k])));
~~^~~~~~
seats.cpp:137:68: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
seats.cpp:48:5: note: initializing argument 2 of 'int convert(int, int)'
int convert(int x, int y)
^~~~~~~
seats.cpp:139:18: error: 'x2' was not declared in this scope
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
seats.cpp:139:18: note: suggested alternative: 'x1'
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
x1
seats.cpp:139:27: error: 'y2' was not declared in this scope
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
seats.cpp:139:27: note: suggested alternative: 'yn'
if(valid_coord(x2+dx[k],y2+dy[k])) {
^~
yn
seats.cpp:143:9: error: 'tree' was not declared in this scope
return tree[1]==make_pair(4,0) ? tcnt[1]:0;
^~~~
seats.cpp:143:9: note: suggested alternative: 'free'
return tree[1]==make_pair(4,0) ? tcnt[1]:0;
^~~~
free
seats.cpp:143:18: error: 'make_pair' was not declared in this scope
return tree[1]==make_pair(4,0) ? tcnt[1]:0;
^~~~~~~~~
seats.cpp:143:18: note: suggested alternative:
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
from /usr/include/c++/7/bits/specfun.h:45,
from /usr/include/c++/7/cmath:1914,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from seats.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:519:5: note: 'std::make_pair'
make_pair(_T1&& __x, _T2&& __y)
^~~~~~~~~