結果
問題 | No.1594 Three Classes |
ユーザー |
![]() |
提出日時 | 2021-07-31 16:56:24 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 110 ms / 2,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 208 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 75,648 KB |
最終ジャッジ日時 | 2024-11-16 08:31:37 |
合計ジャッジ時間 | 2,509 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
import itertools def main(): N = int(input()) E = list(map(int,input().split())) A = [0,1,2] allL = itertools.product(A, repeat=N) for L in allL: P = [0,0,0] for i,x in enumerate(L): P[x] += E[i] if P[0] == P[1] == P[2]: print('Yes');exit() print('No') if __name__ == '__main__': main()