結果

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

テストケース

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

ソースコード

diff #

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