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_22294441_27149\Main.java:1: 错误: 非法字符: '#'
#include<bits/stdc++.h>
^
0_0_22294441_27149\Main.java:1: 错误: 需要class, interface或enum
#include<bits/stdc++.h>
        ^
0_0_22294441_27149\Main.java:3: 错误: 需要class, interface或enum
typedef long long LL;
^
0_0_22294441_27149\Main.java:4: 错误: 需要class, interface或enum
const int MX = 5e4 + 5;
^
0_0_22294441_27149\Main.java:5: 错误: 需要class, interface或enum
const int inf = 0x3f3f3f3f;
^
0_0_22294441_27149\Main.java:6: 错误: 需要class, interface或enum
vector<int>G[MX];
^
0_0_22294441_27149\Main.java:8: 错误: 需要class, interface或enum
int n, k, a[MX];
^
0_0_22294441_27149\Main.java:9: 错误: 需要class, interface或enum
int done[MX], siz[MX], f[MX], root, Max, max_sta;
^
0_0_22294441_27149\Main.java:11: 错误: 需要class, interface或enum
int getRoot(int u, int fa)
^
0_0_22294441_27149\Main.java:14: 错误: 需要class, interface或enum
    for(auto v: G[u])   if(v != fa && !done[v])
    ^
0_0_22294441_27149\Main.java:17: 错误: 需要class, interface或enum
        f[u] = max(f[u], siz[v]);
        ^
0_0_22294441_27149\Main.java:18: 错误: 需要class, interface或enum
    }
    ^
0_0_22294441_27149\Main.java:20: 错误: 需要class, interface或enum
    if(f[u] > f[root])  root = u;
    ^
0_0_22294441_27149\Main.java:21: 错误: 需要class, interface或enum
    return siz[u];
    ^
0_0_22294441_27149\Main.java:22: 错误: 需要class, interface或enum
}
^
0_0_22294441_27149\Main.java:25: 错误: 需要class, interface或enum
int Sta[15];
^
0_0_22294441_27149\Main.java:26: 错误: 需要class, interface或enum
vector<int>v;
^
0_0_22294441_27149\Main.java:27: 错误: 需要class, interface或enum
void dfs_sta(int u, int fa, int sta) {
^
0_0_22294441_27149\Main.java:29: 错误: 需要class, interface或enum
    for(auto v : G[u])
    ^
0_0_22294441_27149\Main.java:32: 错误: 需要class, interface或enum
        dfs_sta(v, u, sta | Sta[a[v]]);
        ^
0_0_22294441_27149\Main.java:33: 错误: 需要class, interface或enum
    }
    ^
0_0_22294441_27149\Main.java:37: 错误: 需要class, interface或enum
    for (int i = 0; i <= max_sta; i++) cnt_sta[i] = 0;
    ^
0_0_22294441_27149\Main.java:37: 错误: 需要class, interface或enum
    for (int i = 0; i <= max_sta; i++) cnt_sta[i] = 0;
                    ^
0_0_22294441_27149\Main.java:37: 错误: 需要class, interface或enum
    for (int i = 0; i <= max_sta; i++) cnt_sta[i] = 0;
                                  ^
0_0_22294441_27149\Main.java:38: 错误: 需要class, interface或enum
    dfs_sta(rt, -1, sta | Sta[a[rt]]);
    ^
0_0_22294441_27149\Main.java:39: 错误: 需要class, interface或enum
    for (int i = 0; i < v.size(); i++) cnt_sta[v[i]]++;
    ^
0_0_22294441_27149\Main.java:39: 错误: 需要class, interface或enum
    for (int i = 0; i < v.size(); i++) cnt_sta[v[i]]++;
                    ^
0_0_22294441_27149\Main.java:39: 错误: 需要class, interface或enum
    for (int i = 0; i < v.size(); i++) cnt_sta[v[i]]++;
                                  ^
0_0_22294441_27149\Main.java:40: 错误: 需要class, interface或enum
    LL ret = 0;
    ^
0_0_22294441_27149\Main.java:41: 错误: 需要class, interface或enum
    for (int i = 0; i < v.size(); i++) {
    ^
0_0_22294441_27149\Main.java:41: 错误: 需要class, interface或enum
    for (int i = 0; i < v.size(); i++) {
                    ^
0_0_22294441_27149\Main.java:41: 错误: 需要class, interface或enum
    for (int i = 0; i < v.size(); i++) {
                                  ^
0_0_22294441_27149\Main.java:43: 错误: 需要class, interface或enum
        for (int x = S; x; x = (x - 1)&S) ret += cnt_sta[x ^ max_sta];
        ^
0_0_22294441_27149\Main.java:43: 错误: 需要class, interface或enum
        for (int x = S; x; x = (x - 1)&S) ret += cnt_sta[x ^ max_sta];
                        ^
0_0_22294441_27149\Main.java:43: 错误: 需要class, interface或enum
        for (int x = S; x; x = (x - 1)&S) ret += cnt_sta[x ^ max_sta];
                           ^
0_0_22294441_27149\Main.java:44: 错误: 需要class, interface或enum
        ret += cnt_sta[max_sta]; //x不能枚举到空集,空集需要特殊处理
        ^
0_0_22294441_27149\Main.java:45: 错误: 需要class, interface或enum
    }
    ^
0_0_22294441_27149\Main.java:47: 错误: 需要class, interface或enum
}
^
0_0_22294441_27149\Main.java:50: 错误: 需要class, interface或enum
void solve(int u)
^
0_0_22294441_27149\Main.java:53: 错误: 需要class, interface或enum
    done[u] = 1;
    ^
0_0_22294441_27149\Main.java:54: 错误: 需要class, interface或enum
    for(auto v : G[u])
    ^
0_0_22294441_27149\Main.java:57: 错误: 需要class, interface或enum
        ans -= cal(v, Sta[a[u]]);
        ^
0_0_22294441_27149\Main.java:59: 错误: 需要class, interface或enum
        f[0] = siz[v];
        ^
0_0_22294441_27149\Main.java:60: 错误: 需要class, interface或enum
        getRoot(v, root=0);
        ^
0_0_22294441_27149\Main.java:61: 错误: 需要class, interface或enum
        solve(root);
        ^
0_0_22294441_27149\Main.java:62: 错误: 需要class, interface或enum
    }
    ^
0_0_22294441_27149\Main.java:66: 错误: 需要class, interface或enum
    for (int i = 0; i < 11; i++) Sta[i] = 1 << i;
                    ^
0_0_22294441_27149\Main.java:66: 错误: 需要class, interface或enum
    for (int i = 0; i < 11; i++) Sta[i] = 1 << i;
                            ^
0_0_22294441_27149\Main.java:67: 错误: 需要class, interface或enum
    while (~scanf("%d%d", &n, &k)) {
    ^
0_0_22294441_27149\Main.java:68: 错误: 需要class, interface或enum
        for(int i = 1; i <= n;i++) G[i].clear();
                       ^
0_0_22294441_27149\Main.java:68: 错误: 需要class, interface或enum
        for(int i = 1; i <= n;i++) G[i].clear();
                              ^
0_0_22294441_27149\Main.java:69: 错误: 需要class, interface或enum
        max_sta = Sta[k] - 1;
        ^
0_0_22294441_27149\Main.java:70: 错误: 需要class, interface或enum
        for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i]--;
        ^
0_0_22294441_27149\Main.java:70: 错误: 需要class, interface或enum
        for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i]--;
                        ^
0_0_22294441_27149\Main.java:70: 错误: 需要class, interface或enum
        for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i]--;
                                ^
0_0_22294441_27149\Main.java:71: 错误: 需要class, interface或enum
        for (int i = 1; i < n; i++) {
        ^
0_0_22294441_27149\Main.java:71: 错误: 需要class, interface或enum
        for (int i = 1; i < n; i++) {
                        ^
0_0_22294441_27149\Main.java:71: 错误: 需要class, interface或enum
        for (int i = 1; i < n; i++) {
                               ^
0_0_22294441_27149\Main.java:73: 错误: 需要class, interface或enum
            scanf("%d%d", &u, &v);
            ^
0_0_22294441_27149\Main.java:74: 错误: 需要class, interface或enum
            G[u].push_back(v);
            ^
0_0_22294441_27149\Main.java:75: 错误: 需要class, interface或enum
            G[v].push_back(u);
            ^
0_0_22294441_27149\Main.java:76: 错误: 需要class, interface或enum
        }
        ^
0_0_22294441_27149\Main.java:79: 错误: 需要class, interface或enum
            continue;
            ^
0_0_22294441_27149\Main.java:80: 错误: 需要class, interface或enum
        }
        ^
0_0_22294441_27149\Main.java:83: 错误: 需要class, interface或enum
        f[0] = n;
        ^
0_0_22294441_27149\Main.java:84: 错误: 需要class, interface或enum
        getRoot(1, root=0);
        ^
0_0_22294441_27149\Main.java:86: 错误: 需要class, interface或enum
        ans = 0;
        ^
0_0_22294441_27149\Main.java:87: 错误: 需要class, interface或enum
        solve(root);
        ^
0_0_22294441_27149\Main.java:88: 错误: 需要class, interface或enum
        printf("%lld\n", ans);
        ^
0_0_22294441_27149\Main.java:89: 错误: 需要class, interface或enum
    }
    ^
0_0_22294441_27149\Main.java:91: 错误: 需要class, interface或enum
}
^
71 个错误


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-11-22 16:17:04, Gzip enabled