結果
問題 |
No.2021 Not A but B
|
ユーザー |
|
提出日時 | 2022-07-29 22:24:24 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 389 bytes |
コンパイル時間 | 5,215 ms |
コンパイル使用メモリ | 323,432 KB |
実行使用メモリ | 816,472 KB |
最終ジャッジ日時 | 2024-07-19 15:30:21 |
合計ジャッジ時間 | 7,171 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 MLE * 1 -- * 21 |
ソースコード
#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; }