QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#486063#5434. Binary SubstringsMaMengQiCompile Error//C++141.7kb2024-07-21 15:37:222024-07-21 15:37:22

詳細信息

answer.code: In function ‘void clear()’:
answer.code:7:9: error: ‘memset’ was not declared in this scope
    7 |         memset(seq,0,sizeof(seq));len=0;
      |         ^~~~~~
answer.code:2:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
answer.code: In function ‘void solve()’:
answer.code:23:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   23 |         scanf("%d",&n);clear();
      |         ~~~~~^~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:54:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   54 |         freopen("tao.in","r",stdin);freopen("tao.out","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~
answer.code:54:44: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   54 |         freopen("tao.in","r",stdin);freopen("tao.out","w",stdout);
      |                                     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
answer.code:55:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   55 |         int qu;scanf("%d",&qu);while(qu--)solve();
      |                ~~~~~^~~~~~~~~~