結果

問題 No.2021 Not A but B
ユーザー yukster714
提出日時 2023-04-21 19:48:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
MLE  
実行時間 -
コード長 330 bytes
コンパイル時間 1,660 ms
コンパイル使用メモリ 172,928 KB
実行使用メモリ 814,160 KB
最終ジャッジ日時 2024-11-06 13:39:03
合計ジャッジ時間 4,127 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 MLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i<n;i++)
using namespace std;
int main() {
    int n; cin >> n;
    string s; cin >> s;
    int ans = 0;
    set<string> seen;
    rep(i, n-1){
        string t = s;
        t[i]='B';t[i+1]='B';
        seen.insert(t);
    }
    cout << seen.size() << endl;
    return 0;
}
0