摘要:题目:传送门 题意 思路 图文题解 将每条边的 a 和 b 看成二维坐标系上的点 (a,b),然后找到这些点中距离 y 轴最近的点(即 x 最小的点) A 和 距离 x 轴最近的点 B(y最小的那个点)。也就是现在我们知道了两个方案 A 和 B,假设现在有一个更优的方案 C,那么 C 在二维坐标系上
阅读全文
摘要:题目:传送门 复杂度 O(NloglogN) #include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define UI unsigned int #define mem(i, j) memset(i
阅读全文
摘要:题目:传送门 思路: 求面积和求周长是一样的思路。 求面积的步骤可 戳 #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <queue> #include <map> #i
阅读全文
摘要:去吧,皮皮卡丘 #include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include <deque> #include <vector> #include <qu
阅读全文