From 3285c0b7c6d6edda2d14524d2de3f7c22c8f32b4 Mon Sep 17 00:00:00 2001 From: oncsr Date: Mon, 20 Oct 2025 09:40:43 +0900 Subject: [PATCH] =?UTF-8?q?[20251020]=20BOJ=20/=20P5=20/=20AB=20/=20?= =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- khj20006/202510/20 BOJ P5 AB.md | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 khj20006/202510/20 BOJ P5 AB.md diff --git a/khj20006/202510/20 BOJ P5 AB.md b/khj20006/202510/20 BOJ P5 AB.md new file mode 100644 index 00000000..cc507630 --- /dev/null +++ b/khj20006/202510/20 BOJ P5 AB.md @@ -0,0 +1,48 @@ +```cpp +#include +using namespace std; +using ll = long long; + +int Q; +multiset a, b; + +int main() { + cin.tie(0)->sync_with_stdio(0); + + cin>>Q; + for(string o, s;Q--;) { + cin>>o>>s; + if(o == "find") { + ll ans = 0; + string tmp = ""; + int acnt[1000]{}; + for(int i=0;i>s; + if(rev) reverse(s.begin(), s.end()); + + string tmp = ""; + for(char j:s) { + tmp += j; + if(add) c.insert(tmp); + else c.erase(c.find(tmp)); + } + } + } + +} +```