F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_27461699_6226\Main.java:1: 错误: 非法字符: '#'
#include <iostream>
^
0_0_27461699_6226\Main.java:1: 错误: 需要class, interface或enum
#include <iostream>
         ^
0_0_27461699_6226\Main.java:2: 错误: 非法字符: '#'
#include <cstdio>
^
0_0_27461699_6226\Main.java:3: 错误: 非法字符: '#'
#include <cmath>
^
0_0_27461699_6226\Main.java:4: 错误: 非法字符: '#'
#include <algorithm>
^
0_0_27461699_6226\Main.java:5: 错误: 非法字符: '#'
#include <vector>
^
0_0_27461699_6226\Main.java:8: 错误: 需要class, interface或enum
const int N = 2e5+10;
^
0_0_27461699_6226\Main.java:11: 错误: 需要class, interface或enum
int n, k, minsz,root, sz[N], sonsz[N];
^
0_0_27461699_6226\Main.java:12: 错误: 需要class, interface或enum
vector<int> G[N];
^
0_0_27461699_6226\Main.java:15: 错误: 需要class, interface或enum
void dfs(int u,int fa)
^
0_0_27461699_6226\Main.java:18: 错误: 需要class, interface或enum
	int maxsz=0;
	^
0_0_27461699_6226\Main.java:19: 错误: 需要class, interface或enum
	for(int i=0; i<G[u].size(); i++) {
	^
0_0_27461699_6226\Main.java:19: 错误: 需要class, interface或enum
	for(int i=0; i<G[u].size(); i++) {
	             ^
0_0_27461699_6226\Main.java:19: 错误: 需要class, interface或enum
	for(int i=0; i<G[u].size(); i++) {
	                            ^
0_0_27461699_6226\Main.java:21: 错误: 需要class, interface或enum
		if(v == fa) continue;
		^
0_0_27461699_6226\Main.java:22: 错误: 需要class, interface或enum
		dfs(v, u);
		^
0_0_27461699_6226\Main.java:23: 错误: 需要class, interface或enum
		sz[u] += sz[v];
		^
0_0_27461699_6226\Main.java:24: 错误: 需要class, interface或enum
		maxsz=max(maxsz, sz[v]);
		^
0_0_27461699_6226\Main.java:25: 错误: 需要class, interface或enum
	}
	^
0_0_27461699_6226\Main.java:28: 错误: 需要class, interface或enum
	if(maxsz < minsz) {
	^
0_0_27461699_6226\Main.java:30: 错误: 需要class, interface或enum
		root = u;
		^
0_0_27461699_6226\Main.java:32: 错误: 需要class, interface或enum
	}
	^
0_0_27461699_6226\Main.java:39: 错误: 需要class, interface或enum
	root = 1;
	^
0_0_27461699_6226\Main.java:40: 错误: 需要class, interface或enum
	for(int i=0; i<=n; i++) {
	^
0_0_27461699_6226\Main.java:40: 错误: 需要class, interface或enum
	for(int i=0; i<=n; i++) {
	             ^
0_0_27461699_6226\Main.java:40: 错误: 需要class, interface或enum
	for(int i=0; i<=n; i++) {
	                   ^
0_0_27461699_6226\Main.java:42: 错误: 需要class, interface或enum
		G[i].clear();
		^
0_0_27461699_6226\Main.java:43: 错误: 需要class, interface或enum
	}
	^
0_0_27461699_6226\Main.java:47: 错误: 需要class, interface或enum
void dfs1(int u,int fa)
^
0_0_27461699_6226\Main.java:50: 错误: 需要class, interface或enum
	for(int i=0;i<G[u].size();i++) {
	^
0_0_27461699_6226\Main.java:50: 错误: 需要class, interface或enum
	for(int i=0;i<G[u].size();i++) {
	            ^
0_0_27461699_6226\Main.java:50: 错误: 需要class, interface或enum
	for(int i=0;i<G[u].size();i++) {
	                          ^
0_0_27461699_6226\Main.java:52: 错误: 需要class, interface或enum
		if(v == fa) continue;
		^
0_0_27461699_6226\Main.java:53: 错误: 需要class, interface或enum
		dfs1(v, u);
		^
0_0_27461699_6226\Main.java:54: 错误: 需要class, interface或enum
		sz[u] += sz[v];
		^
0_0_27461699_6226\Main.java:56: 错误: 需要class, interface或enum
	}
	^
0_0_27461699_6226\Main.java:59: 错误: 需要class, interface或enum
	}
	^
0_0_27461699_6226\Main.java:61: 错误: 需要class, interface或enum
}
^
0_0_27461699_6226\Main.java:67: 错误: 需要class, interface或enum
	int T; scanf("%d", &T);
	       ^
0_0_27461699_6226\Main.java:68: 错误: 需要class, interface或enum
	while(T--) {
	^
0_0_27461699_6226\Main.java:70: 错误: 需要class, interface或enum
		scanf("%d %d", &n, &k);
		^
0_0_27461699_6226\Main.java:71: 错误: 需要class, interface或enum
		init();
		^
0_0_27461699_6226\Main.java:72: 错误: 需要class, interface或enum
		for(int i=1; i<n; i++) {
		^
0_0_27461699_6226\Main.java:72: 错误: 需要class, interface或enum
		for(int i=1; i<n; i++) {
		             ^
0_0_27461699_6226\Main.java:72: 错误: 需要class, interface或enum
		for(int i=1; i<n; i++) {
		                  ^
0_0_27461699_6226\Main.java:73: 错误: 需要class, interface或enum
			int u,v; scanf("%d %d", &u, &v);
			         ^
0_0_27461699_6226\Main.java:74: 错误: 需要class, interface或enum
			G[u].push_back(v);
			^
0_0_27461699_6226\Main.java:75: 错误: 需要class, interface或enum
			G[v].push_back(u);
			^
0_0_27461699_6226\Main.java:76: 错误: 需要class, interface或enum
		}
		^
0_0_27461699_6226\Main.java:79: 错误: 需要class, interface或enum
			continue;
			^
0_0_27461699_6226\Main.java:80: 错误: 需要class, interface或enum
	    }
	    ^
0_0_27461699_6226\Main.java:86: 错误: 需要class, interface或enum
		dfs1(root, 0);
		^
0_0_27461699_6226\Main.java:87: 错误: 需要class, interface或enum
		printf("%d\n", ans-1);
		^
0_0_27461699_6226\Main.java:88: 错误: 需要class, interface或enum
	}
	^
0_0_27461699_6226\Main.java:90: 错误: 需要class, interface或enum
}
^
55 个错误


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-03 18:18:57, Gzip enabled