上一页 1 ··· 4 5 6 7 8
摘要: 1.gcd 递归实现 int gcd(int i,int j){ if(j==0) return i; else return gcd(j,i%j);} 2、lcm int gcd(int i,int j){if(j==0) return i;else return gcd(j,i%j);} int 阅读全文
posted @ 2017-07-30 19:50 白泽霜 阅读(159) 评论(0) 推荐(0) 编辑
摘要: I’m out of stories. For years I’ve been writing stories, some rather silly, just to make simple problems look difficult and complex problems look easy 阅读全文
posted @ 2017-07-22 11:17 白泽霜 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 我们的化学生物学家发明了一种新的叫stripies非常神奇的生命。该stripies是透明的无定形变形虫似的生物,生活在果冻状的营养培养基平板菌落。大部分的时间stripies在移动。当他们两个碰撞,会有新stripie生成,而旧的不见了。经过长期研究,他们发现新stripies的体重不等于消失的s 阅读全文
posted @ 2017-07-22 08:50 白泽霜 阅读(172) 评论(0) 推荐(0) 编辑
摘要: E - Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to be correct: (a) if it is the empt 阅读全文
posted @ 2017-07-20 11:25 白泽霜 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 题目: Ugly numbers are numbers whose only prime factors are 2, 3 or 5 . The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly num 阅读全文
posted @ 2017-07-18 19:35 白泽霜 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目: G - 士兵队列训练问题 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队, 训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢, 再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。, 以后从头开始轮 阅读全文
posted @ 2017-07-18 11:21 白泽霜 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 这里在网上搜集归纳了一个总结 memset函数 按照字节填充某字符 在头文件<string。h>中 因为memset函数按照字节填充,所以一般memset只能用来填充char型数组,(因为只有char型占一个字节)如果填充int型数组,除了0和-1,其他的不能。因为只有00000000 = 0,-1 阅读全文
posted @ 2017-07-18 08:13 白泽霜 阅读(336) 评论(0) 推荐(0) 编辑
摘要: I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contain 阅读全文
posted @ 2017-07-17 15:21 白泽霜 阅读(301) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8