![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
文章平均质量分 67
暴打丘丘人
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #748 (Div. 3) A/B/C/D1
题单目录A. ElectionsB. Make it Divisible by 25C. Save More MiceD1. All are Same总结:A. Elections思路:分类讨论。代码:#include <bits/stdc++.h>typedef long long int LL;using namespace std;LL max(LL a,LL b,LL c){ LL maxn=max(a,b); m原创 2021-10-14 10:29:22 · 142 阅读 · 0 评论 -
2021CCPC网络选拔赛重赛 1002/1004/1006
目录1002:Kanade Doesn't Want to Learn CG1004:Primality Test1006:Nun Heh Heh Aaaaaaaaaaa总结:1002:Kanade Doesn't Want to Learn CG题意:判断篮球(质点)是否能进球。要求:质点不能碰到篮筐端点。思路:先不考虑端点判断:要么直接进球,要么弹进去。最后判断端点。(我过程中判断端点WA了,玄学)。代码:#include <bits/...原创 2021-10-13 08:29:48 · 184 阅读 · 0 评论 -
Codeforces Round #747 (Div. 2) A/B/C/E1
题单目录A:B:C:A:题意:给出n,令[l,r]区间之和等于n,求 l与r。思路:[l,r]=[-n+1,n]代码:#include <bits/stdc++.h>#define bbn 200005#define maxint 2147483647#define maxLLint 9223372036854775807#define mod 1000000007 //1e9+7const double eps=1e-7;typedef原创 2021-10-09 13:44:44 · 153 阅读 · 0 评论 -
2021 ICPC网络赛 第二场 G/J
PAT题单目录J Leaking Roof总结:J Leaking Roof题意:n*n的房顶(方格网),每个方格上有m毫升的雨,雨从高处到低处(相等时不会动),流到 h = 0 时,泄露下来。给了每个方格的高度。输出一段时间之后的方格网雨量。思路:遍历每一个点,对每一个点bfs(bfs和dfs好像混用了)。模拟流水的过程和分配。不用记录,反正只能从高处到低处。用cout会出错...题解:#include <bits/stdc++...原创 2021-09-26 22:21:21 · 360 阅读 · 0 评论 -
Educational Codeforces Round 114 (Rated for Div. 2) A/B/C/...
题单Dashboard - Educational Codeforces Round 114 (Rated for Div. 2) - CodeforcesA题意:给一个数n,打印n个2n长度的字符串,' ( ' 的数目时刻比' ) ' 的数目多或相等。思路:依次交换下标对应符号。swap(n,n+1);swap(n-1,n);swap(n-2,n-1);swap(n-3,n-2);...swap(1,2);题解:#include <bits.原创 2021-09-22 09:30:24 · 186 阅读 · 0 评论 -
Codeforces Global Round 16 A/B/C/D1
Codeforces Global Round 16 题单AC篇:A:题意:给出两个正数n,s,将s分割为n个非严格递增非负数,求中位数最大值。思路:使中位数左边(不包括中位数)全为0,右边(包括中位数)平均一下。题解:#include <bits/stdc++.h>#define bbn 200005#define maxint 2147483647#define maxLLint 9223372036854775807#define mod 10..原创 2021-09-13 07:40:27 · 153 阅读 · 0 评论 -
Educational Codeforces Round 113 (Rated for Div. 2) A/B/C/D
题目链接:A. Balanced SubstringB. Chess TournamentC. Jury MeetingD. Inconvenient Pairs目录AC篇A. Balanced SubstringB. Chess Tournament补题篇C. Jury MeetingD. Inconvenient Pairs总结:AC篇:A. Balanced Substring题意:给一个由字符‘a’ 与'b'组成的字符串。找到一段'原创 2021-09-10 22:55:35 · 323 阅读 · 0 评论 -
Codeforces Deltix Round Summer 2021 [Div.1 + Div.2] problem-A-B题解
传送1556A - A Variety of Operations1556B - Take Your Places!目录A. A Variety of OperationsB. Take Your Places!A. A Variety of Operations解释:题意:(0,0)->(a,b)需要几步。只有(+x,+x),(+x,-x),(-x,+x)三种运算;分析:(0,0)->(a,b)需要几步等价与(a,b)->(0,0)需要几步。那么有相反原创 2021-08-30 08:21:44 · 1194 阅读 · 4 评论 -
2021中国大学生程序设计竞赛(CCPC)- 网络选拔赛 题解分享 1001/1006/1009
队伍题解分享题目传送:1001 Cut The Wire1006 Power Sum1009 Command Sequence目录Cut The Wire:Power Sum:Command Sequence:Cut The Wire:解释:队友写的。#include <bits/stdc++.h>#define bbn 200005#define maxint 2147483647#define maxLLint 922337203685原创 2021-08-28 19:05:20 · 2409 阅读 · 5 评论 -
线段树入门(ACM)
功能:延迟区间加乘,加速区间查询。个人看法:将区间不断二分,直到成点。同时可以用结构体辅助记录每一段的信息:左右结点,区间和,懒惰标记。(递归思想)结构:1.根据初始数据建立线段树:函数build2.加法(减法):函数add3.乘法:函数mul4.查询区间之和:函数search例题1:加法+懒惰标记题目背景P3372 【模板】线段树 1同时适用于P3374 【模板】树状数组 1P3368 【模板】树状数组 2//build(1,1,...原创 2021-08-26 11:11:37 · 184 阅读 · 0 评论 -
2021CCPC华为云挑战赛problem-A-B
文章目录A.对象存储调度问题B.卷业务模型分析总结A.对象存储调度问题B.卷业务模型分析总结原创 2021-08-21 17:31:14 · 703 阅读 · 2 评论