- 博客(15)
- 收藏
- 关注
原创 蓝桥杯 交换次数【第九届】【决赛】【C组】
存限制:256.0MB C/C++时间限制:1.0s Java时间限制:3.0s Python时间限制:5.0s IT产业人才需求节节攀升。业内巨头百度、阿里巴巴、腾讯(简称BAT)在某海滩进行招聘活动。 招聘部门一字排开。由于是自由抢占席位,三大公司的席位随机交错在一起,形如: ABABTATT,这使得应聘者十分别扭。 于是,管理部门要求招聘方进行必要的交换位置,使得每个集团的席位都挨在一起。即最后形如: BBAAATTT 这样的形状,当然,也可能是: AAABBTTT 等。
2022-05-10 22:03:36
850
4
原创 蓝桥杯 调手表【第九届】【决赛】【B组】
比较简单的题,看到网上题解基本都是bfs解法,发个贪心解法记录一下。#include <iostream>#include <cstring>#include <algorithm>#include <queue>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x3f...
2022-05-10 19:05:13
214
原创 蓝桥杯2022年第十三届JAVA省赛真题-数组切分
动态规划: f[i]: 1~i中 已经划分好的所有方案的集合#include <iostream>#include <cstring>#include <algorithm>#include <queue>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x...
2022-04-27 09:47:20
2977
7
原创 蓝桥杯2022年第十三届JAVA B组省赛真题-最大子矩阵
这题应该有更简单的方法做,本人太懒,直接暴力线段树+优先队列了,刚好卡时间过#include <iostream>#include <cstring>#include <algorithm>#include <queue>#include <stack>using namespace std;typedef long long LL;typedef pair<int,int>pii;const i...
2022-04-26 19:13:38
1645
1
原创 蓝桥杯2022年第十三届省赛真题-最优清零方案
#include <iostream>#include <cstring>#include <algorithm>#include <queue>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x3f3f3f3f , N = 1e6 + 10;struct Node...
2022-04-25 18:21:31
636
原创 蓝桥杯2022年第十三届省赛A组真题-青蛙过河
#include <iostream>#include <cstring>#include <algorithm>#include <stack>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x3f3f3f3f , N = 1e5 + 10;int n,m...
2022-04-21 18:37:48
750
原创 蓝桥杯2022年第十三届C++ C组省赛真题-技能升级
记录一下傻逼的自己,debug五个小时结果是最后输出没开LL。。。这题太多坑点了, 可能是做法的问题。1: 二分x,找到最后一次技能升级最多能提升多少,也有贪心的感觉,如果最后一次技能升级大于等于m次, 那么就在右区间找(肯定最后一次技能提升的最多,则答案最优)。2: 有个大坑, 如果一个技能的最后一项刚好等于x的话, 不一定要把他加到答案中,应该先放到数组里,等其他最后一项大于x的用完了,如果还有剩余才应该用x。对应看代码:#include <iost...
2022-04-16 23:18:15
2500
3
原创 蓝桥杯2022年第十三届省赛 C组 - 重新排序
贪心+差分 +前缀和。a的最大值应该分配给区间重叠部分最多的。然后根据区间分成若干部分。一次for就可以了。#include <iostream>#include <cstring>#include <algorithm>#include <queue>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod...
2022-04-15 23:08:27
926
原创 十三届蓝桥杯大赛软件类省赛A组:选数异或
#include <iostream>#include <cstring>#include <algorithm>#include <vector>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x3f3f3f3f , N = 1e5 + 10; // a[i]...
2022-04-15 19:21:18
389
原创 蓝桥杯 Log大虾【第五届】【决赛】【B组】
#include <iostream>#include <cstring>#include <algorithm>#include <cmath>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x3f3f3f3f , N = 1e5 + 10;struct edge{...
2022-03-26 22:18:23
133
原创 沧海的孤塔-chimera
SaikrVj | 沧海的孤塔-chimeraDescription为了获得连神都为之陶醉的美味「沧海淡雪糖」,美食殿堂的成员决定前往「沧海的孤塔」进行探险。现在他们到达了塔的最顶层,遇上了这座遗迹的守护魔物「奇美拉」。只有击败奇美拉,才可以获得「沧海淡雪糖」。现在美食殿堂的一行人准备对奇美拉发动攻击。由于美食殿堂成员的突然闯入惊动了天神,塔顶的天气变得非常恶劣,时不时会落下天雷,所以他们只有nn个时间单位进行攻击。在nn个时刻内,美食殿堂的成员一共可以对「奇美拉」发动mm次...
2022-03-22 20:25:19
695
原创 2020年首届算法竞赛网络挑战赛(第二季度赛)——正式赛---点名
SaikrVj | 点名平衡树模板题#include <iostream>#include <cstring>#include <algorithm>#include <vector>using namespace std;typedef long long LL;typedef pair<int,int>pii;const int mod = 1e9 + 7 , INF = 0x3f3f3f3f , N = 1e5 +
2022-03-11 21:08:34
234
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人