12 2023 档案

摘要:UNIQUE VISION Programming Contest 2023 Christmas (AtCoder Beginner Contest 334) A - Christmas Present 代码: #include <bits/stdc++.h> using namespace std 阅读全文
posted @ 2023-12-26 02:38 value0 阅读(22) 评论(0) 推荐(0)
摘要:Educational Codeforces Round 159 (Rated for Div. 2) A - Binary Imbalance 解题思路: 有一对\((0,1)\),那么\(0\)就能无限增长。 代码: #include <bits/stdc++.h> using namespac 阅读全文
posted @ 2023-12-17 22:51 value0 阅读(93) 评论(0) 推荐(0)
摘要:Toyota Programming Contest 2023#8(AtCoder Beginner Contest 333) A - Three Threes 代码: #include <bits/stdc++.h> using namespace std; typedef long long l 阅读全文
posted @ 2023-12-17 22:26 value0 阅读(69) 评论(0) 推荐(0)
摘要:AtCoder Beginner Contest 332 A - Online Shopping 代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6 + 10; typed 阅读全文
posted @ 2023-12-12 18:40 value0 阅读(36) 评论(0) 推荐(0)
摘要:Codeforces Round 914 (Div. 2) A - Forked! 解题思路: 枚举皇后和国王能被骑士吃到的位置,重合的点数就是答案。 代码: #include <bits/stdc++.h> using namespace std; using ll = long long; ty 阅读全文
posted @ 2023-12-11 15:54 value0 阅读(166) 评论(0) 推荐(0)
摘要:Daiwa Securities Co. Ltd. Programming Contest 2023(AtCoder Beginner Contest 331) A - Tomorrow 解题思路: 模拟。 代码: #include <bits/stdc++.h> using namespace s 阅读全文
posted @ 2023-12-08 17:39 value0 阅读(31) 评论(0) 推荐(0)
摘要:二维数点/二维偏序 模型: 给定二维点集,给定矩阵集,问每个矩阵中有多少个点。 此处二维偏序关系的问题也大都如此。 这里使用树状数组和二维前缀和容斥拆解思想求解。 例题: P2163 [SHOI2007] 园丁的烦恼 代码: #include <bits/stdc++.h> using namesp 阅读全文
posted @ 2023-12-01 16:44 value0 阅读(75) 评论(0) 推荐(0)
摘要:扫描线 应用:一般用于计算多个矩形的总面积(重叠算一次)、总周长、最大重叠区域权值等问题。 总结: 运用线段树来实现。 计算多个矩形的总面积(重叠算一次),虽然是区间修改,但是由于我们不用更新到子树上,所以不需要\(pushdown\). 最大重叠区域权值问题,一般需要需要基本转化,比如从二维数点问 阅读全文
posted @ 2023-12-01 16:35 value0 阅读(16) 评论(0) 推荐(0)