qingcheng奕  

2014年1月11日

摘要: http://oj.leetcode.com/problems/search-for-a-range/要求复杂度为O(lgn),用二分查找的思想。#include #include using namespace std;class Solution {public: void fun(int* A,int start,int end,int target,vector &ans) { if(start>end || ( start == end && A[start]!= target )) { ans.push_back(-1)... 阅读全文
posted @ 2014-01-11 17:49 qingcheng奕 阅读(131) 评论(0) 推荐(0) 编辑
 
摘要: #include using namespace std;class Reader{public: Reader() { xCoordinate = NULL; xCoordinate = (int*)malloc(sizeof(int)*100); coutDoHandle(); delete p3Converter; //不调用Reader2的构造和析构 Converter *p3Converter = new Converter(); delete p3Converter; return 0;} 阅读全文
posted @ 2014-01-11 15:40 qingcheng奕 阅读(338) 评论(0) 推荐(0) 编辑