結果
問題 | No.507 ゲーム大会(チーム決め) |
ユーザー | 👑 testestest |
提出日時 | 2017-06-15 07:21:27 |
言語 | C (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 29,312 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-25 01:35:06 |
合計ジャッジ時間 | 2,895 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | AC | 1 ms
6,812 KB |
testcase_02 | AC | 1 ms
6,940 KB |
testcase_03 | AC | 1 ms
6,944 KB |
testcase_04 | AC | 1 ms
6,944 KB |
testcase_05 | AC | 1 ms
6,940 KB |
testcase_06 | AC | 1 ms
6,940 KB |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | AC | 1 ms
6,940 KB |
testcase_18 | AC | 1 ms
6,944 KB |
testcase_19 | AC | 1 ms
6,944 KB |
testcase_20 | AC | 1 ms
6,944 KB |
コンパイルメッセージ
main.c:1:3: warning: multi-character character constant [-Wmultichar] 1 | a['~~'],p,q,l,r,m,k; | ^~~~ main.c:1:1: warning: data definition has no type or storage class 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:9: warning: type defaults to 'int' in declaration of 'p' [-Wimplicit-int] 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:1:11: warning: type defaults to 'int' in declaration of 'q' [-Wimplicit-int] 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:1:13: warning: type defaults to 'int' in declaration of 'l' [-Wimplicit-int] 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:1:15: warning: type defaults to 'int' in declaration of 'r' [-Wimplicit-int] 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:1:17: warning: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:1:19: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int] 1 | a['~~'],p,q,l,r,m,k; | ^ main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | c(int*p,int*q){return*p-*q;} | ^ main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:4:15: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | for(;~scanf("%d",a+r);r++); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | a['~~'],p,q,l,r,m,k; main.c:4:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | for(;~scanf("%d",a+r);r++); | ^~~~~ main.c:4:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:5:9: warning: implicit declaration of function 'qsort' [-Wimplicit-funct
ソースコード
a['~~'],p,q,l,r,m,k; c(int*p,int*q){return*p-*q;} main(){ for(;~scanf("%d",a+r);r++); qsort(a+3,r-3,4,c); l=2; while(r-l>1){ m=l+r>>1; p=3;q=*a+1;k=0; while(p<q) p==m?p++: q==m?q--: a[p]+a[q]>a[2]+a[m]?p++,q--,k++: p++; k<a[1]?r=m:(l=m); } printf("%d",a[r]?:-1); }