上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 题目描述 The Flood come from the border of the map, so tell me the area without flood...Do u think it's easy ? 输入描述 First T("#"),最后统计地图中"."的个数并是结果了 代码如下: Code Code highlighting produced by A... 阅读全文
posted @ 2009-05-02 00:24 pandy 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目描述 有一些字串,有些对称,有些不对称,请将对称的串按长度排列。 输入描述 输入为多行,每行一个串,串的长度不超过200,处理到文件结束 输出描述 输出对称的串,并且按串的长度升序排列,如果串长度相同,则按输入的顺序输出 样例输入 123321 123454321 123 321 sdfsdfd 121212 \\dd\\ 样例输出 123321 \\dd\... 阅读全文
posted @ 2009-05-01 10:14 pandy 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 详细解说STL string 详细解说STL string 0 前言: string 的角色 1 string 使用 1.1 充分使用string 操作符 1.2 眼花缭乱的string find 函数 1.3 string insert, replac... 阅读全文
posted @ 2009-05-01 10:10 pandy 阅读(229) 评论(0) 推荐(0) 编辑
摘要: SET 一个集合(set)是一个容器,它其中所包含的元素的值是唯一的。这在收集一个数据的具体值的时候是有用的。集合中的元素按一定的顺序排列,并被作为集合中的实例。如果你需要一个键/值对(pair)来存储数据,map是一个更好的选择。一个集合通过一个链表来组织,在插入操作和删除操作上比向量(vector)快,但查找或添加末尾的元素时会有些慢。 下面是一个例子: ... 阅读全文
posted @ 2009-05-01 08:49 pandy 阅读(203) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1222 理解题目: 当两者公约数为1,不存在安全洞。 不为1时,存在安全洞。 #include int gcd(int n,int m) { if(m==0) return n; return gcd(m,n%m); } int main() { int a,b,t; scanf("%d",&t); w... 阅读全文
posted @ 2009-05-01 01:04 pandy 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include int process(int i,int n) { long t=2,d=1; while(i){ if(i%2==1) ... 阅读全文
posted @ 2009-04-30 23:59 pandy 阅读(257) 评论(2) 推荐(0) 编辑
摘要: Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include #include char s[1010]; char c[]="5"; char *p; int a[1010]; int cmp(const void *... 阅读全文
posted @ 2009-04-30 23:17 pandy 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Ignatius is building an Online Judge, now he has worked out all the problems except the Judge System. The system has to read data from correct output file and user's result file, then the syste... 阅读全文
posted @ 2009-04-30 21:58 pandy 阅读(337) 评论(0) 推荐(0) 编辑
摘要: strtok------ 功能:分解字符串为一组标记串。s为要分解的字符串,delim为分隔符字符串。 说明:首次调用时,s必须指向要分解的字符串,随后调用要把s设成NULL。 strtok在s中查找包含在delim中的字符并用NULL('\0')来替换,直到找遍整个字符串。 返回指向下一个标记串。当没有标记串时则返回空字符NULL。 Example... 阅读全文
posted @ 2009-04-30 14:37 pandy 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 题目简单介绍: 天空中有一些星星,这些星星都在不同的位置,每个星星有个坐标。 如果一个星星的左下方(包含正左和正下)有k颗星星,就说这颗星星是k级的。 求出各个级别的星星的个数。 首先,引入树状数组,文章摘自http://fqq11679.blog.hexun.com/21722866_d.html 【引言】 在解题过程中,我们有时需要维护一个数组的前缀和S[i]=A[1... 阅读全文
posted @ 2009-04-23 00:09 pandy 阅读(628) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页