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_22436856_24055.cpp:2:5: error: stray '#' in program
   2 #include <algorithm>
     ^
0_0_22436856_24055.cpp:3:5: error: stray '#' in program
   3 #include <cstring>
     ^
0_0_22436856_24055.cpp:4:5: error: stray '#' in program
   4 #include <iostream>
     ^
0_0_22436856_24055.cpp:5:5: error: stray '#' in program
   5 #include <vector>
     ^
0_0_22436856_24055.cpp:7:5: error: stray '#' in program
   7 #define N 100010
     ^
0_0_22436856_24055.cpp:2:3: error: expected unqualified-id before numeric constant
   2 #include <algorithm>
   ^
0_0_22436856_24055.cpp:7:3: error: expected unqualified-id before numeric constant
   7 #define N 100010
   ^
0_0_22436856_24055.cpp:10:2: error: expected unqualified-id before numeric constant
  10 int bit[2*N],que[2*N];
  ^
0_0_22436856_24055.cpp:11:2: error: expected unqualified-id before numeric constant
  11 int head[N], tot;
  ^
0_0_22436856_24055.cpp:12:2: error: expected unqualified-id before numeric constant
  12 struct node
  ^
0_0_22436856_24055.cpp:15:3: error: 'edge' does not name a type
  }edge[N*2];
   ^
0_0_22436856_24055.cpp: In function 'void addedge(int, int)':
0_0_22436856_24055.cpp:20:6: error: 'edge' was not declared in this scope
      edge[tot].v = v;
      ^
0_0_22436856_24055.cpp:20:11: error: 'tot' was not declared in this scope
      edge[tot].v = v;
           ^
0_0_22436856_24055.cpp:21:22: error: 'head' was not declared in this scope
      edge[tot].nxt = head[u];
                      ^
0_0_22436856_24055.cpp: In function 'void dfs(int, int)':
0_0_22436856_24055.cpp:27:6: error: 'que' was not declared in this scope
      que[++cnt] = u;
      ^
0_0_22436856_24055.cpp:27:12: error: 'cnt' was not declared in this scope
      que[++cnt] = u;
            ^
0_0_22436856_24055.cpp:28:18: error: 'head' was not declared in this scope
      for(int k = head[u]; ~k; k = edge[k].nxt){
                  ^
0_0_22436856_24055.cpp:28:35: error: 'edge' was not declared in this scope
      for(int k = head[u]; ~k; k = edge[k].nxt){
                                   ^
0_0_22436856_24055.cpp: In function 'void Update(int, int)':
0_0_22436856_24055.cpp:43:18: error: 'cnt' was not declared in this scope
      while( x <= cnt ) {
                  ^
0_0_22436856_24055.cpp:44:10: error: 'bit' was not declared in this scope
          bit[x] += value;
          ^
0_0_22436856_24055.cpp: In function 'int Query(int)':
0_0_22436856_24055.cpp:53:17: error: 'bit' was not declared in this scope
          ans += bit[x];
                 ^
0_0_22436856_24055.cpp: In function 'int main()':
0_0_22436856_24055.cpp:64:17: error: 'head' was not declared in this scope
          memset(head, -1, sizeof(head));
                 ^
0_0_22436856_24055.cpp:64:39: error: 'memset' was not declared in this scope
          memset(head, -1, sizeof(head));
                                       ^
0_0_22436856_24055.cpp:65:10: error: 'tot' was not declared in this scope
          tot = 0;
          ^
0_0_22436856_24055.cpp:67:17: error: 'bit' was not declared in this scope
          memset(bit,0,sizeof(bit));
                 ^
0_0_22436856_24055.cpp:68:17: error: 'st' was not declared in this scope
          memset(st,0,sizeof(st));
                 ^
0_0_22436856_24055.cpp:79:10: error: 'cnt' was not declared in this scope
          cnt = 0;
          ^
0_0_22436856_24055.cpp:83:21: error: 'que' was not declared in this scope
              if( st[que[i]] == 0 ) st[que[i]] = i;
                     ^
0_0_22436856_24055.cpp:84:19: error: 'se' was not declared in this scope
              else se[que[i]] = i;
                   ^
0_0_22436856_24055.cpp:98:14: error: 'ans' was not declared in this scope
              ans[i] = (Query(se[i] - 1) - Query(st[i])) / 2;
              ^
0_0_22436856_24055.cpp:98:30: error: 'se' was not declared in this scope
              ans[i] = (Query(se[i] - 1) - Query(st[i])) / 2;
                              ^
0_0_22436856_24055.cpp:104:26: error: 'ans' was not declared in this scope
             printf("%d", ans[i]);
                          ^


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.001000(s) query 1, Server time : 2025-01-10 12:17:02, Gzip enabled