/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:14:9: error: 'memset' was not declared in this scope
   14 |         memset(a,0,sizeof(a));
      |         ^~~~~~
foo.cc:3:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    2 | #include<iostream>
  +++ |+#include <cstring>
    3 | using namespace std;
foo.cc:17:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   17 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
foo.cc:19:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   19 |             scanf("%d", a + i);
      |             ~~~~~^~~~~~~~~~~~~
foo.cc:20:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   20 |         scanf("%d", &m);
      |         ~~~~~^~~~~~~~~~
foo.cc:22:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   22 |             scanf("%d", b + i);
      |             ~~~~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1264 神秘的咒语
语言
C++
递交时间
2022-03-12 02:03:03
评测时间
2022-03-12 03:00:03
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes