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_38257329_18054.cpp:43:5: error: redefinition of 'int N'
 int N,B[100002];
     ^
0_0_38257329_18054.cpp:13:5: note: 'int N' previously declared here
 int N,c[100001],sum[100001];
     ^
0_0_38257329_18054.cpp: In function 'int sum(int)':
0_0_38257329_18054.cpp:53:14: error: 'int sum(int)' redeclared as different kind of symbol
 int sum(int i)
              ^
0_0_38257329_18054.cpp:13:17: note: previous declaration 'int sum [100001]'
 int N,c[100001],sum[100001];
                 ^
0_0_38257329_18054.cpp: In function 'int main()':
0_0_38257329_18054.cpp:63:5: error: redefinition of 'int main()'
 int main()
     ^
0_0_38257329_18054.cpp:14:5: note: 'int main()' previously defined here
 int main()
     ^
0_0_38257329_18054.cpp:73:43: error: 'sum' cannot be used as a function
   for (int i=1;i<N;i++) printf("%d ",sum(i));
                                           ^
0_0_38257329_18054.cpp:74:22: error: 'sum' cannot be used as a function
   printf("%d\n",sum(N));
                      ^


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-23 06:46:05, Gzip enabled