Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-07-26 00:23:26
阅读次数:
242
Merge Sorted ArrayGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that i...
分类:
其他好文 时间:
2014-07-25 02:34:44
阅读次数:
162
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2014-07-24 21:24:16
阅读次数:
296
#用到了贪心方法。
#这个贪心刚开始想错了方法,后来想到了新的方法,AC
#include
#include
#include
#include
using namespace std;
struct note
{
int x1,x2,y1,y2,x,y;
int num;
} a[5010];
int vis[5010];
bool cmp1(note aa,note...
分类:
其他好文 时间:
2014-07-24 12:26:15
阅读次数:
185
题目比较简单。注意看测试用例2,给的提示Please note that this is the largest possible return value: whenever there is a solution, there is a solution that uses at most tw...
分类:
其他好文 时间:
2014-07-23 14:46:06
阅读次数:
283
Cocos2d-xWin32中使用VisualLeakDetector(forVC++)检查内存泄漏NOTE:本文引自我于2012-11写于ITPUB上的一篇小文,添加于此主要目前是为方便新开课程《基于CocoStudio开发跨平台拇指空当接龙游戏》学员们参考之用。VisualLeak
Detector(vld,下载地址http://vld.codeplex.com/..
分类:
编程语言 时间:
2014-07-23 13:48:37
阅读次数:
296
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.题解:所谓的anagrams,只若干个词,它们包含的字母的个数和种类完全一...
分类:
其他好文 时间:
2014-07-23 12:55:06
阅读次数:
167
题目
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it wit...
分类:
其他好文 时间:
2014-07-23 00:13:17
阅读次数:
331
首先用的还是winform,因为WPF那一套忘得有点多。第一个问题出在窗口位置挪动上,因为想用None风格的窗体,但是在onMouseMove事件中取MousePosition-e.X之后发现这个值是一定的,就是本来打算用鼠标坐标减去鼠标相对窗体坐标得到窗体相对屏幕坐标,但是在计算的时候如果把e.X...
分类:
其他好文 时间:
2014-07-22 22:53:53
阅读次数:
242
方便统计各种平台项目的代码量,主要用到了find指令来进行处理的详情点击打开链接。
源代码如下:
# -*- coding: utf-8 -*-
'''
Created on Jul 18, 2014
@author: Jayhomzhou
@note: 计算注释以及代码的总行数(即代码量)
'''
import subprocess
def countCodes(codePa...
分类:
编程语言 时间:
2014-07-21 16:38:02
阅读次数:
352