上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 递归方法 [cpp] view plaincopyprint? int BinSearch(int Array[],int low,int high,int key/*要找的值*/) { if (lowArray[mid]) return BinSearch(Array,mid+1,hi... 阅读全文
posted @ 2015-11-05 10:11 (慎独) 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 经常碰到字符串分割的问题,这里总结下,也方便我以后使用。 一、用strtok函数进行字符串分割 原型: char *strtok(char *str, const char *delim); 功能:分解字符串为一组字符串。 参数说明:str为要分解的字符串,delim为分隔符字符串。 返... 阅读全文
posted @ 2015-11-05 10:03 (慎独) 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 经常碰到字符串分割的问题,这里总结下,也方便我以后使用。 一、用strtok函数进行字符串分割 原型: char *strtok(char *str, const char *delim); 功能:分解字符串为一组字符串。 参数说明:str为要分解的字符串,delim为分隔符字符串。 返... 阅读全文
posted @ 2015-11-05 10:03 (慎独) 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Problem Description Ignatius is doing his homework now. The teacher gives him some articles and asks him to tell how many times each letter appears.... 阅读全文
posted @ 2015-11-04 20:22 (慎独) 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Problem Description Ignatius is doing his homework now. The teacher gives him some articles and asks him to tell how many times each letter appears.... 阅读全文
posted @ 2015-11-04 20:22 (慎独) 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 判断三点是顺时针还是逆时针方向 设 p1=(x1,y1), p2=(x2,y2), p3=(x3,y3) 求向量 p12=(x2-x1,y2-y1) p23=(x3-x2,y3-y2) 则当 p12 与 p23 的叉乘(向量积) p12 x p23 = (x2-x1)*(y3-y2)-... 阅读全文
posted @ 2015-11-04 19:57 (慎独) 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 判断三点是顺时针还是逆时针方向 设 p1=(x1,y1), p2=(x2,y2), p3=(x3,y3) 求向量 p12=(x2-x1,y2-y1) p23=(x3-x2,y3-y2) 则当 p12 与 p23 的叉乘(向量积) p12 x p23 = (x2-x1)*(y3-y2)-... 阅读全文
posted @ 2015-11-04 19:57 (慎独) 阅读(3519) 评论(0) 推荐(0) 编辑
摘要: Problem Description 有三个正整数a,b,c(0using namespace std;int main(){ int a,b,c,n,m,i,j,k,q,p; while(cin>>n){ while(n--){ cin>>a>>b; for(i=b+1;;i... 阅读全文
posted @ 2015-11-04 17:12 (慎独) 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Problem Description 有三个正整数a,b,c(0using namespace std;int main(){ int a,b,c,n,m,i,j,k,q,p; while(cin>>n){ while(n--){ cin>>a>>b; for(i=b+1;;i... 阅读全文
posted @ 2015-11-04 17:12 (慎独) 阅读(141) 评论(0) 推荐(0) 编辑
摘要: search 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描述 游戏积分的排行榜出来了,小z想看看得某个积分的人是谁。但是由于人数很多,他自己找很浪费时间,所以他想请你帮忙写一个程序,能快速的帮他找到他想要找的人 输入多组测试数据,第一行有一个数T,表示有T组测... 阅读全文
posted @ 2015-11-04 14:41 (慎独) 阅读(147) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页