原题地址:https://oj.leetcode.com/problems/largest-number/题目内容:Given a list of non negative integers, arrange them such that they form the largest number.F...
分类:
其他好文 时间:
2015-01-18 02:01:27
阅读次数:
237
https://oj.leetcode.com/problems/majority-element/Given an array of sizen, find the majority element. The majority element is the element that appears...
分类:
其他好文 时间:
2015-01-17 22:06:02
阅读次数:
223
# -*- coding: utf8 -*-'''https://oj.leetcode.com/problems/regular-expression-matching/Implement regular expression matching with support for '.' and '...
分类:
编程语言 时间:
2015-01-17 06:25:11
阅读次数:
212
https://oj.leetcode.com/problems/climbing-stairs/You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or...
分类:
其他好文 时间:
2015-01-16 22:20:56
阅读次数:
252
https://oj.leetcode.com/problems/single-number-ii/Given an array of integers, every element appearsthreetimes except for one. Find that single one.Not...
分类:
其他好文 时间:
2015-01-16 22:08:50
阅读次数:
165
https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/Given a binary tree struct TreeLinkNode { TreeLinkNode *left; ...
分类:
其他好文 时间:
2015-01-15 23:23:20
阅读次数:
212
https://oj.leetcode.com/problems/binary-tree-inorder-traversal/Given a binary tree, return theinordertraversal of its nodes' values.For example:Given ...
分类:
其他好文 时间:
2015-01-15 21:40:38
阅读次数:
98
https://oj.leetcode.com/problems/binary-tree-preorder-traversal/Given a binary tree, return thepreordertraversal of its nodes' values.For example:Give...
分类:
其他好文 时间:
2015-01-15 21:33:47
阅读次数:
138
# -*- coding: utf8 -*-'''https://oj.leetcode.com/problems/container-with-most-water/Given n non-negative integers a1, a2, ..., an, where each represen...
分类:
编程语言 时间:
2015-01-15 20:18:43
阅读次数:
987
题目地址:POJ 2151
dp[i][j][k]表示第i个人前j个题做对了k道题的概率。然后把dp数组求出来之后,再利用容斥原理求出最终概率。
代码如下;
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define...
分类:
其他好文 时间:
2015-01-15 18:24:06
阅读次数:
128