結果

問題 No.2080 Simple Nim Query
ユーザー CleyLCleyL
提出日時 2022-09-28 00:21:28
言語 cLay
(20240104-1)
結果
AC  
実行時間 152 ms / 3,000 ms
コード長 253 bytes
コンパイル時間 3,216 ms
コンパイル使用メモリ 166,436 KB
実行使用メモリ 14,116 KB
最終ジャッジ日時 2023-09-03 02:50:57
合計ジャッジ時間 4,317 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 15 ms
4,872 KB
testcase_04 AC 14 ms
4,672 KB
testcase_05 AC 152 ms
14,116 KB
testcase_06 AC 49 ms
6,764 KB
testcase_07 AC 50 ms
6,780 KB
testcase_08 AC 131 ms
12,168 KB
testcase_09 AC 130 ms
12,188 KB
testcase_10 AC 9 ms
4,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll @n,@q,t,x,y;
set<int> A;
A.insert(-1);
rep(y,n){
  rd(x);
  if(--x)A.insert(y);
}
rep(q){
  rd(t,x,y);
  if(--t){
    auto z=--A.lower_bound(y);
    wt((*z>x-2?"SF"[(y-*z)%2]:"FS"[(y-x)%2]));
  }else{
    A.insert(--x);
    if(!--y)A.erase(x);
  }
}
0