結果

問題 No.387 ハンコ
ユーザー convexineqconvexineq
提出日時 2021-02-05 06:13:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 358 bytes
コンパイル時間 1,080 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 103,672 KB
最終ジャッジ日時 2023-09-14 04:06:48
合計ジャッジ時間 22,245 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 _ in range(2*n-1):
    print("ODD" if res&1 else "EVEN")
    res >>= 1
0