Description
Pedro travelled to Europe to take part in the International Olympiad in Informatics and is coming back home. Since all his friends asked him to bring them some gift, he bought two big...
分类:
其他好文 时间:
2015-05-28 23:15:58
阅读次数:
191
——接上文。
3.3实现导航抽屉菜单项的选择
尽管导航抽屉已经实现了,但是你会发现选择抽屉列表项并没有反应,这是因为我们还没有实现RecycleView items的点击监听。
因为我们在导航抽屉里有3个菜单(Home,Friends & Messages),所以需要为每一个菜单项创建一个独立的Fragment。
(24)在res-->layout里面,创建一个名为fragment_h...
分类:
移动开发 时间:
2015-05-27 10:18:36
阅读次数:
337
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=3172并查集的运用。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using std::map; 7 using std::str...
分类:
其他好文 时间:
2015-05-25 22:23:16
阅读次数:
185
并查集题目,并的意思就是将两个不同类别的集合合并到一起,类似于两棵树合并;查的意思就是找到这个点所属集合的根节点。基本上并查集题目都是在大体架构上面加一些东西即可。并查集代码模板在这里点击打开链接。
这一题为了找到输入的两个人组成的社交网络人数,也就是统计这两个人与前面的人组成的集合中有多少元素。我们加一个辅助数组sum,当两个集合并时,我们将父节点对应下标的sum值加上子节点的sum值,表达这...
分类:
其他好文 时间:
2015-05-22 22:41:37
阅读次数:
160
字典1.快速枚举 forin 运行时不能更改内部数据for ( in ) {} //对象 //数组for(Contact *contact in friends) {[contact show];}判定是否为空 NSString *ns ==nil NSInteger ...
分类:
编程语言 时间:
2015-05-22 18:44:01
阅读次数:
222
DescriptionBessie has two crisp red apples to deliver to two of her friends in the herd. Of course, she travels the C (1 6-> 7 -> 4* -> 3 -> 2 -> 1* ....
分类:
其他好文 时间:
2015-05-22 11:24:05
阅读次数:
173
Description
On an alien planet, every extraterrestrial is born with a number. If the sum of two numbers is a prime number, then two extraterrestrials can be friends. But every extraterrestrial ca...
分类:
其他好文 时间:
2015-05-22 09:43:20
阅读次数:
161
Problem DescriptionFish likes to take photo with his friends. Several days ago, he found that some pictures of him were damaged. The trouble is that t...
分类:
其他好文 时间:
2015-05-18 18:08:22
阅读次数:
125
给定n,要求给出n个数,是的任意两数不互质,但所有数的最大公约数为1
很简单,所有数的最大公约数为1只需三个数最大公约数为1,假设a,b,c为素数,设第一个数为ab,第二个数为ac,第三个数为bc,则这三个数最大公约数已经为1,那么剩下的数只要满足与他们不互质即可,不妨令以后的数为 bc*i(i>1),则问题已解。
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2015-05-18 09:14:04
阅读次数:
93
1552: Friends
Time Limit: 3 Sec Memory Limit:
256 MB
Submit: 525 Solved: 136
[Submit][Status][Web
Board]
Description
On an alien planet, every extraterrestrial is born with a number. If t...
分类:
其他好文 时间:
2015-05-18 09:05:00
阅读次数:
122