結果

問題 No.2080 Simple Nim Query
ユーザー a aa a
提出日時 2022-10-14 10:18:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 433 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 27,320 KB
最終ジャッジ日時 2023-09-08 19:35:18
合計ジャッジ時間 1,411 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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