QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#859243#9717. Defuse the BombszhenghanyunCompile Error//C99211b2025-01-17 16:44:082025-01-17 16:44:25

Judging History

你现在查看的是最新测评结果

  • [2025-01-17 16:44:25]
  • 评测
  • [2025-01-17 16:44:08]
  • 提交

answer

#define x scanf("%d",
long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}

详细

answer.code:2:18: warning: multi-character character constant [-Wmultichar]
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                  ^~~~
answer.code:2:24: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                        ^~~~
answer.code: In function ‘main’:
answer.code:2:24: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int]
answer.code:1:11: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    1 | #define x scanf("%d",
      |           ^~~~~
answer.code:2:36: note: in expansion of macro ‘x’
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                    ^
answer.code:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | #define x scanf("%d",
answer.code:1:11: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    1 | #define x scanf("%d",
      |           ^~~~~
answer.code:2:36: note: in expansion of macro ‘x’
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                    ^
answer.code:1:11: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
    1 | #define x scanf("%d",
      |           ^~~~~
answer.code:2:36: note: in expansion of macro ‘x’
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                    ^
answer.code:1:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
    1 | #define x scanf("%d",
      |                 ^~~~
answer.code:2:36: note: in expansion of macro ‘x’
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                    ^
answer.code:1:19: note: format string is defined here
    1 | #define x scanf("%d",
      |                  ~^
      |                   |
      |                   int *
      |                  %ld
answer.code:2:45: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                             ^~~~~~
answer.code:2:45: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
answer.code:2:45: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
answer.code:2:45: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
answer.code:2:60: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                                           ~^        ~~~
      |                                                            |        |
      |                                                            int      long int
      |                                                           %ld
answer.code:2:64: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
    2 | long q,c,n,m,s,a['一'];main(i){for(x&q);c^q;printf("Case #%d: %d\n",++c,m)){for(x&n),i=n;i;x --i+a));sort(a,a+n);s=a[0];a[n]=3e9;for(i=1;i<n;++i){s+=a[i];m=s/j>=a[j]&&s/j<=a[j+1]?s/j:m;}}
      |                                                               ~^        ~
      |                                                                |        |
      |                                                                int      long int
      |                                                               %ld
answer.code:1:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
    1 | #define x scanf("%d",
      |                 ^~~~
answer.code:2:81: note: in expansion of macro ‘x’
  ...