/ Vijos /

记录详情

Compile Error

foo.cc: In function 'void loopAll(int, int)':
foo.cc:23:22: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
   23 |         for(int j=0;j<sizeof(prime)/sizeof(int);j++) {
      |                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'void dfs()':
foo.cc:60:13: error: 'memcpy' was not declared in this scope
   60 |             memcpy(v_ans, v, sizeof(v));
      |             ^~~~~~
foo.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    3 | #include <unordered_map>
  +++ |+#include <cstring>
    4 | int prime[] = {
foo.cc:71:25: error: 'memcpy' was not declared in this scope
   71 |                         memcpy(v_ans, v, sizeof(v));
      |                         ^~~~~~
foo.cc:71:25: note: 'memcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
foo.cc: In function 'int main()':
foo.cc:86:22: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
   86 |         for(int j=0;j<sizeof(prime)/sizeof(int);j++) {
      |                     ~^~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1158 小三学算术
语言
C++
递交时间
2023-07-09 19:51:41
评测时间
2023-07-09 19:51:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes