Educational Codeforces Round 181 (Div. 2) の A〜D 問題の解法
問題リンク: https://codeforces.com/contest/2125
A. Difficult Contest
解法
「NTT」と「FFT」はどちらも部分列として T が後ろに来る必要がある。したがって、まず F と N 以外の文字をすべて出力し、その後で F と N を出力すればよい。
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
...
10月5日 11:00 投稿