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