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_23190298_20626.cpp: In function 'void Init()':
0_0_23190298_20626.cpp:44:28: error: expected ';' before 'i'
     for( int j = 1; (1<<j) i="1;" int="" j="i;">= 0; j-- ){
                            ^
0_0_23190298_20626.cpp:44:28: error: 'i' was not declared in this scope
0_0_23190298_20626.cpp:44:35: error: expected ')' before 'int'
     for( int j = 1; (1<<j) i="1;" int="" j="i;">= 0; j-- ){
                                   ^
0_0_23190298_20626.cpp:44:38: error: expected unqualified-id before '=' token
     for( int j = 1; (1<<j) i="1;" int="" j="i;">= 0; j-- ){
                                      ^
0_0_23190298_20626.cpp:44:54: error: 'j' was not declared in this scope
     for( int j = 1; (1<<j) i="1;" int="" j="i;">= 0; j-- ){
                                                      ^
0_0_23190298_20626.cpp:49:8: error: 'a' was not declared in this scope
     if(a == b)return a;
        ^
0_0_23190298_20626.cpp:49:13: error: 'b' was not declared in this scope
     if(a == b)return a;
             ^
0_0_23190298_20626.cpp:49:22: error: return-statement with a value, in function returning 'void' [-fpermissive]
     if(a == b)return a;
                      ^
0_0_23190298_20626.cpp:51:14: error: 'i' was not declared in this scope
     for( j = i; j >= 0; j-- ){
              ^
0_0_23190298_20626.cpp:52:16: error: 'a' was not declared in this scope
         if(anc[a][j] != -1 && anc[a][j] != anc[b][j]){
                ^
0_0_23190298_20626.cpp:52:48: error: 'b' was not declared in this scope
         if(anc[a][j] != -1 && anc[a][j] != anc[b][j]){
                                                ^
0_0_23190298_20626.cpp:57:16: error: 'a' was not declared in this scope
     return anc[a][0];
                ^
0_0_23190298_20626.cpp:57:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
     return anc[a][0];
                    ^
0_0_23190298_20626.cpp: In function 'int main()':
0_0_23190298_20626.cpp:76:60: error: 'lca' was not declared in this scope
             printf("%d\n",dis[u] + dis[v] - 2 * dis[lca(u,v)]);
                                                            ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-10 22:00:42, Gzip enabled