
数据结构
文章平均质量分 79
「已注销」
不疯魔,不成活
展开
-
一些常用数据结构的数组实现 不定期更新
循环队列:题目链接:cf 792B 分析:这个题就是约瑟夫环的变形,考虑到n比较小,可以用队列模拟。code:#includeconst int MAXN=100+5;int Q[MAXN];int a[MAXN];int main(void){ int n,k;scanf("%d%d",&n,&k); for(int i=0;i原创 2017-04-13 01:28:44 · 266 阅读 · 0 评论 -
poj find them,catch them 并查集
题目:DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs原创 2017-05-01 00:18:01 · 331 阅读 · 0 评论 -
Codeforces Round #405 Bear and Friendship Condition 并查集
记住,当你觉得很苦很累的时候,你真的在进步。原创 2017-05-02 21:01:29 · 366 阅读 · 0 评论 -
codeforce 796C Bank Hacking 智力题orz
题目:There are n banks, numbered from 1 to n. There are also n - 1 wires connecting the banks. All banks are initially online. Each bank also has its initial strength: bank i has initial str原创 2017-04-21 06:55:33 · 372 阅读 · 0 评论