上一页 1 ··· 15 16 17 18 19
摘要: 最优化问题 常规动态规划 SOJ1162 I-Keyboard SOJ1685 Chopsticks SOJ1679 Gangsters SOJ2096 Maximum Submatrix SOJ2111 littleken bg SOJ2142 Cow Exhibition SOJ2505 The 阅读全文
posted @ 2016-09-09 00:47 KennyRom 阅读(847) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int a,b; label: cin>>a>>b; try { if(b==0)throw runtime_error("重输"); cout<<a/b<<endl; } catch(runtime_error err) ... 阅读全文
posted @ 2016-09-09 00:29 KennyRom 阅读(108) 评论(0) 推荐(0) 编辑
摘要: size_t 是标准函数库中的一种类型 定义在头文件cstddef中 是一种unsigned integral type 是一个与机器有关的unsigned type 譬如:sizeof返回值类型为size_t 数组类型下标为size_t 阅读全文
posted @ 2016-09-08 21:49 KennyRom 阅读(108) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { int ia[2][3] = { 1, 2, 3, 4, 5, 6 }; //数组下标略 for (int (&i)[3] : ia) for (int &j : i) cout << j << endl; for (int (*i)[3] = begin(ia); i ... 阅读全文
posted @ 2016-09-08 21:33 KennyRom 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; void process(string filename) { fstream file(filename); file << "Hallo world!" << endl; file.close(); } int main() { #include"haha.txt" string s = "haha.t... 阅读全文
posted @ 2016-09-08 11:25 KennyRom 阅读(114) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/kuangbin/archive/2011/07/29/2120667.html 初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. ( 阅读全文
posted @ 2016-09-06 20:50 KennyRom 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 从放暑假前周sir给我讲了一个用polya计数法和burnside定理做的题目(pku2409)后,突然觉得组合数学挺有意思,然后从那时起到现在几乎都在做这类的题目。 做到现在感觉这类题目的一些基本知识点都差不多有所了解了,水题也刷了不少,但还有很多难题自己实在是做不动,所以准备把这类题目先放一放,然后把前段时间做的水题整理一下(供以后的初学者参考,大牛就不要看了哈,都是水题)。剩下的比较难... 阅读全文
posted @ 2016-09-06 20:43 KennyRom 阅读(151) 评论(0) 推荐(0) 编辑
摘要: To and Fro Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the messa 阅读全文
posted @ 2016-09-02 00:32 KennyRom 阅读(204) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19