結果

問題 No.2021 Not A but B
ユーザー ksukegames
提出日時 2022-08-17 22:22:05
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
MLE  
実行時間 -
コード長 845 bytes
コンパイル時間 1,788 ms
コンパイル使用メモリ 144,420 KB
実行使用メモリ 814,936 KB
最終ジャッジ日時 2024-10-05 03:50:25
合計ジャッジ時間 3,652 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 MLE * 1 -- * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <utility>
#include <tuple>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <cassert>
#include <functional>
#include <numeric>
#include <type_traits>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define coutf(f) cout << fixed << setprecision(f)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

int main() {
	int n;
	string s;
	cin >> n >> s;
	set<string> st;
	rep(i, n - 1) {
		string t = s;
		t[i] = 'B';
		t[i + 1] = 'B';
		st.insert(t);
	}
	cout << st.size() << endl;
	return 0;
}
0