771

Codeforces Round #771 (Div. 2) A-E

# A ## 代码 ```c++ #include using namespace std; using ll = long long; int p[507]; bool solve() { int n; cin >> n; for (int i = 1;i > p[i]; int pos1 = 0 ......
Codeforces Round 771 A-E Div

Codeforces Round 771 (Div.2) C

刚开始c题用dp做的,一直没做出来 ## B. Odd Swap Sort [Problem - B - Codeforces](https://codeforces.com/contest/1638/problem/B) ### 题意 给定一个序列$a$,如果$a_i$与$a_{i+1}$的和为奇 ......
Codeforces Round 771 Div

CF771C

提供一个不需要换根的树形 $\text{dp}$ 做法。 假如只有一次询问,那么答案为树上两点间距离除以 $k$ 向上取整,那么很自然地想到能否直接求树上所有路径长度和,然后除以 $k$ 向上取整?显然是不行的,因为每条路径长除以 $k$ 的余数合并后可能错误地减少贡献。于是我们考虑将路径长除以 $ ......
771C 771 CF

CF771C Bear and Tree Jumps

# CF771C Bear and Tree Jumps [link](https://codeforces.com/problemset/problem/771/C) 赛时脑子抽了没想出来,其实思路已经沾边了,但是……唉,还是太菜了 qwq。 ## 题意: 给你一颗有 $n$ 个点的树,和每次能走 ......
Jumps 771C Bear Tree 771

AcWing 771. 字符串中最长的连续出现的字符

AcWing 771. 字符串中最长的连续出现的字符 1. 地址 https://www.acwing.com/problem/content/description/773/ 2. 题解 #include <iostream> #include <cstdio> #include <string> ......
字符 字符串 AcWing 771
共5篇  :1/1页 首页上一页1下一页尾页