摘要:
https://www.luogu.com.cn/problem/P2661 #include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 5; int fa[maxn]; int cnt,n,a,ans = 0x3f3f3 阅读全文
posted @ 2020-02-28 20:54
Hazelxcf
阅读(100)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P1197 #include<bits/stdc++.h> using namespace std; const int maxn = 4e5 + 5; int a, b, n, m, k; int head[maxn], tot, 阅读全文
posted @ 2020-02-28 19:48
Hazelxcf
阅读(164)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P1908 归并排序是用来求逆序对的 归并排序的思想就是分治 #include <bits/stdc++.h> using namespace std; #define int long long const int maxn = 5 阅读全文
posted @ 2020-02-28 16:15
Hazelxcf
阅读(156)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P1010 刚刚看到这个题时,有点懵,如果说这是个数学题 比如说7,应该先求出7 = 4 + 2 + 1; 即先分解出里面应该有最多的2的个数,然后再往下递推 算出2的多少次幂最接近给出的n; 用原来n的数减去2的幂,如果这个数大于2 阅读全文
posted @ 2020-02-28 15:43
Hazelxcf
阅读(171)
评论(0)
推荐(0)
摘要:
https://www.luogu.com.cn/problem/P3386 #include <bits/stdc++.h> using namespace std; const int maxn = 1e3 + 10; int n,m,e,link[maxn][maxn],ans; int us 阅读全文
posted @ 2020-02-28 12:12
Hazelxcf
阅读(141)
评论(0)
推荐(0)

浙公网安备 33010602011771号