結果
問題 | No.156 キャンディー・ボックス |
ユーザー | testestest |
提出日時 | 2015-08-27 06:33:57 |
言語 | C90 (gcc 11.4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 182 bytes |
コンパイル時間 | 179 ms |
コンパイル使用メモリ | 24,108 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-25 18:52:10 |
合計ジャッジ時間 | 4,771 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | AC | 0 ms
4,376 KB |
testcase_02 | WA | - |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | WA | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
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 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | RE | - |
testcase_24 | AC | 0 ms
4,376 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | AC | 0 ms
4,380 KB |
testcase_30 | RE | - |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | RE | - |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);} ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘l’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘w’ [-Wimplicit-int] l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);} ^ main.c:1:11: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);} ^ main.c:1:13: warning: return type defaults to ‘int’ [-Wimplicit-int] l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);} ^~~~ main.c: In function ‘main’: main.c:1:13: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int] main.c:1:27: warning: implicit declaration of function ‘atoi’ [-Wimplicit-function-declaration] l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);} ^~~~ main.c:1:32: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);} ^~~~ main.c:1:43: warning: implicit declaration of function ‘scanf’
ソースコード
l,w[9999],i;main(j){for(l=atoi(gets(&l));~scanf("%d",w+i++););for(;--i;)for(j=0;++j<i;)w[j-1]>w[j]?w[j-1]^=w[j]^=w[j-1]^=w[j]:0;for(i=*w;i<=l&&w[j-1];i+=w[j++]);i=!printf("%d",j-1);}