/ Vijos /

记录详情

Compile Error

/in/foo.cc:5:21: error: 'const int clock [9][9]' redeclared as different kind of symbol
 const int clock[9][9] = { { 1 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 } ,{ 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 } ,{ 0 , 1 , 1 , 0 , 1 , 1 , 0 , 0 , 0 } ,{ 1 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 } ,{ 0 , 1 , 0 , 1 , 1 , 1 , 0 , 1 , 0 } ,{ 0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 , 1 } ,{ 0 , 0 , 0 , 1 , 1 , 0 , 1 , 1 , 0 } ,{ 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 } ,{ 0 , 0 , 0 , 0 , 1 ,1 , 0 , 1 , 1 } };//9种方式改变不同的钟,1代表加3点,0代表不变
                     ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148,
                 from /usr/include/c++/6/ext/atomicity.h:35,
                 from /usr/include/c++/6/bits/ios_base.h:39,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/time.h:189:16: note: previous declaration 'clock_t clock()'
 extern clock_t clock (void) __THROW;
                ^~~~~
/in/foo.cc: In function 'void dfs(int)':
/in/foo.cc:25:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    x[j] += clock[num][j] * i;//改变
                     ^
/in/foo.cc:25:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    x[j] += clock[num][j] * i;//改变
                        ^
/in/foo.cc:25:26: error: invalid operands of types 'clock_t() throw () {aka long int() throw ()}' and 'int' to binary 'operator*'
    x[j] += clock[num][j] * i;//改变
            ~~~~~~~~~~~~~~^~~
/in/foo.cc:32:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    x[j] -= clock[num][j] * i;//回溯
                     ^
/in/foo.cc:32:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    x[j] -= clock[num][j] * i;//回溯
                        ^
/in/foo.cc:32:26: error: invalid operands of types 'clock_t() throw () {aka long int() throw ()}' and 'int' to binary 'operator*'
    x[j] -= clock[num][j] * i;//回溯
            ~~~~~~~~~~~~~~^~~

信息

递交者
类型
递交
题目
P1016 北京2008的挂钟
语言
C++
递交时间
2019-12-02 14:52:47
评测时间
2019-12-02 14:52:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes