結果
問題 |
No.4 おもりと天秤
|
ユーザー |
![]() |
提出日時 | 2017-01-04 12:23:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 327 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,248 KB |
最終ジャッジ日時 | 2024-12-16 11:08:08 |
合計ジャッジ時間 | 61,354 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 TLE * 10 |
ソースコード
import sys n=int(input()) w=[int(i) for i in input().split()] def dfs(index,right,left): if index==n: if right == left: print("possible") sys.exit() return dfs(index+1,right+w[index],left) dfs(index+1,right,left+w[index]) dfs(1,w[0],0) dfs(1,0,w[0]) print("impossible")