摘要:
牛客多校训练09 I. The Great Wall II 点击查看代码 #include <bits/stdc++.h> using namespace std; const int maxn=8010; int a[maxn],dp[maxn][maxn]; int pre[maxn]; int 阅读全文
摘要:
1004 Link with Equilateral Triangle 输出No即可 点击查看代码 #include <iostream> #include <algorithm> using namespace std; typedef long long ll; const int mx=3e5 阅读全文
摘要:
CodeCraft-22 and Codeforces Round #795 D. Max GEQ Sum 题意:就是问是否对所有的pair都有这个式子成立$max(a_i,a_{i+1},…,a_{j−1},a{j})≥a_i+a_{i+1}+⋯+a_{j−1}+a_{j}$ 做法:考虑对每一个a 阅读全文
摘要:
Codeforces Round #788 (Div. 2) E.Hemose on the Tree 题意:给定一颗节点个数为$n=2^p$个的树,需要给每条边和每个点赋值(1,2*n-1),每个数不重复,要求使得一条路径上的最大异或和最小的方案 做法:其实这个有点脑经急转弯的意思,因为发现其实不 阅读全文
摘要:
The 2021 ICPC Asia Kunming Regional Contest D-Divisions 做法:我们发现,当构造成a a a b b b c c c $(a<b<c)$这样的时候,答案就是$2^{num(a)}-1+2^{num(b)}-1+2^{num(c)}-1+1$,我们 阅读全文