#include <bits/stdc++.h> #define INF (1<<25) #define MAXN 200005 #define getSZ(p) (p?p->sz:0) #define getSUM(p) (p?p->sum:0) using namespace std; type ...
分类:
其他好文 时间:
2020-08-28 14:34:02
阅读次数:
43
1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxn=1e5+5; 4 bool isprime[maxn]; 5 int prime[maxn]; 6 int mu[maxn]; 7 int cnt=0; 8 void ...
分类:
其他好文 时间:
2020-08-24 16:36:48
阅读次数:
60
点击查看代码块 #include <bits/stdc++.h> #define ed end() #define bg begin() #define mkp make_pair #define pb push_back #define vv(T) v(v(T)) #define v(T) vec ...
分类:
其他好文 时间:
2020-08-21 16:38:12
阅读次数:
84
这道题的数据是不是有点水?还是题目描述有问题? #include<bits/stdc++.h> #define x first #define y second using namespace std; const int N=1005; typedef pair<int,int> PII; int ...
分类:
其他好文 时间:
2020-08-17 17:32:42
阅读次数:
60
打水问题: 删数问题: #include<bits/stdc++.h> #define MAXN 10000 using namespace std; int main() { string s; int len,k; cin>>s>>k; len=s.size(); for(int t=1;t<= ...
分类:
编程语言 时间:
2020-08-13 12:15:44
阅读次数:
59
题目链接https://loj.ac/problem/6277 1 #include<bits/stdc++.h> 2 3 using namespace std; 4 typedef long long ll; 5 const int maxn = 1e5 + 10; 6 const int in ...
分类:
其他好文 时间:
2020-08-08 21:23:31
阅读次数:
77
题意:n段木棍,每个长度为a[i],求切割K次后,使得的最长的木棍长度最短,输出此时最长的木棍长度。n<2e5,k<1e9 题解:切割次数越多,切割后的长度越短,满足单调性,可二分切割后,最长的木棍不大于多少,check判断切割次数是否小于K次即可。 #include <bits/stdc++.h> ...
分类:
其他好文 时间:
2020-08-08 11:47:52
阅读次数:
81
Prim算法 复杂度:O(N*N) #include<bits/stdc++.h> using namespace std; const int maxn = 1005; int n; int d[maxn], vis[maxn], mat[maxn][maxn]; int main(){ int ...
分类:
其他好文 时间:
2020-08-08 00:31:58
阅读次数:
61
题意: 分析: 代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod=1e9+7; const int N=1e6+6; int mu[N]; int prime[N],cnt; b ...
分类:
其他好文 时间:
2020-08-07 12:39:20
阅读次数:
82
点击查看代码块 /* 找字典序最小的欧拉路,也可以做欧拉回路 */ #include <bits/stdc++.h> #define ed end() #define bg begin() #define mp make_pair #define pb push_back #define v(T) ...
分类:
其他好文 时间:
2020-08-07 12:35:13
阅读次数:
76