/ Vijos /

记录详情

Compile Error

foo.cpp:43:5: error: expected unqualified-id before 'for'
     for( int i = 2 ; i <= w / k ; i++ )
     ^
foo.cpp:43:22: error: 'i' does not name a type
     for( int i = 2 ; i <= w / k ; i++ )
                      ^
foo.cpp:43:35: error: 'i' does not name a type
     for( int i = 2 ; i <= w / k ; i++ )
                                   ^
foo.cpp:45:5: error: expected unqualified-id before 'for'
     for( int i = 1 ; i <= ( 1 << ( w % k ) ) - 1 ; i++ )
     ^
foo.cpp:45:22: error: 'i' does not name a type
     for( int i = 1 ; i <= ( 1 << ( w % k ) ) - 1 ; i++ )
                      ^
foo.cpp:45:52: error: 'i' does not name a type
     for( int i = 1 ; i <= ( 1 << ( w % k ) ) - 1 ; i++ )
                                                    ^
foo.cpp:47:11: error: expected constructor, destructor, or type conversion before '(' token
     printf( "%d" , ans[ ans[ 0 ] ] );
           ^
foo.cpp:48:5: error: expected unqualified-id before 'for'
     for( int i = ans[ 0 ] - 1 ; i >= 1 ; i-- )
     ^
foo.cpp:48:33: error: 'i' does not name a type
     for( int i = ans[ 0 ] - 1 ; i >= 1 ; i-- )
                                 ^
foo.cpp:48:42: error: 'i' does not name a type
     for( int i = ans[ 0 ] - 1 ; i >= 1 ; i-- )
                                          ^
foo.cpp:50:5: error: expected unqualified-id before 'return'
     return 0;
     ^
foo.cpp:51:1: error: expected declaration before '}' token
 }
 ^

信息

递交者
类型
递交
题目
P1315 2^k进制数
语言
C++
递交时间
2016-11-11 19:57:00
评测时间
2016-11-11 19:57:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes