sortbooks.cpp:1:39: error: stray '#' in program
solve(i+1+N-1,par[i]-1+N-1,1,N,2*N-1);#include <bits/stdc++.h>
^
sortbooks.cpp:1:6: error: expected constructor, destructor, or type conversion before '(' token
solve(i+1+N-1,par[i]-1+N-1,1,N,2*N-1);#include <bits/stdc++.h>
^
sortbooks.cpp:1:40: error: 'include' does not name a type; did you mean '__has_include'?
solve(i+1+N-1,par[i]-1+N-1,1,N,2*N-1);#include <bits/stdc++.h>
^~~~~~~
__has_include
sortbooks.cpp:5:1: error: 'pair' does not name a type
pair <int,int> p[1000001][20];
^~~~
sortbooks.cpp:6:1: error: 'vector' does not name a type
vector <int> v[1000001];
^~~~~~
sortbooks.cpp: In function 'void dfs(int)':
sortbooks.cpp:10:13: error: 'p' was not declared in this scope
if (p[p[u][i-1].first][i-1].first)
^
sortbooks.cpp:11:52: error: 'max' was not declared in this scope
p[u][i]={p[p[u][i-1].first][i-1].first,max(p[u][i-1].second,p[p[u][i-1].first][i-1].second)};
^~~
sortbooks.cpp:11:52: note: suggested alternative: 'mas'
p[u][i]={p[p[u][i-1].first][i-1].first,max(p[u][i-1].second,p[p[u][i-1].first][i-1].second)};
^~~
mas
sortbooks.cpp:12:17: error: 'v' was not declared in this scope
for (i=0;i<(v[u].size());i++)
^
sortbooks.cpp: In function 'int solve(int, int, int, int, int)':
sortbooks.cpp:20:12: error: 'max' was not declared in this scope
return max(solve(x,y,2*p,l,(l+r)/2),solve(x,y,2*p+1,(l+r)/2+1,r));
^~~
sortbooks.cpp:20:12: note: suggested alternative: 'mas'
return max(solve(x,y,2*p,l,(l+r)/2),solve(x,y,2*p+1,(l+r)/2+1,r));
^~~
mas
sortbooks.cpp: In function 'void build_tree(int)':
sortbooks.cpp:30:13: error: 'max' was not declared in this scope
tree[p]=max(tree[2*p],tree[2*p+1]);
^~~
sortbooks.cpp:30:13: note: suggested alternative: 'mas'
tree[p]=max(tree[2*p],tree[2*p+1]);
^~~
mas
sortbooks.cpp: In function 'int main()':
sortbooks.cpp:33:5: error: 'cin' was not declared in this scope
cin>>n>>m;
^~~
sortbooks.cpp:33:5: note: suggested alternative: 'main'
cin>>n>>m;
^~~
main
sortbooks.cpp:35:9: error: 'scanf' was not declared in this scope
scanf("%d",&(mas[i]));
^~~~~
sortbooks.cpp:41:9: error: 'p' was not declared in this scope
p[i][0].first=val[r];
^
sortbooks.cpp:44:9: error: 'v' was not declared in this scope
v[val[r]].push_back(i);
^
sortbooks.cpp:47:17: error: 'v' was not declared in this scope
for (i=0;i<(v[0].size());i++)
^
sortbooks.cpp:50:9: error: 'scanf' was not declared in this scope
scanf("%d %d %d",&l,&r,&j);
^~~~~
sortbooks.cpp:52:13: error: 'printf' was not declared in this scope
printf("1\n");
^~~~~~
sortbooks.cpp:52:13: note: suggested alternative: 'int'
printf("1\n");
^~~~~~
int
sortbooks.cpp:57:17: error: 'p' was not declared in this scope
if (p[l][i].first && p[l][i].first<=r) {
^
sortbooks.cpp:58:21: error: 'max' was not declared in this scope
ans=max(ans,p[l][i].second);
^~~
sortbooks.cpp:58:21: note: suggested alternative: 'mas'
ans=max(ans,p[l][i].second);
^~~
mas
sortbooks.cpp:62:17: error: 'max' was not declared in this scope
ans=max(ans,mas[l]+solve(l+1+N-1,r+N-1,1,N,2*N-1));
^~~
sortbooks.cpp:62:17: note: suggested alternative: 'mas'
ans=max(ans,mas[l]+solve(l+1+N-1,r+N-1,1,N,2*N-1));
^~~
mas
sortbooks.cpp:64:13: error: 'printf' was not declared in this scope
printf("0\n");
^~~~~~
sortbooks.cpp:64:13: note: suggested alternative: 'int'
printf("0\n");
^~~~~~
int
sortbooks.cpp:66:13: error: 'printf' was not declared in this scope
printf("1\n");
^~~~~~
sortbooks.cpp:66:13: note: suggested alternative: 'int'
printf("1\n");
^~~~~~
int