結果
問題 | No.387 ハンコ |
ユーザー | convexineq |
提出日時 | 2021-02-05 06:15:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 3,586 ms / 5,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 87,344 KB |
実行使用メモリ | 104,092 KB |
最終ジャッジ日時 | 2023-09-14 11:03:10 |
合計ジャッジ時間 | 29,729 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 3,586 ms
104,092 KB |
testcase_01 | AC | 3,580 ms
103,724 KB |
testcase_02 | AC | 2,778 ms
101,940 KB |
testcase_03 | AC | 2,788 ms
102,092 KB |
testcase_04 | AC | 568 ms
86,444 KB |
testcase_05 | AC | 1,507 ms
93,360 KB |
testcase_06 | AC | 2,547 ms
98,584 KB |
testcase_07 | AC | 3,488 ms
100,284 KB |
testcase_08 | AC | 3,478 ms
99,896 KB |
ソースコード
n = int(input()) *a, = map(int,input().split()) b = int("".join(input().split())[::-1],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