結果

問題 No.2080 Simple Nim Query
コンテスト
ユーザー a a
提出日時 2022-10-14 10:18:47
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 433 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 396 ms
コンパイル使用メモリ 20,956 KB
実行使用メモリ 36,056 KB
最終ジャッジ日時 2026-03-13 05:23:32
合計ジャッジ時間 3,691 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1 RE * 2
other RE * 8
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n,q=list(map(int,input().split()))
a=[1 if i=='1' else 0 for i in input()]
for _ in range(q):
    t,x,y=list(map(int,input().split()))
    if t==1:
        if y==1:
            a[x-1]=1
        else:
            a[x-1]=0
    elif 0 in a[0:y-1]:
        if a[0:y-1:-1].index(0)%2==0:
            print("F")
        else:
            print("S")
    else:
        if y%2==1:
            print ("F")
        else:
            print("S")
0