結果
問題 |
No.2308 [Cherry 5th Tune B] もしかして、真?
|
ユーザー |
|
提出日時 | 2023-05-19 23:23:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 476 bytes |
コンパイル時間 | 96 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 58,056 KB |
最終ジャッジ日時 | 2024-12-20 01:54:44 |
合計ジャッジ時間 | 113,591 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 37 |
ソースコード
t=int(input()) for _ in range(t): n=int(input()) X=[True if _=="True" else False for _ in input().split()] Y=list(input().split()) S=list(map(int,input().split())) for s in S: y=Y[s-1] if y=='and': X=X[0:s-1] + [X[s-1] and X[s]] + X[s+1:] elif y=='or': X=X[0:s-1] + [X[s-1] or X[s]] + X[s+1:] elif y=='xor': X=X[0:s-1] + [X[s-1] != X[s]] + X[s+1:] elif y=='imp': X=X[0:s-1] + [X[s] if X[s-1] else True] + X[s+1:] Y=Y[0:s-1]+Y[s:] print(X[0])