08 2024 档案
摘要:第3题-参加博览会 不能一个一个遍历会议,因为可能会有其他会议满足要求,所以需要统计当前天数满足要求的会议,从中选择k个 #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 5; vector<pair<int, int>
阅读全文
摘要:第3题-塔塔商店 线段树,因为需要返回区间最大值的id,所以对于建树、更新、检索部分需要进行修改 #include<bits/stdc++.h> using namespace std; #define lc p<<1 #define rc p<<1|1 const int N = 1e5 + 5;
阅读全文
摘要:第三题:主要是不亲和关系的存储,其余部分通过回溯即可解决 #include<bits/stdc++.h> using namespace std; const int N = 35; int t[N]; int n; unordered_map<int, unordered_set<int>>mp;
阅读全文

浙公网安备 33010602011771号