记录详情

Compile Error

/in/foo.cc: In function 'int work2()':
/in/foo.cc:17:20: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow]
   17 |     int ans=(1<<31)-1;
      |             ~~~~~~~^~
/in/foo.cc:21:13: error: 'memset' was not declared in this scope
   21 |             memset(book,0,sizeof(book));
      |             ^~~~~~
/in/foo.cc:3:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;

信息

递交者
类型
递交
题目
P1156 最小差距
语言
C++
递交时间
2025-03-27 15:58:38
评测时间
2025-03-27 15:58:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes