上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 45 下一页
摘要: #include #include using namespace std; const int N=1000000; int p[N],n,m,nop[N],cnt,sum,ans[N]; int main(){ scanf("%d%d",&n,&m); nop[1]=1; for(int i=2;im){puts("Crossing the line"); co... 阅读全文
posted @ 2017-10-06 13:07 wqtnb_tql_qwq_%%% 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; const int N=30; int n,s1[4][N],num[N]; char s[4][N]; bool vis[N]; void dfs(int x,int y,int t){ if(x==0){ if(t==0){ for(int ... 阅读全文
posted @ 2017-10-05 18:44 wqtnb_tql_qwq_%%% 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int n,m,p[1010],t,cnt,ans,sum; struct edge{int u,v,w;}e[100010]; bool cmp(edge x,edge y){return x.w<y.w;} int find(int x){return x==p[x]?x:p[x]=fi... 阅读全文
posted @ 2017-09-29 13:36 wqtnb_tql_qwq_%%% 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; const int N=5010; const int INF=1<<30; int n,x[N],y[N],vis[N]; double ans,d[N]; double dist(int a,int b){ double dx=abs(x[a]-x[b]),dy=ab... 阅读全文
posted @ 2017-09-29 13:19 wqtnb_tql_qwq_%%% 阅读(108) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; const int N=310; const int M=50010; struct edge{int u,v,w;}a[M]; int n,m,p[N],cnt,minn; int cmp(edge x,edge y){return x.w<y.w;} int find(int x){re... 阅读全文
posted @ 2017-09-28 20:10 wqtnb_tql_qwq_%%% 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; int n,m,d[70][70]; bool G[70][70][70]; int read(){ char c; int x=0; c=getchar(); while(c=48){ x=x... 阅读全文
posted @ 2017-09-28 18:37 wqtnb_tql_qwq_%%% 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int N=1010; int n,m,link[N],e; bool vis[N]; vector G[N]; bool can(int u){ for(int i=0;i<G[u].size();i++){ int v=G[u][i... 阅读全文
posted @ 2017-09-27 21:20 wqtnb_tql_qwq_%%% 阅读(95) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; const int N=100010; int n,m,sum,dfs_clock; vector G[N]; int pre[N],low[N],iscut[N]; int dfs(int u,int fa){ int lowu=pre[u]=++dfs_clock; int child=0; for(int i=0;i=p... 阅读全文
posted @ 2017-09-27 20:05 wqtnb_tql_qwq_%%% 阅读(109) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; const int N=10010; int n,a[N],b[N],sum;//1 有雷 0 无雷 inline int read(){ char c; int x=0; while(c=48){ x=x*10+c-'0'; c=getchar(); } return x; } int ma... 阅读全文
posted @ 2017-09-24 20:46 wqtnb_tql_qwq_%%% 阅读(106) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; const int N=210; const int M=N*N/2; const int INF=1nt || t[end]>nt || d[beg][end]==INF)puts("-1"); else printf("%d\n",d[beg][end]); } ... 阅读全文
posted @ 2017-09-23 21:23 wqtnb_tql_qwq_%%% 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 45 下一页