結果

問題 No.1594 Three Classes
ユーザー googol_S0googol_S0
提出日時 2021-07-09 21:25:45
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 229 bytes
コンパイル時間 796 ms
使用メモリ 81,012 KB
最終ジャッジ日時 2022-12-17 01:23:29
合計ジャッジ時間 4,010 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 127 ms
80,992 KB
testcase_01 AC 82 ms
75,696 KB
testcase_02 AC 81 ms
75,788 KB
testcase_03 AC 93 ms
80,208 KB
testcase_04 AC 120 ms
80,964 KB
testcase_05 AC 122 ms
80,784 KB
testcase_06 AC 83 ms
75,576 KB
testcase_07 AC 95 ms
80,204 KB
testcase_08 AC 126 ms
80,980 KB
testcase_09 AC 124 ms
80,984 KB
testcase_10 AC 125 ms
80,960 KB
testcase_11 AC 125 ms
80,936 KB
testcase_12 AC 122 ms
81,012 KB
testcase_13 AC 83 ms
75,552 KB
testcase_14 AC 99 ms
80,608 KB
testcase_15 AC 99 ms
80,880 KB
testcase_16 AC 98 ms
80,992 KB
testcase_17 AC 95 ms
80,068 KB
testcase_18 AC 83 ms
75,664 KB
testcase_19 AC 89 ms
79,992 KB
testcase_20 AC 95 ms
80,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
E=list(map(int,input().split()))
def dfs(i,x,y,z):
  if i==N:
    if x==y==z:
      print('Yes')
      exit()
    return 0
  dfs(i+1,x+E[i],y,z)
  dfs(i+1,x,y+E[i],z)
  dfs(i+1,x,y,z+E[i])

dfs(0,0,0,0)
print('No')
0