摘要:
int main (int argc, char* argv[]){std::ios::sync_with_stdio (false); //忽略列表 setexclude ={ "fuck", "damn" }; stringword; map word_count; while (cin>... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(206)
评论(0)
推荐(0)
摘要:
原文地址:博客中尖括号不显示的问题作者:木子超-同学 今天突然发现以前博文中粘贴的代码都有了问题,C++代码中头文件“#include……”后面的的部分都不见了,单单显示为“#include”,颇感纠结,百度了一下才发现原来是HTML和XML转义字符的问题。大概意思就是说尖括号为HTML和XM... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(313)
评论(0)
推荐(0)
摘要:
include include include int main(int argc, char **argv){int a = 0, b = 0, c = 0;string str;getline(cin, str);for(auto it = str.begin(); it != str.e... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(290)
评论(0)
推荐(0)
摘要:
#include >#include >#include >#include >using namespace std;string make_plural(size_t ctr, const string &word, const string&ending){ return (ct... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(164)
评论(0)
推荐(0)
摘要:
int main(int argc, char **argv){ int i; cout>i; autoif_equal_zero = [&]()-> bool{if (i == 0)return true;elsewhile (i > 0)--i;return false; }; cout ... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(156)
评论(0)
推荐(0)
摘要:
一个很重要的想法来自http://zhex.iteye.com/blog/492722提到的:3. 两个三位数的乘积肯定是一个六位数, 而这个六位回文数数P我们可以用xyzzyx的形式表示,那我们可以得到下面的公式:P = 100000x + 10000y + 1000z + 100z + 1... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(157)
评论(0)
推荐(0)
摘要:
int main (int argc, char *argv[]){ string file= argv[1] ; cout> word)out << word << " "; ifstream in(file); if(!in.is_open ()) {cout << "Cannot ope... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(110)
评论(0)
推荐(0)
摘要:
#include#define ARR_SIZE(a)(sizeof((a)) / sizeof((a[0])))int a[] = {1, 23, 32, 0, 2, 5, 23};void insert_sort(int *a, int n) { int i, j,temp; for (i... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(128)
评论(0)
推荐(0)
摘要:
int main (){ cout<< "Please input some numbers:" << endl;//定义输入流迭代器和尾后迭代器istream_iterator input_number_it (cin),eof;//用迭代器与尾后迭代器初始化vectorvectornumb... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(125)
评论(0)
推荐(0)
摘要:
题目:约瑟夫环约瑟夫环是一个数学的应用问题:已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列。int Josephus (int sum, ... 阅读全文
posted @ 2014-07-18 21:07
wu_overflow
阅读(127)
评论(0)
推荐(0)
浙公网安备 33010602011771号