結果
| 問題 | No.2021 Not A but B |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-29 21:33:26 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 410 bytes |
| 記録 | |
| コンパイル時間 | 2,271 ms |
| コンパイル使用メモリ | 216,456 KB |
| 実行使用メモリ | 1,307,648 KB |
| 最終ジャッジ日時 | 2026-06-26 20:19:56 |
| 合計ジャッジ時間 | 4,854 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 MLE * 2 -- * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
static inline void solution() {
int n;
cin >> n;
string s;
cin >> s;
set<string> st;
for (int i = 0; i < n - 1; i++) {
char a = s[i], b = s[i + 1];
s[i] = 'B', s[i + 1] = 'B';
st.insert(s);
s[i] = a, s[i + 1] = b;
}
cout << st.size() << '\n';
}
int main() {
ios_base::sync_with_stdio(0), cin.tie(0);
solution();
return 0;
}