結果

問題 No.2021 Not A but B
コンテスト
ユーザー akinyan
提出日時 2022-07-29 21:44:29
言語 C++23
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
MLE  
実行時間 -
コード長 738 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,056 ms
コンパイル使用メモリ 337,356 KB
実行使用メモリ 1,303,012 KB
最終ジャッジ日時 2026-08-18 16:43:17
合計ジャッジ時間 4,919 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 MLE * 2 -- * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using ch = char;
using ll = long long;
using ld = long double;
using db = double;
using st = string;
using vdb = vector<db>;
using vvdb = vector<vdb>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<ld>;
using vvd = vector<vd>;
using vs = vector<st>;
using vvs = vector<vs>;
using vc = vector<ch>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
const ll mod = 998244353;
const ll MOD = 1000000007;
using vp = vector<pair<ll,ll>>;
#define fi first
#define se second

int main(){
  ll N;
  cin>>N;
  st S;
  cin>>S;
  set<st> X;
  for(int i=0; i<N-1; i++){
    st T=S;
    T.at(i)='B';
    T.at(i+1)='B';
    X.insert(T);
  }
  cout<<X.size()<<endl;
}
0