摘要: #include<bits/stdc++.h>using namespace std;int f[200010];//代表元long long rl[200010];//记rl[i]为结点i到根的路径上所有边的亦或和(这里可以忽视 x(0)的情况)void init(int n){ for(int 阅读全文
posted @ 2018-08-22 19:47 sewage 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;double c[110][110];double g[110];double dp[110][110];int n,m,k;void cnm(){ c[0][0]=1; for(int i=1;i<=100;i+ 阅读全文
posted @ 2018-08-21 20:25 sewage 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;vector<int>tree[1000010];int sum=0;int dfs(int x, int y){ int first = 0, second = 0; for (int i = 0; i < tr 阅读全文
posted @ 2018-08-20 09:57 sewage 阅读(139) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int ab[10];struct node{ int hp,num;//num为了方便跟踪每一个hp值 bool operator < (const node &x)const{ return hp>x.hp;/ 阅读全文
posted @ 2018-08-19 20:50 sewage 阅读(181) 评论(0) 推荐(0) 编辑
摘要: //代码跑的很慢四秒会超时,结尾附两秒代码(标程) #include<bits/stdc++.h>using namespace std;typedef long long ll;const ll inf=0x3f3f3f3f;vector<pair<int,int>>tree[100010];ll 阅读全文
posted @ 2018-08-19 20:45 sewage 阅读(373) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;long long sum=0;struct node{ int a,b,len;}road[500010];int pre[500010];bool cmp(node a,node b){ return a.le 阅读全文
posted @ 2018-08-19 20:41 sewage 阅读(206) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const long long mod=1000000007,inv=570000004;long long i,j,n,m,a[1010]/*成功几率*/,sum=0,dp[1010][1010]/*动态规划*/ 阅读全文
posted @ 2018-08-17 12:23 sewage 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;typedef long long ll;const int mod = 1e9+7;const int inf = 0x3f3f3f3f;const int mx = 1e6+5;struct node{ int 阅读全文
posted @ 2018-08-16 20:35 sewage 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int a[100010];char s[20];int zhiren[100010];vector<int>haoren[100010];int sum=0;void dfs(int x,int y,int fl 阅读全文
posted @ 2018-08-16 19:24 sewage 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;const int maxn = 0x3f3f3f3f;int mn[801000];int cost[200100];int dp[200100];vector<int>v[200100];void add_ed 阅读全文
posted @ 2018-08-13 07:41 sewage 阅读(307) 评论(0) 推荐(0) 编辑