結果
| 問題 |
No.4 おもりと天秤
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2016-02-11 19:01:45 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 121 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 09:25:01 |
| 合計ジャッジ時間 | 1,395 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
| ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘w’ [-Wimplicit-int]
main.c:1:10: warning: data definition has no type or storage class
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
| ^
main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
main.c:1:12: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
| ^~~~
main.c: In function ‘main’:
main.c:1:12: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:26: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
main.c:1:26: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
| ^~~~~
main.c:1:26: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:1:83: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
1 | w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i
ソースコード
w[10000];n;main(i){for(;~scanf("%d",&n);)for(*w+=n*!~i,i=1e4;i--;w[i+n]+=w[i]);n=!puts("impossible"+(w[*w/2]&&~*w%2)*2);}
testestest