摘要:
F Auxiliary Set 树上LCA + DFS 注意一下输出格式! #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int t, n, q, ans; int fa[N]; // 存储点i的父亲节点 i 阅读全文
摘要:
C. Manipulating History 题意:给出一些字符串,有原始串(只含一个字符的串)、被替换的串、替换串、 最终串(最后一行),求原始串。 2 a ab b cd acd Initially s is "a". In the first operation, Keine chooses 阅读全文
摘要:
1、E - Fridge 教训:做题的时候,没有想清楚问题,把问题复杂化了 #include <bits/stdc++.h> #define int long long using namespace std; const int N = 1010; string st; int cnt[N], m 阅读全文