09 2015 档案

C++学习笔记 string类
摘要:初始化stringstring类的运算符:注意度量长度的 string类方法, .length(), 不能使用用strlen,错误:不能从 ‘std::string’ 转换到 ‘const char*’,成员函数:带'.'的s = "Say this shortly, say this softly... 阅读全文

posted @ 2015-09-14 19:30 hanahimi 阅读(118) 评论(0) 推荐(0)

大写
摘要:#str = list(raw_input())N = len(str)''.isspace()for i in range(N-1): if str[i].isalpha(): str[i] = str[i].upper() breakfor i in range... 阅读全文

posted @ 2015-09-14 12:03 hanahimi 阅读(349) 评论(0) 推荐(0)

算法学习 寻找最大凸多边形
摘要:#include #include #include int find(int va,int num,float *lcos);int check(float cos1,float cos2);float ad_cos(int x,int y);typedef struct POINT{ int x... 阅读全文

posted @ 2015-09-14 11:00 hanahimi

算法学习 交叉排序
摘要:/*对一个数组,将数组中偶数从大到小排序,奇数从小到大排序,奇数和偶数交叉着放,且输出数组第一位放奇数 若奇数和偶数不等长,则把剩下的直接放到数组中。 */#include #include #include int comp(const void *p, const void *q) { r... 阅读全文

posted @ 2015-09-14 10:41 hanahimi 阅读(1181) 评论(0) 推荐(0)

算法学习 长整数相加
摘要:# include # include using namespace std;// 字符串数字相加#define MAXSIZE 130#define BUFFERSIZE 200void print_num(int num[], int numlen, int verse);// 倒排文本数字... 阅读全文

posted @ 2015-09-14 10:37 hanahimi 阅读(836) 评论(0) 推荐(0)

导航