上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 43 下一页
摘要: 最小周期可以用%枚举 #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #includ 阅读全文
posted @ 2016-01-30 23:54 qlky 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 对于序列的最小值,可以定义一个比较的方法,然后用一般找最小值的方法遍历一遍即可 #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> 阅读全文
posted @ 2016-01-30 22:55 qlky 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 对于这种需要一遍遍枚举求解的,打表可以提高很多效率 #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <alg 阅读全文
posted @ 2016-01-30 21:44 qlky 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 可以先设一个常量镜像串,直接返回比较 #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> 阅读全文
posted @ 2016-01-30 14:24 qlky 阅读(797) 评论(0) 推荐(0) 编辑
摘要: sprintf 一个可以将输入打印到字符串的函数,用法与printf差不多 可以参考这篇文章: http://blog.csdn.net/masibuaa/article/details/5634886 //把整数123 打印成一个字符串保存在s 中。 sprintf(s, "%d", 123); 阅读全文
posted @ 2016-01-28 00:43 qlky 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 可以将一个数组里的内容复制到另一个数组 memcpy(b,a,sizeof(int)*k)复制a中k个,memcpy(b,a,sizeof(a))覆盖a全部 如果b该位置原先有值会被覆盖,超范围会截取 复制不同数据类型的数组得不到预期的结果 阅读全文
posted @ 2016-01-27 22:50 qlky 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #define LOCAL #include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #inc 阅读全文
posted @ 2016-01-27 22:32 qlky 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1.sqrt(-10)用%d输出是0.%lf输出则是-1.#IND00 http://blog.sina.com.cn/s/blog_3e6817300100a74d.html 2.除常数0会报错,除变量0程序会崩溃 3.printf中输出%可以用%%,输出/用// 4.int型最大值为214748 阅读全文
posted @ 2016-01-27 22:23 qlky 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 输出所有aabb型的完全平方数这个问题主要是提供一个判断完全平方的思路,就是用floor函数#include #include #include #include #include #include #include #include using namespace std;#define mem(... 阅读全文
posted @ 2016-01-26 23:23 qlky 阅读(209) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/libin56842/article/details/12947849http://blog.csdn.net/yuzhiyuxia/article/details/38728997http://www.cnblogs.com/shuaiwhu/archiv... 阅读全文
posted @ 2016-01-26 14:12 qlky 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 43 下一页