QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#856672#9807. Make Them BelieveHuangHanShengCompile Error//C++98801b2025-01-14 15:09:332025-01-14 15:09:33

詳細信息

answer.code: In function ‘int main()’:
answer.code:9:9: error: ‘scanf’ was not declared in this scope; did you mean ‘wscanf’?
    9 |         scanf("%s %d",name[i],&power[i]);
      |         ^~~~~
      |         wscanf
answer.code:10:9: error: ‘getchar’ was not declared in this scope
   10 |         getchar();
      |         ^~~~~~~
answer.code:2:1: note: ‘getchar’ is defined in header ‘<cstdio>’; this is probably fixable by adding ‘#include <cstdio>’
    1 | #include <iostream>
  +++ |+#include <cstdio>
    2 | #include <string>
answer.code:35:5: error: ‘printf’ was not declared in this scope
   35 |     printf("%s beats %s\n",name[win],name[lose]);
      |     ^~~~~~
answer.code:35:5: note: ‘printf’ is defined in header ‘<cstdio>’; this is probably fixable by adding ‘#include <cstdio>’