QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#321364#8008. Fortune WheelZhaoZiLongCompile Error//C++231.9kb2024-02-04 15:42:552024-02-04 15:42:56

詳細信息

answer.code: In function ‘int main()’:
answer.code:37:5: error: ‘memset’ was not declared in this scope
   37 |     memset(d, 0x3f, sizeof(d));
      |     ^~~~~~
answer.code:3:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
    2 | #include <queue>
  +++ |+#include <cstring>
    3 | 
answer.code:59:10: error: ‘sort’ is not a member of ‘std’; did you mean ‘qsort’?
   59 |     std::sort(a, a + n);
      |          ^~~~
      |          qsort
answer.code:80:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Wformat=]
   80 |         printf("%lld %lld\n", res.first + res.second, res.second);
      |                 ~~~^          ~~~~~~~~~~~~~~~~~~~~~~
      |                    |                    |
      |                    long long int        long int
      |                 %ld
answer.code:80:25: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘long int’ [-Wformat=]
   80 |         printf("%lld %lld\n", res.first + res.second, res.second);
      |                      ~~~^                             ~~~~~~~~~~
      |                         |                                 |
      |                         long long int                     long int
      |                      %ld
answer.code:33:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   33 |     scanf("%d%d%d", &n, &x, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~
answer.code:35:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   35 |         scanf("%d", &K[i]);
      |         ~~~~~^~~~~~~~~~~~~