0_0_30733646_31098\Main.java:1: 错误: 非法字符: '#'
#include<iostream>
^
0_0_30733646_31098\Main.java:1: 错误: 需要class, interface或enum
#include<iostream>
^
0_0_30733646_31098\Main.java:2: 错误: 非法字符: '#'
#include<vector>
^
0_0_30733646_31098\Main.java:4: 错误: 需要class, interface或enum
const int maxn=2e5+10;
^
0_0_30733646_31098\Main.java:5: 错误: 需要class, interface或enum
vector<int>vec[maxn];
^
0_0_30733646_31098\Main.java:6: 错误: 需要class, interface或enum
int s[maxn],e[maxn],tot;
^
0_0_30733646_31098\Main.java:7: 错误: 需要class, interface或enum
void dfs(int u)
^
0_0_30733646_31098\Main.java:10: 错误: 需要class, interface或enum
s[u]=tot;//in
^
0_0_30733646_31098\Main.java:11: 错误: 需要class, interface或enum
for(auto X:vec[u])
^
0_0_30733646_31098\Main.java:13: 错误: 需要class, interface或enum
e[u]=tot;//out
^
0_0_30733646_31098\Main.java:15: 错误: 需要class, interface或enum
}
^
0_0_30733646_31098\Main.java:18: 错误: 需要class, interface或enum
int y;
^
0_0_30733646_31098\Main.java:19: 错误: 需要class, interface或enum
}edge[maxn];
^
0_0_30733646_31098\Main.java:20: 错误: 需要class, interface或enum
int main()
^
0_0_30733646_31098\Main.java:23: 错误: 需要class, interface或enum
cin>>test;
^
0_0_30733646_31098\Main.java:24: 错误: 需要class, interface或enum
while(test--){
^
0_0_30733646_31098\Main.java:26: 错误: 需要class, interface或enum
cin>>n>>k;
^
0_0_30733646_31098\Main.java:27: 错误: 需要class, interface或enum
for(int i=0;i<n-1;i++){
^
0_0_30733646_31098\Main.java:27: 错误: 需要class, interface或enum
for(int i=0;i<n-1;i++){
^
0_0_30733646_31098\Main.java:27: 错误: 需要class, interface或enum
for(int i=0;i<n-1;i++){
^
0_0_30733646_31098\Main.java:29: 错误: 需要class, interface或enum
vec[x].push_back(y);
^
0_0_30733646_31098\Main.java:30: 错误: 需要class, interface或enum
edge[i].x=x;
^
0_0_30733646_31098\Main.java:31: 错误: 需要class, interface或enum
edge[i].y=y;
^
0_0_30733646_31098\Main.java:32: 错误: 需要class, interface或enum
}
^
0_0_30733646_31098\Main.java:34: 错误: 需要class, interface或enum
dfs(1);//无向图且为树的形状 任意节点可为根节点
^
0_0_30733646_31098\Main.java:35: 错误: 需要class, interface或enum
int ans=0;
^
0_0_30733646_31098\Main.java:36: 错误: 需要class, interface或enum
for(int i=0;i<n-1;i++){
^
0_0_30733646_31098\Main.java:36: 错误: 需要class, interface或enum
for(int i=0;i<n-1;i++){
^
0_0_30733646_31098\Main.java:36: 错误: 需要class, interface或enum
for(int i=0;i<n-1;i++){
^
0_0_30733646_31098\Main.java:38: 错误: 需要class, interface或enum
y=edge[i].y;
^
0_0_30733646_31098\Main.java:39: 错误: 需要class, interface或enum
if(e[x]-s[x]>=k&&e[y]-s[y]>=k)
^
0_0_30733646_31098\Main.java:41: 错误: 需要class, interface或enum
}
^
0_0_30733646_31098\Main.java:43: 错误: 需要class, interface或enum
for(int i=0;i<n;i++)
^
0_0_30733646_31098\Main.java:43: 错误: 需要class, interface或enum
for(int i=0;i<n;i++)
^
0_0_30733646_31098\Main.java:43: 错误: 需要class, interface或enum
for(int i=0;i<n;i++)
^
0_0_30733646_31098\Main.java:45: 错误: 需要class, interface或enum
}
^
36 个错误
|