結果

問題 No.387 ハンコ
ユーザー convexineqconvexineq
提出日時 2021-02-05 06:10:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 351 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 102,340 KB
最終ジャッジ日時 2023-09-14 04:03:32
合計ジャッジ時間 18,077 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
*a, = map(int,input().split())
b = int("".join(input().split()),2)
N = 10**5+1

r = [[] for _ in range(N)]
for i in range(n):
    r[a[i]].append(i)

res = 0
for i in range(N):
    if r[i] is None: continue
    v = 0
    for j in r[i]:
        v |= b<<j
    res ^= v

for i in bin(res)[2:][::-1]:
    print("EVEN" if i=="0" else "ODD")
0