2023-10-09から1日間の記事一覧

AtCoder arc166 A - Replace C or Swap AB

A - Replace C or Swap AB 公式解説 を元に解いたのでメモ。 解説を見てもなかなかシュッと実装できなくて難しい #include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<n;i++) #define endl '\n' int main() { int t; cin >> t; REP(_,t) { int n; string x,y; cin >> n >> x >> y; x += 'C'; y += 'C</n;i++)></bits/stdc++.h>…