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_39777011_7780.cpp: In function 'int main()':
0_0_39777011_7780.cpp:10:17: error: expected ',' or ';' before 'int'
   10 |                 int>>n;
      |                 ^~~
0_0_39777011_7780.cpp:11:31: error: 'n' was not declared in this scope
   11 |                 for(int i=0;i<n;i++){
      |                               ^
0_0_39777011_7780.cpp:12:34: error: expected ';' before 'sum'
   12 |                         cin>>s[i]
      |                                  ^
      |                                  ;
   13 |                         sum+=s[s];
      |                         ~~~       
0_0_39777011_7780.cpp:16:26: error: expected ';' before '+' token
   16 |                 for(int i+0;i<(1<<n);i++){
      |                          ^
      |                          ;
0_0_39777011_7780.cpp:16:35: error: 'n' was not declared in this scope
   16 |                 for(int i+0;i<(1<<n);i++){
      |                                   ^
0_0_39777011_7780.cpp:16:37: error: expected ')' before ';' token
   16 |                 for(int i+0;i<(1<<n);i++){
      |                    ~                ^
      |                                     )
0_0_39777011_7780.cpp:16:38: error: 'i' was not declared in this scope
   16 |                 for(int i+0;i<(1<<n);i++){
      |                                      ^


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.001000(s) query 1, Server time : 2025-01-10 12:37:52, Gzip enabled