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_20635456_31790.cpp: In function 'int main()':
0_0_20635456_31790.cpp:13:22: error: expression list treated as compound expression in initializer [-fpermissive]
         scanf("%d",&n);
                      ^
0_0_20635456_31790.cpp:13:22: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
0_0_20635456_31790.cpp:15:25: error: 'a' was not declared in this scope
             scanf("%d",&a[j]);
                         ^
0_0_20635456_31790.cpp:15:29: error: 'scanf' cannot be used as a function
             scanf("%d",&a[j]);
                             ^
0_0_20635456_31790.cpp:16:18: error: 'a' was not declared in this scope
             sort(a,a+n);
                  ^
0_0_20635456_31790.cpp:18:18: error: 'ans' was not declared in this scope
   {if(k!=1&&k!=0)ans[k]=gcd(a[0],a[1]);
                  ^
0_0_20635456_31790.cpp:20:3: error: 'ans' was not declared in this scope
   ans[k]=gcd(a[1],a[2]);
   ^
0_0_20635456_31790.cpp:24:3: error: 'ans' was not declared in this scope
   ans[k]=gcd(ans[k],a[l]);
   ^
0_0_20635456_31790.cpp:27:16: error: 'ans' was not declared in this scope
   if(k==0) max=ans[0];
                ^
0_0_20635456_31790.cpp:28:6: error: 'ans' was not declared in this scope
   if(ans[k]>max)max=ans[k]; 
      ^


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-02-18 22:30:09, Gzip enabled