結果
問題 |
No.4 おもりと天秤
|
ユーザー |
![]() |
提出日時 | 2021-11-09 12:14:59 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 424 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 141,568 KB |
最終ジャッジ日時 | 2024-11-18 09:27:36 |
合計ジャッジ時間 | 61,657 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 TLE * 10 |
ソースコード
import itertools n = int(input()) w = [int(x) for x in input().split()] all_pattern = itertools.product("rl",repeat=n) for p in all_pattern: right = 0 left = 0 possibility = "impossible" for i in range(n): if p[i] == "r": right += w[i] else: left += w[i] if right == left: possibility = "possible" break print(possibility)