- 博客(5)
- 收藏
- 关注
转载 Loi_Cunese|CODEVS|1557|热浪
#include#include#include#includeusing namespace std;int t,C,S,e,tot=0;struct hh{ int f,t,c;}a[12500];int head[6500],jl[6500],ne[12500];bool bo[6500];queueq;void build(int x,int y,int z
2016-11-15 20:59:46
426
转载 Loi_Cunese|最小生成树Prim
#include#include#includeusing namespace std;const int inf=0x3f; int n,jl[105];int a[104][105];bool bo[105];int cs=1,tot=0;int main(){ memset(bo,0,sizeof(bo)); cin>>n; for(int i=1;i<=n;i++
2016-11-15 20:56:27
388
原创 2016.11.15|知识整理
tape1.取模的运算规则:(a*b)%c=[(a%c)*(b%c)]%c 可用于加减乘的运算,不能用于除的运算,转化后的式子复杂度更低,一般数据不会爆long long.tape2.最大公因数: #include__gcd(a,b); 最小公倍数: a*b/(__gcd(a,b));//两数之积除以最大公因数等于最小公倍数.tape3.
2016-11-15 18:29:14
335
1
原创 CODEVS|1008|数的计算
#include#includeusing namespace std;int tot=1;void js(int x){ if(x==1) return; x=x/2; for(int i=1;i<=x;i++) { tot++; js(i); }}int main(){ int n; cin>>n; js(n); cout<<tot;}
2016-11-14 21:00:43
425
1
原创 CODEVS|1053|笨小猴
#include#include#include#includeusing namespace std;string w;char h[110];int hh[110];char ch;int n,m,cs=0;int jg;int main(){ memset(hh,0,sizeof(hh)); cin>>w; int l=w.length(); for(int
2016-11-14 20:57:36
393
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人