tournament.cpp:17:9: error: ‘pair’ does not name a type
typedef pair < int ,int > pii;
^
tournament.cpp:34:1: error: ‘vector’ does not name a type
vector< pii > s[N], f[N];
^
tournament.cpp:35:1: error: ‘pii’ does not name a type
pii ST3[N << 2];
^
tournament.cpp: In function ‘node init(int, int, int)’:
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:39:20: note: in expansion of macro ‘orta’
init(sol, bas, orta);
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:40:15: note: in expansion of macro ‘orta’
init(sag, orta+1, son);
^
tournament.cpp: At global scope:
tournament.cpp:46:1: error: ‘pii’ does not name a type
pii query(int k, int bas, int son, int x) {
^
tournament.cpp: In function ‘node update(int, int, int, int)’:
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:54:43: note: in expansion of macro ‘orta’
if(ST[sol].sum >= x) update(sol, bas, orta, x);
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:55:22: note: in expansion of macro ‘orta’
else update(sag, orta+1, son, x - ST[sol].sum);
^
tournament.cpp: At global scope:
tournament.cpp:60:43: error: ‘pii’ has not been declared
node make(int k, int bas, int son, int x, pii t) {
^
tournament.cpp: In function ‘node make(int, int, int, int, int)’:
tournament.cpp:13:12: error: request for member ‘first’ in ‘t’, which is of non-class type ‘int’
#define st first
^
tournament.cpp:62:35: note: in expansion of macro ‘st’
if(bas == son) { ST[k].xx = t.st; ST[k].yy = t.nd; ST[k].sum = 1; return ST[k]; }
^
tournament.cpp:12:12: error: request for member ‘second’ in ‘t’, which is of non-class type ‘int’
#define nd second
^
tournament.cpp:62:52: note: in expansion of macro ‘nd’
if(bas == son) { ST[k].xx = t.st; ST[k].yy = t.nd; ST[k].sum = 1; return ST[k]; }
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:63:41: note: in expansion of macro ‘orta’
if(ST[sol].sum >= x) make(sol, bas, orta, x, t);
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:64:20: note: in expansion of macro ‘orta’
else make(sag, orta+1, son, x - ST[k].sum, t);
^
tournament.cpp: In function ‘int init2(int, int, int)’:
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:71:35: note: in expansion of macro ‘orta’
return mx[k] = max(init2(sag, orta+1, son), init2(sol, bas, orta));
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:71:65: note: in expansion of macro ‘orta’
return mx[k] = max(init2(sag, orta+1, son), init2(sol, bas, orta));
^
tournament.cpp:71:70: error: ‘max’ was not declared in this scope
return mx[k] = max(init2(sag, orta+1, son), init2(sol, bas, orta));
^
tournament.cpp: In function ‘int query2(int, int, int, int, int)’:
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:77:33: note: in expansion of macro ‘orta’
return max(query2(sol, bas, orta, x, y), query2(sag, orta+1, son, x, y));
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:77:58: note: in expansion of macro ‘orta’
return max(query2(sol, bas, orta, x, y), query2(sag, orta+1, son, x, y));
^
tournament.cpp:77:76: error: ‘max’ was not declared in this scope
return max(query2(sol, bas, orta, x, y), query2(sag, orta+1, son, x, y));
^
tournament.cpp: At global scope:
tournament.cpp:80:1: error: ‘pii’ does not name a type
pii update3(int k, int bas, int son, int x, int t) {
^
tournament.cpp: In function ‘int take3(int, int, int)’:
tournament.cpp:89:27: error: ‘ST3’ was not declared in this scope
if(bas == son) return ST3[k].nd && ST3[k].st <= R;
^
tournament.cpp:90:8: error: ‘ST3’ was not declared in this scope
if(ST3[sol].st <= R) return take3(sag, orta+1, son) + ST3[sol].nd;
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:90:44: note: in expansion of macro ‘orta’
if(ST3[sol].st <= R) return take3(sag, orta+1, son) + ST3[sol].nd;
^
tournament.cpp:5:19: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
#define orta (bas + son >> 1)
^
tournament.cpp:91:23: note: in expansion of macro ‘orta’
return take3(sag, orta+1, son);
^
tournament.cpp: In function ‘int GetBestPosition(int, int, int, int*, int*, int*)’:
tournament.cpp:111:34: error: ‘query’ was not declared in this scope
xx = query(1, 1, n, x).st,
^
tournament.cpp:116:33: error: ‘yy’ was not declared in this scope
make(1, 1, n, y, mp(xx, yy));
^
tournament.cpp:116:35: error: ‘make_pair’ was not declared in this scope
make(1, 1, n, y, mp(xx, yy));
^
tournament.cpp:118:9: error: ‘s’ was not declared in this scope
s[xx].pb(mp(i, mx));
^
tournament.cpp:119:9: error: ‘f’ was not declared in this scope
f[yy-1].pb(mp(i, mx));
^
tournament.cpp:125:17: error: ‘it’ was not declared in this scope
foreach(it, s[i]) {
^
tournament.cpp:125:21: error: ‘s’ was not declared in this scope
foreach(it, s[i]) {
^
tournament.cpp:125:25: error: ‘foreach’ was not declared in this scope
foreach(it, s[i]) {
^
tournament.cpp:130:21: error: ‘f’ was not declared in this scope
foreach(it, f[i]) {
^
tournament.cpp: In function ‘node init(int, int, int)’:
tournament.cpp:44:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
tournament.cpp: In function ‘int init2(int, int, int)’:
tournament.cpp:72:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
tournament.cpp: In function ‘int query2(int, int, int, int, int)’:
tournament.cpp:78:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^