結果

問題 No.387 ハンコ
ユーザー titiatitia
提出日時 2023-01-31 02:55:13
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 351 bytes
コンパイル時間 1,909 ms
コンパイル使用メモリ 86,608 KB
実行使用メモリ 827,160 KB
最終ジャッジ日時 2023-09-12 22:18:01
合計ジャッジ時間 9,950 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

LIST=[0]*(N+1)

now=0
for i in range(N):
    if B[i]==1:
        now^=(1<<i)

for i in range(N):
    LIST[A[i]]|=(now<<i)

ANS=0

for i in range(N+1):
    ANS^=LIST[i]

for i in range(2*N-1):
    if ANS & (1<<i) ==0:
        print("EVEN")
    else:
        print("ODD")
0