04 2016 档案
摘要:题目链接:http://poj.org/problem?id=2739
阅读全文
摘要:题目链接:http://poj.org/problem?id=1331 主要介绍strtol函数:
阅读全文
摘要:Description Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this p
阅读全文
摘要:自己去看看原题; 题目大意: 就是一个狱卒喝醉了,他第一趟吧所有的监狱都带开,第二趟把能把二整除的监狱关闭,第三趟操作能把三整除的监狱; 求最后能逃跑的罪犯数 输入第一个数是代表 测试数据组数 每个数据代表狱卒来回的次数 当作开关问题即可
阅读全文
摘要:字典序列: 在字典序中蕴含着一个点,就是大小的问题,谁先出现,谁后出现的问题。譬如a<b<c,出现顺序就是a,b,c。 本题中字符集是所有大小写字母,而题目中规定的谁大谁小已经不是按ascii码排了,而是A<a<B<b<C<c……,那么不管在排序的时候还是调用next_permutation中我们都
阅读全文
摘要:Description It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens
阅读全文
摘要:并查集:使用并查集可以把每个连通分量看作一个集合,该集合包含连通分量的所有点。这两两连通而具体的连通方式无关紧要,就好比集合中的元素没有先后顺序之分,只有属于和不属于的区别。#define N 100 int father[N]; void init() { for(int i=0;i<n;i++) father[i]=1; } void union(int x,int y) //合并...
阅读全文