自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (4)
  • 收藏
  • 关注

空空如也

Advertising.csv

线性回归数据集---广告数据集 三个参数,一个输出 线性回归数据集---广告数据集 三个参数,一个输出 线性回归数据集---广告数据集 三个参数,一个输出

2020-02-04

c#影院系统大作业,班评第一名

c#影院系统大作业,班评第一名

2018-12-29

行人重识别

利用Top-Push的方法,实现了行人重识别,参考文献Top-push Video-based PersonRe-identification,实现加密部分代码。

2018-12-26

动态内存+BFS

动态内存+BFS #include<iostream> #include<list> #include<queue> #include<algorithm> using namespace std; void BFS(list<int> *the_a,int the_N,int the_S,int *the_b){ int *m=new int[the_N]; for(int k1=0;k1<the_N;k1++) m[k1]=0; m[the_S-1]=1; queue<int> qu; qu.push(the_S-1); while(!qu.empty()){ list<int>::iterator iter; for(iter=the_a[qu.front()].begin();iter!=the_a[qu.front()].end();iter++){ if(m[*iter-1]==0){ qu.push(*iter-1);m[*iter-1]=1;the_b[*iter-1]=qu.front(); } } qu.pop(); } delete []m; } int main(){ int m; cin>>m; while(m--){ int N,S; cin>>N>>S; list<int> *a=new list<int>[N]; int *b=new int[N]; b[S-1]=-2; int v1,v2; for(int i=0;i<N-1;i++){ cin>>v1>>v2; a[v1-1].push_back(v2); a[v2-1].push_back(v1); } BFS(a,N,S,b); for(int j=0;j<N;j++){ cout<<b[j]+1<<" "; } delete[]b; cout<<endl; } return 0; }

2018-01-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除