QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#786734#9783. Duloc Networkucup-team5046Compile Error//C++142.3kb2024-11-26 23:10:232024-11-26 23:10:24

Details

answer.code: In function ‘int main()’:
answer.code:28:5: error: ‘memset’ was not declared in this scope
   28 |     memset(in,0,sizeof(in));
      |     ^~~~~~
answer.code:4:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
answer.code: In function ‘int query(std::vector<int>)’:
answer.code:18:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   18 |     scanf("%d",&y);
      |     ~~~~~^~~~~~~~~
answer.code: In function ‘int main()’:
answer.code:25:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   25 |     scanf("%d",&n);
      |     ~~~~~^~~~~~~~~