結果

問題 No.2535 多重同値
ユーザー hato336hato336
提出日時 2023-11-10 21:34:13
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 516 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 619,276 KB
最終ジャッジ日時 2023-11-10 21:34:21
合計ジャッジ時間 7,559 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
91,980 KB
testcase_01 AC 137 ms
85,176 KB
testcase_02 AC 139 ms
85,176 KB
testcase_03 AC 140 ms
85,176 KB
testcase_04 AC 140 ms
85,176 KB
testcase_05 AC 144 ms
85,176 KB
testcase_06 AC 141 ms
85,176 KB
testcase_07 AC 138 ms
85,176 KB
testcase_08 AC 141 ms
85,176 KB
testcase_09 AC 139 ms
85,176 KB
testcase_10 AC 141 ms
85,176 KB
testcase_11 AC 140 ms
85,176 KB
testcase_12 AC 143 ms
85,176 KB
testcase_13 AC 173 ms
85,048 KB
testcase_14 AC 169 ms
89,400 KB
testcase_15 AC 919 ms
296,448 KB
testcase_16 MLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
input = sys.stdin.readline
n = int(input())
alist = []
for i in range(n):
    s = input()
    if s[0] == 'Y':
        alist.append(0)
    else:
        alist.append(1)

@functools.lru_cache(maxsize=1000000)
def calc(l,r):
    if l == r:
        return alist[r]
    return alist[l] ^ calc(l+1,r)
for i in range(n):
    print('Yes' if calc(0,i) == 0 else 'No')
0