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_30056842_991.cpp: In function 'int main()':
0_0_30056842_991.cpp:9:9: error: expected unqualified-id before ',' token
   int n,,ans[maxn]
         ^
0_0_30056842_991.cpp:2:12: error: expected initializer before 'long'
 #define ll long long
            ^
0_0_30056842_991.cpp:10:3: note: in expansion of macro 'll'
   ll sum=0;
   ^
0_0_30056842_991.cpp:17:6: error: 'ans' was not declared in this scope
      ans[i]=1<<j;
      ^
0_0_30056842_991.cpp:23:19: error: 'ans' was not declared in this scope
     if((1<<j)<=n) ans[i]=(1<<j);
                   ^
0_0_30056842_991.cpp:24:10: error: 'ans' was not declared in this scope
     else ans[i]=1;
          ^
0_0_30056842_991.cpp:26:4: error: 'sum' was not declared in this scope
    sum+=(i&ans[i]);
    ^
0_0_30056842_991.cpp:26:12: error: 'ans' was not declared in this scope
    sum+=(i&ans[i]);
            ^
0_0_30056842_991.cpp:28:9: error: 'sum' was not declared in this scope
   cout<<sum<<endl;
         ^
0_0_30056842_991.cpp:31:19: error: 'ans' was not declared in this scope
             cout<<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-12-02 03:41:05, Gzip enabled