QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#321366#8008. Fortune WheelHuangHanShengCompile Error//C++231.9kb2024-02-04 15:43:122024-02-04 15:43:13

Details

answer.code: In function ‘int main()’:
answer.code:60:10: error: ‘sort’ is not a member of ‘std’; did you mean ‘qsort’?
   60 |     std::sort(a, a + n);
      |          ^~~~
      |          qsort
answer.code:81:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Wformat=]
   81 |         printf("%lld %lld\n", res.first + res.second, res.second);
      |                 ~~~^          ~~~~~~~~~~~~~~~~~~~~~~
      |                    |                    |
      |                    long long int        long int
      |                 %ld
answer.code:81:25: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘long int’ [-Wformat=]
   81 |         printf("%lld %lld\n", res.first + res.second, res.second);
      |                      ~~~^                             ~~~~~~~~~~
      |                         |                                 |
      |                         long long int                     long int
      |                      %ld
answer.code:34:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   34 |     scanf("%d%d%d", &n, &x, &k);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~
answer.code:36:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   36 |         scanf("%d", &K[i]);
      |         ~~~~~^~~~~~~~~~~~~