結果
問題 |
No.2021 Not A but B
|
ユーザー |
|
提出日時 | 2022-08-09 22:59:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 540 bytes |
コンパイル時間 | 2,140 ms |
コンパイル使用メモリ | 199,272 KB |
最終ジャッジ日時 | 2025-01-30 19:53:29 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 TLE * 1 MLE * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) template<class T> inline bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;} template<class T> inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;} using ll = long long; int n; string s; int main () { ios::sync_with_stdio(false); cin.tie(0); 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() << '\n'; return 0; }