摘要: C题-planet communication 用坐标判断向量平行: if (x * y1 == x1 * y && x * z1 == x1 * z && y * z1 == y1 * z) 不要用对应坐标成比例,还需要特判比例为0.思路就是假设每一个星球都需要一个光线,那么每有一个星球与某个星球 阅读全文
posted @ 2022-05-27 19:12 好腻友Π 阅读(39) 评论(0) 推荐(0)
摘要: D题(一整个没想法,那就看题解吧!) #include <bits/stdc++.h> using namespace std; typedef long long ll; void test_case() { int a, b, c, d; cin >> a >> b >> c >> d; str 阅读全文
posted @ 2022-05-27 15:26 好腻友Π 阅读(27) 评论(0) 推荐(0)
摘要: C题,找规律 在最小循环节里统计不同数的个数就行 #include <iostream> #include <cstring> #include <algorithm> #include <math.h> using namespace std; typedef long long ll; cons 阅读全文
posted @ 2022-05-20 01:02 好腻友Π 阅读(24) 评论(0) 推荐(0)
摘要: G-goblin garden guards 题目里半径最大才100,所以40000比100000小得多,就还是采用了最开始的想法。 #include <iostream> #include <cstring> #include <algorithm> #include <math.h> using 阅读全文
posted @ 2022-05-16 00:52 好腻友Π 阅读(25) 评论(0) 推荐(0)
摘要: L-candy machine 用sort过不了,用手写快排过的。 #include <iostream> #include <cstring> #include <algorithm> #include <math.h> using namespace std; typedef long long 阅读全文
posted @ 2022-05-15 00:48 好腻友Π 阅读(32) 评论(0) 推荐(0)
摘要: 区间合并: #include <bits/stdc++.h> using namespace std; typedef pair <int,int> pii; vector<pii>pos; void merge(vector<pii>&pos) { vector <pii>ans; sort(po 阅读全文
posted @ 2022-04-29 18:51 好腻友Π 阅读(23) 评论(0) 推荐(0)