結果
問題 |
No.2535 多重同値
|
ユーザー |
|
提出日時 | 2023-11-10 21:34:13 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 516 bytes |
コンパイル時間 | 279 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 632,688 KB |
最終ジャッジ日時 | 2024-09-26 01:12:38 |
合計ジャッジ時間 | 6,643 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 MLE * 1 -- * 3 |
ソースコード
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')