using System;using System.Collections.Generic;namespace StrToInt_CS{ class Program { static void Main(string[] args) { string str = ""; while (!String...
分类:
其他好文 时间:
2014-08-02 15:06:43
阅读次数:
170
grep?-q?"str"?urfile?&&
{
??echo?"找到了"
}?||
{
???echo?"没找到"
}
分类:
系统相关 时间:
2014-08-01 20:27:32
阅读次数:
339
题目描述:
输入一个二叉树,输出其镜像。
九度OJ的测试很蛋疼啊~
这里,我先写一个求二叉树镜像的代码,使用自己的测试代码:
思路很简单:先判断是否左右孩子都为空,如果不是,则交换,然后递归左右子树。其实是先序遍历。
/*
二叉树镜像
by Rowandjj
2014/8/1
*/
#include
using namespace std;
typedef str...
分类:
其他好文 时间:
2014-08-01 19:47:22
阅读次数:
266
#include#include#includeusing namespace std;#define N 128int main(){ int i=0,sum; bool is_exist[N]; char ch; char str[10000]; //void *...
分类:
其他好文 时间:
2014-08-01 18:44:52
阅读次数:
195
/*
* 传入一个字符串 将它分割成大写字符为首的字符串数组
*/
private ArrayList splitByUpperCase(String str) {
ArrayList rs = new ArrayList();
int index = 0;
int len = str.length();
...
分类:
编程语言 时间:
2014-08-01 16:18:11
阅读次数:
250
方法一:正则表达式匹配 1 var str = "adadfdfseffserfefsefseeffffftsdg"; 2 var maxLength = 0; var result = ""; 3 while (str != '') { 4 ...
分类:
Web程序 时间:
2014-08-01 15:58:51
阅读次数:
224
1. string 转换为 NSString std::string str("hello"); NSString *str=[NSString stringWithString:str.c_str()]; NSString *istr=[NSString stringWithString:@"z....
分类:
其他好文 时间:
2014-08-01 15:37:01
阅读次数:
167
题意:给出袋子的体积和骨头的个数,然后又给出每个骨头的价值和体积,求袋子最多能装的骨头的价值
难点;这道题是最基础的01背包题,不懂得话推荐看《背包九讲》
AC by SWS
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2602
代码:
#include
#include
typedef struct{
int w, v;
}str;...
分类:
其他好文 时间:
2014-08-01 10:55:11
阅读次数:
215
官网http://www.icsharpcode.net/支持文件和字符压缩第一步,创建压缩包using ICSharpCode.SharpZipLib.Zip;ZipOutputStream zipOutputStream = new ZipOutputStream(File.Create(str...
分类:
其他好文 时间:
2014-08-01 10:39:31
阅读次数:
143
解题报告
题意:
替换字符串,一个单词可重复替换
思路:
这种题都很恶心。
#include
#include
#include
#include
using namespace std;
char str[1000][1000],ch[1000][1000],sh[1000],str1[1000];
int main()
{
int n,i,j;
while(~...
分类:
其他好文 时间:
2014-08-01 00:05:00
阅读次数:
351