Compile Error

/in/foo.cc:8:5: error: 'int round' redeclared as different kind of entity
    8 | int round;
      |     ^~~~~
In file included from /usr/include/features.h:489,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/c++config.h:655,
                 from /usr/include/c++/12/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:33,
                 from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:301:1: note: previous declaration 'double round(double)'
  301 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
/in/foo.cc: In function 'long long int calc(int*, int)':
/in/foo.cc:14:11: error: overloaded function with no contextual type information
   14 |     round=0;
      |           ^
/in/foo.cc:20:18: error: no post-increment operator for type
   20 |             round++;
      |                  ^~
/in/foo.cc:24:26: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator!='
   24 |                 if(vis[x]!=round){
      |                    ~~~~~~^~~~~~~
/in/foo.cc:25:28: error: cannot resolve overloaded function 'round' based on conversion to type 'int'
   25 |                     vis[x]=round;
      |                            ^~~~~

信息

递交者
类型
递交
题目
P3001 糖葫芦(haw)
语言
C++
递交时间
2026-06-27 20:32:21
评测时间
2026-06-27 20:32:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes