結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 15 ms
7,812 KB
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[x-1:y-1]:
        if a[x-1:y-1:-1].index(0)%2==0:
            print("F")
        else:
            print("S")
    else:
        if (x-y)%2==1:
            print ("F")
        else:
            print("S")
0