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_17415223_30479.cpp:7:15: error: 'maxn' was not declared in this scope
 int n, m, val[maxn], pos[maxn], ans[maxn];
               ^
0_0_17415223_30479.cpp:7:26: error: 'maxn' was not declared in this scope
 int n, m, val[maxn], pos[maxn], ans[maxn];
                          ^
0_0_17415223_30479.cpp:7:37: error: 'maxn' was not declared in this scope
 int n, m, val[maxn], pos[maxn], ans[maxn];
                                     ^
0_0_17415223_30479.cpp:10:4: error: 'maxn' was not declared in this scope
 }a[maxn];
    ^
0_0_17415223_30479.cpp:11:7: error: 'maxn' was not declared in this scope
 int c[maxn * 5];
       ^
0_0_17415223_30479.cpp: In function 'void add(int, int)':
0_0_17415223_30479.cpp:21:40: error: 'c' was not declared in this scope
  for(int i = k;i <= n;i += (i & (-i))) c[i] += d;
                                        ^
0_0_17415223_30479.cpp: In function 'int sum(int)':
0_0_17415223_30479.cpp:27:46: error: 'c' was not declared in this scope
  for(int i = k;i > 0;i -= (i & (-i))) tmp += c[i];
                                              ^
0_0_17415223_30479.cpp: In function 'int main()':
0_0_17415223_30479.cpp:36:43: error: 'val' was not declared in this scope
   for(int i = 1;i <= n;i ++) scanf("%d", &val[i]);
                                           ^
0_0_17415223_30479.cpp:37:30: error: 'pos' was not declared in this scope
   for(int i = 1;i <= n;i ++) pos[val[i]] = i;
                              ^
0_0_17415223_30479.cpp:37:34: error: 'val' was not declared in this scope
   for(int i = 1;i <= n;i ++) pos[val[i]] = i;
                                  ^
0_0_17415223_30479.cpp:38:45: error: 'a' was not declared in this scope
   for(int i = 1;i <= m;i ++) scanf("%d%d", &a[i].l, &a[i].r), a[i].idx = i;
                                             ^
0_0_17415223_30479.cpp:39:8: error: 'a' was not declared in this scope
   sort(a + 1,a + m + 1,cmp);
        ^
0_0_17415223_30479.cpp:42:7: error: 'val' was not declared in this scope
    if(val[i] + 1 <= n && pos[val[i] + 1] < i) add(pos[val[i] + 1],-1);
       ^
0_0_17415223_30479.cpp:42:26: error: 'pos' was not declared in this scope
    if(val[i] + 1 <= n && pos[val[i] + 1] < i) add(pos[val[i] + 1],-1);
                          ^
0_0_17415223_30479.cpp:43:7: error: 'val' was not declared in this scope
    if(val[i] - 1 > 0 && pos[val[i] - 1] < i) add(pos[val[i] - 1],-1);
       ^
0_0_17415223_30479.cpp:43:25: error: 'pos' was not declared in this scope
    if(val[i] - 1 > 0 && pos[val[i] - 1] < i) add(pos[val[i] - 1],-1);
                         ^
0_0_17415223_30479.cpp:45:5: error: 'ans' was not declared in this scope
     ans[a[j].idx] = sum(a[j].r) - sum(a[j].l - 1);
     ^
0_0_17415223_30479.cpp:49:45: error: 'ans' was not declared in this scope
   for(int i = 1;i <= m;i ++) printf("%d\n", ans[i]);
                                             ^


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-17 06:37:35, Gzip enabled