加载中...

摘要: ###使用列表 fun ScrollingView()相当于recyclerview (原本是ScrollingList) 依赖:用于加载网络图片 implementation 'io.coil-kt:coil-compose:1.4.0' painter = rememberImagePainte 阅读全文
posted @ 2022-12-30 12:05 biubidio 阅读(57) 评论(0) 推荐(0)
摘要: void insert( vector<vector<int>> ps) { vector<int> s1; vector<int>::iterator it for(int j=0;j<i;j++) { s1=s; it = s1.begin()+j; s1.insert(it,i); ps.pu 阅读全文
posted @ 2022-11-14 14:22 biubidio 阅读(27) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; string solve(int n) { if (n == 0) //特判为0和1的情况 return "0"; if (n == 1) return "2(0)"; string 阅读全文
posted @ 2022-11-03 08:38 biubidio 阅读(67) 评论(0) 推荐(0)
摘要: ##1. #include<iostream> #define MAX 10000 using namespace std; //int i,j; int n,m;//n标志背包容量,m标致物品个数 int result=-9999; int vis[MAX] = {0}; int w[MAX] = 阅读全文
posted @ 2022-11-01 20:15 biubidio 阅读(21) 评论(0) 推荐(0)
摘要: #include<iostream> #define MAX 10000 using namespace std; int n; int vis[MAX] = {0}; void dfs(int l,int s)//l指示当前长度,s表示当前数字 { if(l==n) { cout<<s<<endl 阅读全文
posted @ 2022-11-01 18:08 biubidio 阅读(27) 评论(0) 推荐(0)
摘要: ##c++设置最大值 :0x3f3f3f3f ##c++设置最小值 :-0x3f3f3f3f 阅读全文
posted @ 2022-10-09 14:51 biubidio 阅读(112) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; float power(float x,int y) { float temp; if(y==0) return 1; temp = power(x, y/2); if(y%2==0) return temp * tem 阅读全文
posted @ 2022-09-26 16:33 biubidio 阅读(25) 评论(0) 推荐(0)
摘要: #数组表示邻接表储存图 //n表示顶点个数,m表示边的条数 int n,m,i; //u,v,w大小要比m最大值大1 int u[6],v[6],w[6]; //first,next大小要比n最大值大1, //因为u[i]代表的是一条边的起始端点,可以到5 int first[5],next[5]; 阅读全文
posted @ 2022-09-24 16:33 biubidio 阅读(21) 评论(0) 推荐(0)
摘要: #多源最短路径 Floyd—Warshall //k为开通的中转站, //如果由k站中转得到的路程比原路程少则更改最短路程 for(k=1;k<=n;k++) for(i=1;i<=n;i++) for(e[i][j]>e[i][k]+e[k][j]) e[i][j] = e[i][k]+e[k][ 阅读全文
posted @ 2022-09-24 11:10 biubidio 阅读(165) 评论(0) 推荐(0)
摘要: //n个顶点m条边 int m,n; cin>>n>>m; for(i=1;i<=n;i++) for(j=1;j<=n;j++) if(i==j) e[i][j]=0; else e[i][j]=99999999; for(i=1;i<=m;i++) { cin>>a>>b; e[a][b]=1; 阅读全文
posted @ 2022-09-24 09:44 biubidio 阅读(55) 评论(0) 推荐(0)