QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#388837#3746. 千万别用树套树ucup-team1383Compile Error//C++981.0kb2024-04-13 20:43:562024-04-13 20:43:57

详细

answer.code: In function ‘int main()’:
answer.code:26:17: error: ‘scanf’ was not declared in this scope; did you mean ‘wscanf’?
   26 |         while (~scanf("%d %d", &n, &m)) {
      |                 ^~~~~
      |                 wscanf
answer.code:27:17: error: ‘memset’ was not declared in this scope
   27 |                 memset(ll, 0, sizeof ll);
      |                 ^~~~~~
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:39:33: error: ‘printf’ was not declared in this scope
   39 |                                 printf("%d\n", (cnt - ask(1, n, 1, b + 1, n, ll) - ask(1, n, 1, 1, c - 1, lr)));
      |                                 ^~~~~~
answer.code:2:1: note: ‘printf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
    1 |  #include<iostream>
  +++ |+#include <cstdio>
    2 | using namespace std;