結果

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

ソースコード

diff #
raw source code

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