摘要: #include<bits/stdc++.h> using namespace std; int n; int main(){ cin>>n; cout<<99-n/2<<" "; for(int i=1;i<=n-3-1;i=i+2) { cout<<0<<" "<<1<<" "; } if(n% 阅读全文
posted @ 2023-10-30 21:24 竹余居居居居居 阅读(36) 评论(1) 推荐(0)
摘要: 阅读全文
posted @ 2023-10-23 21:34 竹余居居居居居 阅读(38) 评论(1) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int a[1005][1005]; int n; bool b[10005]; int c[10005][10005]; int t=0; void dfs_xian(int x){ cout<<x<<" " 阅读全文
posted @ 2023-09-22 21:30 竹余居居居居居 阅读(56) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h>using namespace std; long long a[10005][10005];bool b[10005][10005];const long long p=100000007; void f(int x,int y){ if(x==1 | 阅读全文
posted @ 2023-09-20 21:32 竹余居居居居居 阅读(65) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/qq_41054844/article/details/111632239 阅读全文
posted @ 2023-09-13 21:31 竹余居居居居居 阅读(9) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int n,m; int parent[1000005]; void init(int n){ for(int i=1; i<=n; i++){ parent[i]=i; } } int find(int x) 阅读全文
posted @ 2023-08-05 15:04 竹余居居居居居 阅读(16) 评论(0) 推荐(0)
摘要: 基础代码如下 struct edge{ int u,v,w; }e[305*305]; bool cmp(edge x,edge y){ return x.w<y.w; }//对w排序 void Init(int n){ for(int i=1; i<=n; i++){ fa[i]=i; } } i 阅读全文
posted @ 2023-08-05 09:44 竹余居居居居居 阅读(17) 评论(0) 推荐(0)
摘要: Floyd #include<bits/stdc++.h> using namespace std; int n,m,s,e; bool vis[10005]; int INF=0x3f3f3f3f; int d[1005][1005]; int p[1005][1005]; int G[1005] 阅读全文
posted @ 2023-08-04 16:59 竹余居居居居居 阅读(13) 评论(0) 推荐(0)
摘要: 最短路径(迪科斯特算法模板) #include<bits/stdc++.h> using namespace std; int n,m,s; bool vis[10005]; int INF=0x3f3f3f3f; int d[10005]; struct node{ int v,w; }; vec 阅读全文
posted @ 2023-08-04 16:59 竹余居居居居居 阅读(10) 评论(0) 推荐(0)
摘要: 分糖果 #include<bits/stdc++.h> using namespace std; int a[1005][1005]; int d[1005]; int minn=INT_MAX; bool b[1005]; vector<int> g[1005]; int y; int k; in 阅读全文
posted @ 2023-08-04 15:51 竹余居居居居居 阅读(67) 评论(0) 推荐(0)