码迷,mamicode.com
首页 >  
搜索关键字:end    ( 30778个结果
UVA - 12338 Anti-Rhyme Pairs (哈希)
DescriptionD Anti-Rhyme Pairs Input: Standard Input Output: Standard Output Often two words that rhyme also end in the same sequence of characters. We...
分类:其他好文   时间:2014-10-08 11:01:35    阅读次数:261
递归和非递归的二分查找
思路很简单,代码注释已标注 #include //递归二分查找 int binarySearch(int*start,int *end,intfindData){ if (start > end) { // 递归边界条件 return -1; }...
分类:其他好文   时间:2014-10-08 00:31:55    阅读次数:288
ZOJ 3726 RMQ + 二分
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5072 区域赛果然无水题 通过率最高的一道题 以为二分下就OK  然后WA了果断 外加int没用long long WA 好久没用RMQ 调试也花了一点时间, upper——bound返回的是大于x的第一个数的下标,最大当然是返回end的位置,注意判断下 注意一点,假设...
分类:其他好文   时间:2014-10-07 20:01:44    阅读次数:213
leetcode -- Binary Tree Maximum Path Sum
过去只是人生经历,并不是人生负担[问题描述]Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below bi...
分类:其他好文   时间:2014-10-07 13:47:03    阅读次数:195
SQL行转列
如图:源表:转换之后的结果:SQL语句:SELECT 姓名,MAX(CASE WHEN 课程='语文' THEN 分数 else 0 end) '语文',MAX(CASE WHEN 课程='数学' THEN 分数 else 0 end) '数学',MAX(CASE WHEN 课程='物理' TH.....
分类:数据库   时间:2014-10-06 14:28:50    阅读次数:196
OOP思想:封装、继承、多态(续)
借口文件1:Bird.h#import @interface Bird : NSObject{@private int _weight; NSString *_name;}- (void)fly;@end实现文件1:Bird.m#import "Bird.h"@implementation Bird...
分类:其他好文   时间:2014-10-06 01:02:29    阅读次数:299
OOP思想:封装、继承、多态
1. 构建一个动物类作为父类,猫科动物子类继承动物类,老虎子类继承猫科 动物 每个类都实现一个不同的cry方法。借口文件1:Animal.h#import @interface Animal : NSObject- (void) cry;@end实现文件1:Animal.m#import "Anim...
分类:其他好文   时间:2014-10-06 00:46:29    阅读次数:336
迭代适配器(一) back_insert和front_insert的简单实现
当我们调用copy函数时,要确保目标容器足够大,例如://将vec的所有元素拷贝到以coll.begin()为起始地址的位置copy(vec.begin(), vec.end(), coll.begin());如果之前没有为coll分配好足够的内存,就会引发越界错误。如果我们无法提前为coll预分配...
分类:其他好文   时间:2014-10-05 23:38:49    阅读次数:272
Objective-C的第二课
今天学习了继承, 属性, 多态作业:动物父类, 猫科子类, 狮子孙子类;#import @interface Animal : NSObject@end //动物类#import @interface Animal : NSObject@end //动物类#import "Animal....
分类:其他好文   时间:2014-10-05 23:17:19    阅读次数:266
Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2014-10-05 23:13:59    阅读次数:166
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!