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_37551611_25344.cpp:1:1: error: 'import' does not name a type
 import java.util.*;
 ^
0_0_37551611_25344.cpp:5:5: error: 'LinkedList' does not name a type
     LinkedList<int[]>[] query;
     ^
0_0_37551611_25344.cpp:6:5: error: 'LinkedList' does not name a type
     LinkedList<int[]>[] edge;
     ^
0_0_37551611_25344.cpp:7:8: error: expected unqualified-id before '[' token
     int[] ans;//tarjan 离线算法
        ^
0_0_37551611_25344.cpp:8:8: error: expected unqualified-id before '[' token
     int[] vis;//标记
        ^
0_0_37551611_25344.cpp:9:8: error: expected unqualified-id before '[' token
     int[] dis;//i到根节点的距离
        ^
0_0_37551611_25344.cpp:10:8: error: expected unqualified-id before '[' token
     int[] parent;//并查集
        ^
0_0_37551611_25344.cpp:11:12: error: expected ':' before 'static'
     public static void main(String[] args){
            ^
0_0_37551611_25344.cpp:11:29: error: 'String' has not been declared
     public static void main(String[] args){
                             ^
0_0_37551611_25344.cpp:11:38: error: expected ',' or '...' before 'args'
     public static void main(String[] args){
                                      ^
0_0_37551611_25344.cpp:89:1: error: expected ';' after class definition
 }
 ^
0_0_37551611_25344.cpp: In static member function 'static void Main::main(int*)':
0_0_37551611_25344.cpp:12:25: error: conversion from 'Main*' to non-scalar type 'Main' requested
         Main m=new Main();
                         ^
0_0_37551611_25344.cpp: In member function 'void Main::init()':
0_0_37551611_25344.cpp:16:9: error: 'Scanner' was not declared in this scope
         Scanner sc=new Scanner(System.in);
         ^
0_0_37551611_25344.cpp:17:15: error: 'sc' was not declared in this scope
         int t=sc.nextInt();
               ^
0_0_37551611_25344.cpp:21:13: error: 'vis' was not declared in this scope
             vis=new int[n+1];
             ^
0_0_37551611_25344.cpp:22:13: error: 'ans' was not declared in this scope
             ans=new int[m+1];
             ^
0_0_37551611_25344.cpp:23:13: error: 'dis' was not declared in this scope
             dis=new int[n+1];
             ^
0_0_37551611_25344.cpp:24:13: error: 'parent' was not declared in this scope
             parent=new int[n+1];
             ^
0_0_37551611_25344.cpp:25:13: error: 'edge' was not declared in this scope
             edge=new LinkedList[n+1];
             ^
0_0_37551611_25344.cpp:25:22: error: 'LinkedList' does not name a type
             edge=new LinkedList[n+1];
                      ^
0_0_37551611_25344.cpp:26:13: error: 'query' was not declared in this scope
             query=new LinkedList[n+1];
             ^
0_0_37551611_25344.cpp:26:23: error: 'LinkedList' does not name a type
             query=new LinkedList[n+1];
                       ^
0_0_37551611_25344.cpp:29:29: error: 'LinkedList' does not name a type
                 edge[i]=new LinkedList<>();
                             ^
0_0_37551611_25344.cpp:29:40: error: expected primary-expression before '>' token
                 edge[i]=new LinkedList<>();
                                        ^
0_0_37551611_25344.cpp:29:42: error: expected primary-expression before ')' token
                 edge[i]=new LinkedList<>();
                                          ^
0_0_37551611_25344.cpp:30:30: error: 'LinkedList' does not name a type
                 query[i]=new LinkedList<>();
                              ^
0_0_37551611_25344.cpp:30:41: error: expected primary-expression before '>' token
                 query[i]=new LinkedList<>();
                                         ^
0_0_37551611_25344.cpp:30:43: error: expected primary-expression before ')' token
                 query[i]=new LinkedList<>();
                                           ^
0_0_37551611_25344.cpp:37:37: error: expected primary-expression before ']' token
                 edge[u].add(new int[]{v,w});
                                     ^
0_0_37551611_25344.cpp:37:42: error: too many initializers for 'int [1]'
                 edge[u].add(new int[]{v,w});
                                          ^
0_0_37551611_25344.cpp:38:37: error: expected primary-expression before ']' token
                 edge[v].add(new int[]{u,w});
                                     ^
0_0_37551611_25344.cpp:38:42: error: too many initializers for 'int [1]'
                 edge[v].add(new int[]{u,w});
                                          ^
0_0_37551611_25344.cpp:47:42: error: expected primary-expression before ']' token
                     query[u].add(new int[]{v,i});
                                          ^
0_0_37551611_25344.cpp:47:47: error: too many initializers for 'int [1]'
                     query[u].add(new int[]{v,i});
                                               ^
0_0_37551611_25344.cpp:48:42: error: expected primary-expression before ']' token
                     query[v].add(new int[]{u,i});
                                          ^
0_0_37551611_25344.cpp:48:47: error: too many initializers for 'int [1]'
                     query[v].add(new int[]{u,i});
                                               ^
0_0_37551611_25344.cpp:55:17: error: 'System' was not declared in this scope
                 System.out.println(ans[i]);
                 ^
0_0_37551611_25344.cpp: In member function 'void Main::tarjan(int)':
0_0_37551611_25344.cpp:60:9: error: 'vis' was not declared in this scope
         vis[x]=1;//正在搜索
         ^
0_0_37551611_25344.cpp:61:16: error: expected unqualified-id before '[' token
         for(int[] node:edge[x]){
                ^
0_0_37551611_25344.cpp:61:16: error: expected ';' before '[' token
0_0_37551611_25344.cpp: In lambda function:
0_0_37551611_25344.cpp:61:19: error: expected '{' before 'node'
         for(int[] node:edge[x]){
                   ^
0_0_37551611_25344.cpp: In member function 'void Main::tarjan(int)':
0_0_37551611_25344.cpp:61:19: error: expected ';' before 'node'
0_0_37551611_25344.cpp:61:23: error: found ':' in nested-name-specifier, expected '::'
         for(int[] node:edge[x]){
                       ^
0_0_37551611_25344.cpp:61:19: error: 'node' has not been declared
         for(int[] node:edge[x]){
                   ^
0_0_37551611_25344.cpp:62:19: error: 'node' was not declared in this scope
             int y=node[0];
                   ^
0_0_37551611_25344.cpp:66:13: error: 'dis' was not declared in this scope
             dis[y]=dis[x]+node[1];
             ^
0_0_37551611_25344.cpp:68:13: error: 'parent' was not declared in this scope
             parent[y]=x;
             ^
0_0_37551611_25344.cpp:71:23: error: 'query' was not declared in this scope
         for(int i=0;i<query[x].size();i++){
                       ^
0_0_37551611_25344.cpp:73:16: error: expected unqualified-id before '[' token
             int[] node=query[x].get(i);
                ^
0_0_37551611_25344.cpp:74:20: error: 'node' was not declared in this scope
             if(vis[node[0]]==2){
                    ^
0_0_37551611_25344.cpp:77:17: error: 'ans' was not declared in this scope
                 ans[node[1]]=Math.min(ans[node[1]],dis[x]+dis[node[0]]-2*dis[lca]);
                 ^
0_0_37551611_25344.cpp:77:30: error: 'Math' was not declared in this scope
                 ans[node[1]]=Math.min(ans[node[1]],dis[x]+dis[node[0]]-2*dis[lca]);
                              ^
0_0_37551611_25344.cpp:77:52: error: 'dis' was not declared in this scope
                 ans[node[1]]=Math.min(ans[node[1]],dis[x]+dis[node[0]]-2*dis[lca]);
                                                    ^
0_0_37551611_25344.cpp: In member function 'int Main::get(int)':
0_0_37551611_25344.cpp:84:15: error: 'parent' was not declared in this scope
         if(x!=parent[x]){
               ^
0_0_37551611_25344.cpp:87:16: error: 'parent' was not declared in this scope
         return parent[x];
                ^


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-01 11:08:26, Gzip enabled