0_0_22241434_25617\Main.java:1: ´íÎó: ·Ç·¨×Ö·û: '#'
#include<vector>
^
0_0_22241434_25617\Main.java:1: ´íÎó: ÐèÒªclass, interface»òenum
#include<vector>
^
0_0_22241434_25617\Main.java:2: ´íÎó: ·Ç·¨×Ö·û: '#'
#include<cstdio>
^
0_0_22241434_25617\Main.java:3: ´íÎó: ·Ç·¨×Ö·û: '#'
#include<cstring>
^
0_0_22241434_25617\Main.java:4: ´íÎó: ·Ç·¨×Ö·û: '#'
#include<iostream>
^
0_0_22241434_25617\Main.java:5: ´íÎó: ·Ç·¨×Ö·û: '#'
#include<algorithm>
^
0_0_22241434_25617\Main.java:13: ´íÎó: ÐèÒªclass, interface»òenum
typedef long long ll;
^
0_0_22241434_25617\Main.java:14: ´íÎó: ·Ç·¨×Ö·û: '#'
#define x first
^
0_0_22241434_25617\Main.java:14: ´íÎó: ÐèÒªclass, interface»òenum
#define x first
^
0_0_22241434_25617\Main.java:15: ´íÎó: ·Ç·¨×Ö·û: '#'
#define y second
^
0_0_22241434_25617\Main.java:16: ´íÎó: ·Ç·¨×Ö·û: '#'
#define pb push_back
^
0_0_22241434_25617\Main.java:17: ´íÎó: ·Ç·¨×Ö·û: '#'
#define mp make_pair
^
0_0_22241434_25617\Main.java:18: ´íÎó: ·Ç·¨×Ö·û: '#'
#define all(a) (a).begin(),(a).end()
^
0_0_22241434_25617\Main.java:19: ´íÎó: ·Ç·¨×Ö·û: '#'
#define sz(a) ((int)(a).size())
^
0_0_22241434_25617\Main.java:20: ´íÎó: ·Ç·¨×Ö·û: '#'
#define vi vector<int>
^
0_0_22241434_25617\Main.java:21: ´íÎó: ·Ç·¨×Ö·û: '#'
#define pii pair<int,int>
^
0_0_22241434_25617\Main.java:22: ´íÎó: ·Ç·¨×Ö·û: '#'
#define per(i,a,b) for(int i=a;i>=int(b);i--)
^
0_0_22241434_25617\Main.java:22: ´íÎó: ÐèÒªclass, interface»òenum
#define per(i,a,b) for(int i=a;i>=int(b);i--)
^
0_0_22241434_25617\Main.java:22: ´íÎó: ÐèÒªclass, interface»òenum
#define per(i,a,b) for(int i=a;i>=int(b);i--)
^
0_0_22241434_25617\Main.java:23: ´íÎó: ·Ç·¨×Ö·û: '#'
#define rep(i,a,b) for(int i=a;i<=int(b);i++)
^
0_0_22241434_25617\Main.java:23: ´íÎó: ÐèÒªclass, interface»òenum
#define rep(i,a,b) for(int i=a;i<=int(b);i++)
^
0_0_22241434_25617\Main.java:23: ´íÎó: ÐèÒªclass, interface»òenum
#define rep(i,a,b) for(int i=a;i<=int(b);i++)
^
0_0_22241434_25617\Main.java:24: ´íÎó: ·Ç·¨×Ö·û: '#'
#define rix(i,x) for(int i=last[x];i;i=pre[i])
^
0_0_22241434_25617\Main.java:24: ´íÎó: ÐèÒªclass, interface»òenum
#define rix(i,x) for(int i=last[x];i;i=pre[i])
^
0_0_22241434_25617\Main.java:24: ´íÎó: ÐèÒªclass, interface»òenum
#define rix(i,x) for(int i=last[x];i;i=pre[i])
^
0_0_22241434_25617\Main.java:26: ´íÎó: ÐèÒªclass, interface»òenum
ll t=1;for(a%=M;b;b>>=1){
^
0_0_22241434_25617\Main.java:26: ´íÎó: ÐèÒªclass, interface»òenum
ll t=1;for(a%=M;b;b>>=1){
^
0_0_22241434_25617\Main.java:26: ´íÎó: ÐèÒªclass, interface»òenum
ll t=1;for(a%=M;b;b>>=1){
^
0_0_22241434_25617\Main.java:28: ´íÎó: ÐèÒªclass, interface»òenum
a=a*a%M;
^
0_0_22241434_25617\Main.java:29: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:31: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:34: ´íÎó: ÐèÒªclass, interface»òenum
static char buf[N];
^
0_0_22241434_25617\Main.java:35: ´íÎó: ÐèÒªclass, interface»òenum
static int n=0,p=0;
^
0_0_22241434_25617\Main.java:36: ´íÎó: ÐèÒªclass, interface»òenum
if(p==n)p=0,n=fread(buf,1,N,stdin);
^
0_0_22241434_25617\Main.java:37: ´íÎó: ÐèÒªclass, interface»òenum
if(p==n)exit(0);
^
0_0_22241434_25617\Main.java:38: ´íÎó: ÐèÒªclass, interface»òenum
return buf[p++];
^
0_0_22241434_25617\Main.java:39: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:41: ´íÎó: ÐèÒªclass, interface»òenum
int f=1,c=getc();x=0;
^
0_0_22241434_25617\Main.java:42: ´íÎó: ÐèÒªclass, interface»òenum
while(c<=32)c=getc();
^
0_0_22241434_25617\Main.java:43: ´íÎó: ÐèÒªclass, interface»òenum
if(c=='-')f=-1,c=getc();
^
0_0_22241434_25617\Main.java:44: ´íÎó: ÐèÒªclass, interface»òenum
for(;'0'<=c&&c<='9';c=getc())x=x*10+c-'0';
^
0_0_22241434_25617\Main.java:44: ´íÎó: ÐèÒªclass, interface»òenum
for(;'0'<=c&&c<='9';c=getc())x=x*10+c-'0';
^
0_0_22241434_25617\Main.java:44: ´íÎó: ÐèÒªclass, interface»òenum
for(;'0'<=c&&c<='9';c=getc())x=x*10+c-'0';
^
0_0_22241434_25617\Main.java:45: ´íÎó: ÐèÒªclass, interface»òenum
x*=f;
^
0_0_22241434_25617\Main.java:46: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:50: ´íÎó: ÐèÒªclass, interface»òenum
int n,k,a[N],ans;
^
0_0_22241434_25617\Main.java:51: ´íÎó: ÐèÒªclass, interface»òenum
struct Tree{
^
0_0_22241434_25617\Main.java:53: ´íÎó: ÐèÒªclass, interface»òenum
int f[N],pre[M],last[N],child[M],s[N],v[N],n,p,rt;
^
0_0_22241434_25617\Main.java:54: ´íÎó: ÐèÒªclass, interface»òenum
int init(int _n){
^
0_0_22241434_25617\Main.java:55: ´íÎó: ÐèÒªclass, interface»òenum
n=_n;p=1;
^
0_0_22241434_25617\Main.java:56: ´íÎó: ÐèÒªclass, interface»òenum
rep(i,1,n)last[i]=v[i]=0;
^
0_0_22241434_25617\Main.java:57: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:59: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[x];last[x]=p;child[p]=y;c[p]=a;
^
0_0_22241434_25617\Main.java:59: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[x];last[x]=p;child[p]=y;c[p]=a;
^
0_0_22241434_25617\Main.java:59: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[x];last[x]=p;child[p]=y;c[p]=a;
^
0_0_22241434_25617\Main.java:60: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[y];last[y]=p;child[p]=x;c[p]=a;
^
0_0_22241434_25617\Main.java:60: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[y];last[y]=p;child[p]=x;c[p]=a;
^
0_0_22241434_25617\Main.java:60: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[y];last[y]=p;child[p]=x;c[p]=a;
^
0_0_22241434_25617\Main.java:60: ´íÎó: ÐèÒªclass, interface»òenum
pre[++p]=last[y];last[y]=p;child[p]=x;c[p]=a;
^
0_0_22241434_25617\Main.java:61: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:63: ´íÎó: ÐèÒªclass, interface»òenum
s[x]=1;f[x]=0;
^
0_0_22241434_25617\Main.java:64: ´íÎó: ÐèÒªclass, interface»òenum
for(int i=last[x];i;i=pre[i]){
^
0_0_22241434_25617\Main.java:64: ´íÎó: ÐèÒªclass, interface»òenum
for(int i=last[x];i;i=pre[i]){
^
0_0_22241434_25617\Main.java:64: ´íÎó: ÐèÒªclass, interface»òenum
for(int i=last[x];i;i=pre[i]){
^
0_0_22241434_25617\Main.java:65: ´íÎó: ÐèÒªclass, interface»òenum
int y=child[i];if(y==fa||v[y])continue;
^
0_0_22241434_25617\Main.java:66: ´íÎó: ÐèÒªclass, interface»òenum
find(y,x);f[x]=max(f[x],s[y]);s[x]+=s[y];
^
0_0_22241434_25617\Main.java:66: ´íÎó: ÐèÒªclass, interface»òenum
find(y,x);f[x]=max(f[x],s[y]);s[x]+=s[y];
^
0_0_22241434_25617\Main.java:66: ´íÎó: ÐèÒªclass, interface»òenum
find(y,x);f[x]=max(f[x],s[y]);s[x]+=s[y];
^
0_0_22241434_25617\Main.java:67: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:69: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:71: ´íÎó: ÐèÒªclass, interface»òenum
int dfs(int x,int fa,int len){
^
0_0_22241434_25617\Main.java:73: ´íÎó: ÐèÒªclass, interface»òenum
if(-a[x]-len>mx2)mx2=-a[x]-len;
^
0_0_22241434_25617\Main.java:74: ´íÎó: ÐèÒªclass, interface»òenum
int t=a[x]+mx2;
^
0_0_22241434_25617\Main.java:75: ´íÎó: ÐèÒªclass, interface»òenum
if(-a[x]+mx1>t)t=-a[x]+mx1;
^
0_0_22241434_25617\Main.java:76: ´íÎó: ÐèÒªclass, interface»òenum
if(t-len>ans)ans=t-len;
^
0_0_22241434_25617\Main.java:77: ´íÎó: ÐèÒªclass, interface»òenum
s[x]=1;
^
0_0_22241434_25617\Main.java:78: ´íÎó: ÐèÒªclass, interface»òenum
rix(i,x){
^
0_0_22241434_25617\Main.java:79: ´íÎó: ÐèÒªclass, interface»òenum
int y=child[i];if(y==fa||v[y])continue;
^
0_0_22241434_25617\Main.java:80: ´íÎó: ÐèÒªclass, interface»òenum
dfs(y,x,len+c[i]);
^
0_0_22241434_25617\Main.java:81: ´íÎó: ÐèÒªclass, interface»òenum
s[x]+=s[y];
^
0_0_22241434_25617\Main.java:82: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:85: ´íÎó: ÐèÒªclass, interface»òenum
find(x,0);v[x=rt]=1;int m=n;
^
0_0_22241434_25617\Main.java:85: ´íÎó: ÐèÒªclass, interface»òenum
find(x,0);v[x=rt]=1;int m=n;
^
0_0_22241434_25617\Main.java:86: ´íÎó: ÐèÒªclass, interface»òenum
mx1=a[x];mx2=-a[x];
^
0_0_22241434_25617\Main.java:86: ´íÎó: ÐèÒªclass, interface»òenum
mx1=a[x];mx2=-a[x];
^
0_0_22241434_25617\Main.java:87: ´íÎó: ÐèÒªclass, interface»òenum
rix(i,x){
^
0_0_22241434_25617\Main.java:88: ´íÎó: ÐèÒªclass, interface»òenum
int y=child[i];if(v[y])continue;
^
0_0_22241434_25617\Main.java:89: ´íÎó: ÐèÒªclass, interface»òenum
dfs(y,x,c[i]);
^
0_0_22241434_25617\Main.java:90: ´íÎó: ÐèÒªclass, interface»òenum
}
^
0_0_22241434_25617\Main.java:92: ´íÎó: Ð
|