摘要:
牛客多校训练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(ai,ai+1,…,aj−1,aj)≥ai+ai+1+⋯+aj−1+ajmax(ai,ai+1,…,aj−1,aj)≥ai+ai+1+⋯+aj−1+aj 做法:考虑对每一个a 阅读全文
摘要:
Codeforces Round #788 (Div. 2) E.Hemose on the Tree 题意:给定一颗节点个数为n=2p个的树,需要给每条边和每个点赋值(1,2*n-1),每个数不重复,要求使得一条路径上的最大异或和最小的方案 做法:其实这个有点脑经急转弯的意思,因为发现其实不 阅读全文