結果

問題 No.2535 多重同値
コンテスト
ユーザー hato336
提出日時 2023-11-10 21:34:13
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
MLE  
実行時間 -
コード長 516 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 569 ms
コンパイル使用メモリ 85,120 KB
実行使用メモリ 762,416 KB
最終ジャッジ日時 2026-04-13 04:09:05
合計ジャッジ時間 7,082 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 MLE * 1 -- * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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