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_14570969_4028.cpp: In function 'int main()':
0_0_14570969_4028.cpp:7:36: error: expected unqualified-id before '[' token
      int n ,d1 , d2 , a[100005]  , [100005] , r[100005];
                                    ^
0_0_14570969_4028.cpp:15:52: error: 'l' was not declared in this scope
                if( i == 1 || a[i-1] + d1 != a[i] ) l[i] = 1;
                                                    ^
0_0_14570969_4028.cpp:16:22: error: 'l' was not declared in this scope
                else  l[i] =l[i-1] +1;
                      ^
0_0_14570969_4028.cpp:20:52: error: 'r' was not declared in this scope
                if(i == n-1 || a[i] + d2 != a[i+1]) r[i] = 1;
                                                    ^
0_0_14570969_4028.cpp:21:21: error: 'r' was not declared in this scope
                else r[i] = r[i+1] +1;
                     ^
0_0_14570969_4028.cpp:24:36: error: 'r' was not declared in this scope
                if(d1 == d2) ans += r[i];
                                    ^
0_0_14570969_4028.cpp:25:32: error: 'l' was not declared in this scope
                else ans += 1LL*l[i]*r[i];
                                ^
0_0_14570969_4028.cpp:25:37: error: 'r' was not declared in this scope
                else ans += 1LL*l[i]*r[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-22 14:59:13, Gzip enabled