10 2021 档案

摘要:https://www.luogu.com.cn/problem/P2118 分析 枚举即可,因为L<=100。 #include <bits/stdc++.h> using namespace std; #define LL long long #define INF 0x3fffffff i 阅读全文
posted @ 2021-10-28 16:38 Tsyxxxka 阅读(386) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P2239 分析 先剥掉x层再做。特判n=1,2时。 #include <bits/stdc++.h> using namespace std; #define LL long long int main() { int n, 阅读全文
posted @ 2021-10-28 15:31 Tsyxxxka 阅读(139) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P2141 #include <bits/stdc++.h> using namespace std; #define LL long long int a[110]; int main() { int n,cnt=0; cin>>n 阅读全文
posted @ 2021-10-25 21:04 Tsyxxxka 阅读(184) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P7911?contestId=54994 #include <bits/stdc++.h> using namespace std; #define LL long long #define P pair<string,int> s 阅读全文
posted @ 2021-10-25 20:41 Tsyxxxka 阅读(749) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P7910?contestId=54994 分析 排序做成O(n)复杂度即可。 #include <bits/stdc++.h> using namespace std; #define LL long long struct s 阅读全文
posted @ 2021-10-24 21:29 Tsyxxxka 阅读(1107) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P7909?contestId=54994 分析 无。 #include <bits/stdc++.h> using namespace std; #define LL long long LL n,l,r; int main() { 阅读全文
posted @ 2021-10-24 18:44 Tsyxxxka 阅读(339) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/contest/1593/problem/D2 分析 枚举选中的n/2个数中最小的数,然后枚举大于其的数的所有因子,如果拥有某个因子的数的个数大于n/2,则选中,求符合条件的最大的因子即可。 #include <bits/stdc++.h> us 阅读全文
posted @ 2021-10-21 20:28 Tsyxxxka 阅读(26) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/contest/1593/problem/D1 分析 求最大公因子。 #include <bits/stdc++.h> using namespace std; #define LL long long int t,n,a[45],d[45]; int 阅读全文
posted @ 2021-10-21 16:57 Tsyxxxka 阅读(29) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/contest/1593/problem/C 分析 考虑到必须首先移动距离hole最近的mouse,因为,如果需要为了避免距离cat近的mousecat吃掉而去移动它,那么最后必然面临着“差一步即追及”的局面,最终这种局面会变成$c 阅读全文
posted @ 2021-10-20 21:34 Tsyxxxka 阅读(91) 评论(0) 推荐(0) 编辑
摘要:https://codingcompetitions.withgoogle.com/kickstart/round/00000000004362d6/00000000008b3771 分析 签到题。 按照题意模拟。 #include <bits/stdc++.h> using namespace s 阅读全文
posted @ 2021-10-18 16:30 Tsyxxxka 阅读(30) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P2822 分析 杨辉三角 + 模运算 + 前缀和 #include <bits/stdc++.h> using namespace std; int t,k,n,m,ans,y[2010][2010],done=1,s[2010][ 阅读全文
posted @ 2021-10-17 17:37 Tsyxxxka 阅读(24) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P1967 分析 题意为求任意两城市之间能够联通的线路中所有单个线路中最小值的最大值。 首先做最大生成树生成数组tree,然后dfs每棵树获得数组deep(deep[i]表示i节点在所属的树中的深度,根节点深度为$ 阅读全文
posted @ 2021-10-14 20:59 Tsyxxxka 阅读(33) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P3379 分析 模板题。 #include <bits/stdc++.h> using namespace std; int N,M,S,deep[500010],p[500010][21],fa[500010],x,y,maxde 阅读全文
posted @ 2021-10-13 21:15 Tsyxxxka 阅读(22) 评论(0) 推荐(0) 编辑
摘要:https://leetcode-cn.com/problems/min-cost-to-connect-all-points/ 分析 模板题。 #define P pair<int, int> #define PI pair<int, P> class Solution { public: vec 阅读全文
posted @ 2021-10-11 21:05 Tsyxxxka 阅读(22) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P1546 分析 模板题。 #include <bits/stdc++.h> #define P pair<int, int> #define PI pair<int, P> //路径长度,路径端点 using namespace s 阅读全文
posted @ 2021-10-11 20:52 Tsyxxxka 阅读(35) 评论(0) 推荐(0) 编辑
摘要:https://leetcode-cn.com/problems/er-cha-shu-ran-se-UGC/ 分析 dp做法,f[x][i]=p 表示以x为根节点的子树中,根节点x联通i个蓝色点(包括它本身),这种情况下最大和是p,那么转移方程就有如下分析: 1、$f[x] 阅读全文
posted @ 2021-10-10 19:16 Tsyxxxka 阅读(109) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/contest/1592/problem/A 分析 就最大两张卡牌轮流上。 #include <bits/stdc++.h> using namespace std; int t,n,h,a,maxf,maxs; int main() { scanf(" 阅读全文
posted @ 2021-10-10 11:35 Tsyxxxka 阅读(39) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/contest/1592/problem/C ##分析 本题从“异或”的性质出发,已知一棵树若能符合题意地被分割成 i(2~k)个部分,那么它就可以被符合题意地分割成 i-2 个部分,则只需要考虑原来的树能否被符合题意地分割成 2 或 3 个部分。当 k 阅读全文
posted @ 2021-10-08 22:21 Tsyxxxka 阅读(40) 评论(0) 推荐(0) 编辑
摘要:https://codingcompetitions.withgoogle.com/kickstart/round/00000000004361e3/000000000082b933#problem 分析 由题意可知是有一些区间,求最多砍C刀能够把他们分成的区间个数,那么只需要记录各个区间的起点 阅读全文
posted @ 2021-10-06 17:28 Tsyxxxka 阅读(34) 评论(0) 推荐(0) 编辑
摘要:https://codeforces.com/contest/1592/problem/B 分析 由本题题意得知,假设有S,A,B,ES,E是开头结尾,A,B是需要交换的逆序对,则|AB|x时可以直接交换,|AB|<x时只需要保证S,B以及A,E之间能够 阅读全文
posted @ 2021-10-05 21:55 Tsyxxxka 阅读(63) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P3367 分析 模板题。 #include <bits/stdc++.h> using namespace std; int N,M,fa[10010]={0},z,x,y; int find(int n) { return n== 阅读全文
posted @ 2021-10-05 20:35 Tsyxxxka 阅读(50) 评论(0) 推荐(0) 编辑
摘要:https://leetcode-cn.com/problems/DFPeFJ/ 分析 #define P pair<int, int> #define PP pair<int,P> //时间 城市 电量 class Solution { public: //f[i][j]表示从start到i城市且 阅读全文
posted @ 2021-10-05 19:39 Tsyxxxka 阅读(64) 评论(0) 推荐(0) 编辑
摘要:https://www.luogu.com.cn/problem/P3958 ##分析 把奶酪下表面看作点0,中间n个洞看作点1n,上表面看作点n+1,由于数据范围较小,可以直接先判断出点与点之间的联通状态,然后判断0n+1点之间有无联通路径。 #include <bits/stdc++.h> us 阅读全文
posted @ 2021-10-01 22:30 Tsyxxxka 阅读(35) 评论(0) 推荐(0) 编辑

levels of contents
点击右上角即可分享
微信分享提示