04 2023 档案
G2 - Magic Triples (Hard Version)
摘要:题解:值域分治,降低时间复杂度到 n*1000+map 代码1: 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> PLL; #define IOS cin.
锦标赛(天梯赛补题目)
摘要:题解:数组a存储答案,数组p存储剩余位置,每次的到抛弃的数d,如果d大于其中一个则数组满足,放置位置数组p更新为0,数组a更新为d,空余的位置更新为max(d); 另外 ,每次输入d迭代下最大值ma,与最后胜利者比较。 代码: 点击查看代码 #include<bits/stdc++.h> using