裸题,上模版,,嘿嘿
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define ll __int64
ll gcd(ll a, ll b) {
return b == 0 ? a : gcd(b, a%b);
}
//求一组解(x,y...
分类:
其他好文 时间:
2014-06-25 19:51:56
阅读次数:
138
题目
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return...
分类:
其他好文 时间:
2014-06-24 21:46:24
阅读次数:
249
【问题】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
【代码】
class Solution:
# @param s, a string
# @retu...
分类:
其他好文 时间:
2014-06-24 21:00:30
阅读次数:
168
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplica...
分类:
其他好文 时间:
2014-06-24 20:58:32
阅读次数:
230
【题目】
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
/ 2 3
Return 6.
【题意】
给定一棵二叉树,找出其中路径和最大的路径,然会返回最大路径和。
本题中的路径不是从根节点到叶子节点这样的传统的路...
分类:
其他好文 时间:
2014-06-24 20:42:59
阅读次数:
268
/*
混合C++、JS、python、Lisp、汇编
1种语言,5种语法
*/
main
{
//C++
vector v;
v.push(2);
putsl(v.size());
if(v.count()==1)
{
putsl("abc");
}
//JS
var a=function(x){
return x*2;
}
putsl(a(3));
a={90...
分类:
编程语言 时间:
2014-06-24 20:39:10
阅读次数:
307
c#公共类的时候,没法导航的问题,解决方法: private static PhoneApplicationFrame _frame; private static PhoneApplicationFrame Frame { get { return _fram...
分类:
其他好文 时间:
2014-06-24 18:57:35
阅读次数:
179
一:勘误
classifier类中: def fprob(self, f, cat):
if self.catcount(cat) == 0:
return 0
#notice: rember change int to double or float
# + 0.0 or *1.0 is ok, other wise, may get 0.
return self.fc...
分类:
其他好文 时间:
2014-06-24 17:49:42
阅读次数:
211
在.m文件中使用对象方法:- (id)init{_name =@“zhangsan”;_age = 18;return self;}然后通过main方法中进行创建对象并初始化:例如:Person *p1 = [[Person alloc] init];类方法alloc是分配内存空间,对象方法init...
分类:
其他好文 时间:
2014-06-24 15:13:45
阅读次数:
170
1.简单的函数指针的应用形式1:返回类型(*函数名)(參数表)char (*pFun)(int); char glFun(int a){ return;} void main() { pFun = glFun; (*pFun)(2); } 第一行定义了一个指针变量pFun。首先...
分类:
其他好文 时间:
2014-06-24 14:52:24
阅读次数:
162