結果

問題 No.2672 Subset Xor Sum
ユーザー tamatotamato
提出日時 2024-03-16 03:46:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 142,296 KB
最終ジャッジ日時 2024-03-16 03:46:55
合計ジャッジ時間 6,864 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 42 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 37 ms
53,460 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 37 ms
53,460 KB
testcase_07 AC 37 ms
53,460 KB
testcase_08 AC 37 ms
53,460 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 38 ms
53,460 KB
testcase_12 AC 38 ms
53,460 KB
testcase_13 AC 39 ms
53,460 KB
testcase_14 AC 37 ms
53,460 KB
testcase_15 AC 38 ms
53,460 KB
testcase_16 AC 38 ms
53,460 KB
testcase_17 AC 38 ms
53,460 KB
testcase_18 AC 39 ms
53,460 KB
testcase_19 AC 40 ms
53,460 KB
testcase_20 AC 37 ms
53,460 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 37 ms
53,460 KB
testcase_24 AC 39 ms
53,460 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 38 ms
53,460 KB
testcase_30 AC 138 ms
131,928 KB
testcase_31 AC 75 ms
95,528 KB
testcase_32 AC 69 ms
90,220 KB
testcase_33 AC 114 ms
110,276 KB
testcase_34 AC 129 ms
131,968 KB
testcase_35 AC 132 ms
116,244 KB
testcase_36 AC 126 ms
124,968 KB
testcase_37 AC 81 ms
101,212 KB
testcase_38 AC 139 ms
142,016 KB
testcase_39 AC 55 ms
75,916 KB
testcase_40 AC 93 ms
115,236 KB
testcase_41 AC 127 ms
124,960 KB
testcase_42 AC 118 ms
110,816 KB
testcase_43 AC 149 ms
142,296 KB
testcase_44 AC 111 ms
110,096 KB
testcase_45 AC 47 ms
59,952 KB
testcase_46 AC 41 ms
59,952 KB
testcase_47 AC 42 ms
59,952 KB
testcase_48 AC 41 ms
59,952 KB
testcase_49 AC 45 ms
59,952 KB
testcase_50 AC 42 ms
59,952 KB
testcase_51 AC 45 ms
59,952 KB
testcase_52 AC 43 ms
59,952 KB
testcase_53 AC 43 ms
59,952 KB
testcase_54 AC 42 ms
59,952 KB
testcase_55 AC 44 ms
59,952 KB
testcase_56 AC 44 ms
59,952 KB
testcase_57 AC 44 ms
59,972 KB
testcase_58 AC 45 ms
53,460 KB
testcase_59 AC 43 ms
59,952 KB
testcase_60 AC 44 ms
59,968 KB
testcase_61 WA -
testcase_62 AC 46 ms
59,952 KB
testcase_63 AC 43 ms
59,952 KB
testcase_64 AC 47 ms
59,972 KB
testcase_65 AC 37 ms
53,460 KB
testcase_66 AC 38 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
mod = 998244353

N = int(input())
A = list(map(int, input().split()))

g = 0
for a in A:
    g ^= a

if g:
    print("No")
    exit()

if 0 in A:
    print("Yes")
    exit()

B = []
for a in A:
    for b in B:
        a = min(a, b ^ a)
    if a:
        B.append(a)
if len(B) >= N - 1:
    print("No")
else:
    print("Yes")
    print(B)
0