12 2016 档案

摘要:当使用stack等stl库时,如果使用s.pop(),s.top(),则必须判定stack是否为空。 阅读全文
posted @ 2016-12-30 17:08 Hardsoftware 阅读(901) 评论(0) 推荐(0) 编辑
摘要:#include using namespace std; int range(int row, int col) { if(row>0 && row0 && col=row) { return -1; } if(c=row) { return -1; } return 0; } int crinmat(... 阅读全文
posted @ 2016-12-30 13:11 Hardsoftware 阅读(150) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; int main() { int N; cin>>N; int first = 1; int last = N; int start = 1; int length = 4; int curr = 1; char str[100]; cin... 阅读全文
posted @ 2016-12-30 12:37 Hardsoftware 阅读(206) 评论(0) 推荐(0) 编辑
摘要:#include #include #include using namespace std; void solve(char *str) { vector v; char tmp[100]; int tmpcount = 0; for(int i=0; str[i]!='\0'; i++) { if(str[i]==' ' || st... 阅读全文
posted @ 2016-12-29 22:46 Hardsoftware 阅读(159) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; int compareStr(string str1, string str2) { int num1 = str1.length(); int num2 = str2.length(); if(num1>num2) return 1; if(num1str2[i]) ... 阅读全文
posted @ 2016-12-29 21:42 Hardsoftware 阅读(234) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; struct Data { int index; int value; }; struct myComp { bool operator()(const Data &a, const Data &b) { return a.index dataset; i... 阅读全文
posted @ 2016-12-29 16:30 Hardsoftware 阅读(193) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; int main() { int N; cin>>N; list li; int head; cin>>head; li.push_back(head); for(int i=0; i>a>>b; list::iterator itr; ... 阅读全文
posted @ 2016-12-29 13:37 Hardsoftware 阅读(149) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; int dp[100][100]; int min(int a, int b) { if(a>str1>>str2; int num1 = strlen(str1); int num2 = strlen(str2); if(str1[0]==str2[0]) dp... 阅读全文
posted @ 2016-12-28 21:57 Hardsoftware 阅读(339) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include using namespace std; bool lessthan(char a, char b) { if(b=='*' || b=='/' ) { return true; } if(a=='+' || a=='-' ) { return t... 阅读全文
posted @ 2016-12-28 21:55 Hardsoftware 阅读(341) 评论(0) 推荐(0) 编辑
摘要:#include #include #include using namespace std; struct record{ string name; int line; int count; }; string getname(string str) { int sz = str.length(); int i; for(i=sz-1; i... 阅读全文
posted @ 2016-12-28 21:52 Hardsoftware 阅读(148) 评论(0) 推荐(0) 编辑
摘要:#include #include #include using namespace std; int countA=0; int countB=0; int countC=0; int countD=0; int countE=0; int countError=0; int countPrivate=0; void get(char *str) { int num = strle... 阅读全文
posted @ 2016-12-28 21:09 Hardsoftware 阅读(315) 评论(0) 推荐(0) 编辑
摘要:Python内置的字符串处理函数整理 作者: 字体:[增加 减小] 类型:转载 时间:2013-01-29 我要评论 Python内置的字符串处理函数整理 作者: 字体:[增加 减小] 类型:转载 时间:2013-01-29 我要评论 Python内置的字符串处理函数整理,收集常用的Python 内 阅读全文
posted @ 2016-12-25 20:17 Hardsoftware 阅读(6535) 评论(0) 推荐(1) 编辑
摘要:c c++怎么判断一个字符串中是否含有汉字 (2013-02-05 10:44:23) 转载▼ c c++怎么判断一个字符串中是否含有汉字 转载▼ #include #include int main() { char sztext[] = " 是ciw."; char c = 0; char sz 阅读全文
posted @ 2016-12-21 20:48 Hardsoftware 阅读(5761) 评论(0) 推荐(0) 编辑
摘要:shell的if判断 2012-03-16 14:53:05 分类: Python/Ruby 1 概要 有时候你需要指定shell脚本中的依靠命令的成功与否来实施不同过程的行为。 if 结构允许你来指定这样的条件。 最精简的 if 命令的语法是: if TEST-COMMANDS; then CON 阅读全文
posted @ 2016-12-13 15:11 Hardsoftware 阅读(427) 评论(0) 推荐(0) 编辑
摘要:刚安装了,ubuntu14.04,就想着,如果忘记登录密码,这可不好办,所以测试下开机,刚过bios显示画面,不停的点击,,键盘左边的shift键。(因为刚开始是采用按着不放的办法,结果不灵。所以我不停的点击,失败了,重启机子,直到用这个方法,不停的点击,出来成功为止)grub2画面出来了选择第二项 阅读全文
posted @ 2016-12-09 11:18 Hardsoftware 阅读(10650) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示