answer.code:8:7: error: expected nested-name-specifier before ‘ll’
8 | using ll=long long;
| ^~
answer.code:9:7: error: expected nested-name-specifier before ‘PII’
9 | using PII=pair<int,int>;
| ^~~
answer.code:13:1: error: ‘ll’ does not name a type
13 | ll a[N],b[N];
| ^~
answer.code: In member function ‘bool cmp::operator()(const int&, const int&)’:
answer.code:17:13: error: ‘a’ was not declared in this scope
17 | if((a[x]<=b[x])!=(a[y]<=b[y])) return (a[x]>b[x]);
| ^
answer.code:17:19: error: ‘b’ was not declared in this scope
17 | if((a[x]<=b[x])!=(a[y]<=b[y])) return (a[x]>b[x]);
| ^
answer.code:18:12: error: ‘a’ was not declared in this scope
18 | if(a[x]<=b[x]) return a[x]>a[y];
| ^
answer.code:18:18: error: ‘b’ was not declared in this scope
18 | if(a[x]<=b[x]) return a[x]>a[y];
| ^
answer.code:19:16: error: ‘b’ was not declared in this scope
19 | return b[x]<b[y];
| ^
answer.code: In function ‘void dfs(int)’:
answer.code:24:14: error: ‘y’ does not name a type
24 | for(auto y:eg[x]) if(y!=fa[x]) fa[y]=x,dfs(y);
| ^
answer.code:24:51: error: expected ‘;’ before ‘}’ token
24 | for(auto y:eg[x]) if(y!=fa[x]) fa[y]=x,dfs(y);
| ^
| ;
25 | }
| ~
answer.code:25:1: error: expected primary-expression before ‘}’ token
25 | }
| ^
answer.code:24:51: error: expected ‘;’ before ‘}’ token
24 | for(auto y:eg[x]) if(y!=fa[x]) fa[y]=x,dfs(y);
| ^
| ;
25 | }
| ~
answer.code:25:1: error: expected primary-expression before ‘}’ token
25 | }
| ^
answer.code:24:51: error: expected ‘)’ before ‘}’ token
24 | for(auto y:eg[x]) if(y!=fa[x]) fa[y]=x,dfs(y);
| ~ ^
| )
25 | }
| ~
answer.code:25:1: error: expected primary-expression before ‘}’ token
25 | }
| ^
answer.code: In function ‘int main()’:
answer.code:32:42: error: ‘nullptr’ was not declared in this scope
32 | ios::sync_with_stdio(false), cin.tie(nullptr);
| ^~~~~~~
answer.code:36:32: error: ‘a’ was not declared in this scope
36 | for(int i=2;i<=n;i++) cin>>a[i]>>b[i];
| ^
answer.code:36:38: error: ‘b’ was not declared in this scope
36 | for(int i=2;i<=n;i++) cin>>a[i]>>b[i];
| ^
answer.code:41:5: error: ‘ll’ was not declared in this scope
41 | ll v1=0,v2=0;
| ^~
answer.code:47:15: error: expected ‘;’ before ‘w’
47 | ll w=-a[x]+b[x]-a[y]+b[y];
| ^~
| ;
answer.code:48:13: error: ‘a’ was not declared in this scope
48 | a[y]=max(a[y],a[x]-(-a[y]+b[y]));
| ^
answer.code:48:39: error: ‘b’ was not declared in this scope
48 | a[y]=max(a[y],a[x]-(-a[y]+b[y]));
| ^
answer.code:49:18: error: ‘w’ was not declared in this scope
49 | b[y]=w+a[y];
| ^
answer.code:53:13: error: ‘v2’ was not declared in this scope
53 | v2=max(v2,a[x]-v1);
| ^~
answer.code:53:23: error: ‘a’ was not declared in this scope
53 | v2=max(v2,a[x]-v1);
| ^
answer.code:53:28: error: ‘v1’ was not declared in this scope; did you mean ‘y1’?
53 | v2=max(v2,a[x]-v1);
| ^~
| y1
answer.code:54:24: error: ‘b’ was not declared in this scope
54 | v1=v1-a[x]+b[x];
| ^
answer.code:58:11: error: ‘v2’ was not declared in this scope
58 | cout<<v2<<endl;
| ^~
answer.code:30:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
30 | freopen("tree.in","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
answer.code:31:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
31 | freopen("tree.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~