2017年11月28日

并查集

摘要: #include using namespace std; int id[100001],si[100001]; int ifind(int p){ while(p!=id[p]){ id[p]=id[id[p]];//父节点为爷爷节点,路径压缩 p=id[p]; } return p; } void iunion(int p,int q)... 阅读全文

posted @ 2017-11-28 21:17 Magic_chao 阅读(122) 评论(0) 推荐(0) 编辑

CCF201604-02

摘要: #include using namespace std; int main(){ int m[15][10],s[4][4],n; for(int i=0;i>m[i][j]; } } for(int i=0;i>s[i][j]; } } cin>>n; for(int i=14;i>=0;i--){ ... 阅读全文

posted @ 2017-11-28 21:16 Magic_chao 阅读(129) 评论(0) 推荐(0) 编辑

CCF201604-01

摘要: 阅读全文

posted @ 2017-11-28 21:15 Magic_chao 阅读(107) 评论(0) 推荐(0) 编辑

导航