結果
| 問題 | No.2021 Not A but B |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-29 22:24:24 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 3,868 ms |
| コンパイル使用メモリ | 355,108 KB |
| 実行使用メモリ | 2,610,120 KB |
| 最終ジャッジ日時 | 2026-04-02 17:13:56 |
| 合計ジャッジ時間 | 5,643 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 MLE * 2 -- * 20 |
ソースコード
#include <bits/extc++.h>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
set<string> st;
string t = "BB" + s.substr(2);
st.insert(t);
for (int i = 1; i < n-1; ++i) {
t = s.substr(0, i) + "BB" + s.substr(i+2);
// std::cerr << t << '\n';
st.insert(t);
}
cout << st.size() << '\n';
return 0;
}