码迷,mamicode.com
首页 >  
搜索关键字:oj    ( 4253个结果
Edit Distance @Leetcode -- Python
http://oj.leetcode.com/problems/edit-distance/class Solution: # @return an integer def minDistance(self, word1, word2): len1 = len(word1)...
分类:编程语言   时间:2014-05-09 04:19:03    阅读次数:407
leetcode -day11 Clone Graph & Palindrome Partitioning I II
1、Clone Graph Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as...
分类:其他好文   时间:2014-05-09 02:17:58    阅读次数:336
Longest Valid Parentheses @Leetcode -- Python
http://oj.leetcode.com/problems/longest-valid-parentheses/ 1 class Solution: 2 # @param s, a string 3 # @return an integer 4 def longestVa...
分类:编程语言   时间:2014-05-09 00:11:38    阅读次数:410
[BZOJ3568]DZY Loves Math VII
本人BZOJ的处女作。这题题面还是蛮有趣的吧。然后三个问题都蛮有意思的。要保证正确性,出数据还是异常蛋疼啊。本来各出三题的。但是考虑到是OJ上的题,就搞在一起了。这样代码量就会比较大。
分类:其他好文   时间:2014-05-08 23:47:58    阅读次数:846
LeetCode OJ - Subsets 1 && 2
这道题的做法,一定得掌握啊!!! elegant & beautiful & concise下面是AC代码: 1 /** 2 * Given a set of distinct integers, S, return all possible subsets. 3 * 这道...
分类:其他好文   时间:2014-05-08 22:44:57    阅读次数:424
LeetCode OJ - Restore IP Addresses
这道题采用穷举法。 1 /** 2 * Given a string containing only digits, 3 * restore it by returning all possible valid IP address combinations. 4 ...
分类:其他好文   时间:2014-05-08 09:17:22    阅读次数:248
SCAU-OJ 8596 最长上升子序列
时间限制:300MS 内存限制:1000K提交次数:255 通过次数:118题型: 编程题语言: 无限制DescriptionA numeric sequence of ai is ordered if a1 a[j],j大于等于1且小于i,i>1;(3)f(i) = 1 当对任意j,(j大于等于1...
分类:其他好文   时间:2014-05-08 06:18:11    阅读次数:682
HDU 1011 Starship Troopers(树形dp)
OJ题目:click here~~ 树上的01背包 const int maxn = 102; int val[maxn]; int w[maxn]; vector g[maxn]; int dp[maxn][maxn]; int n , m ; void dfs(int u , int father){ int v , i , j , k; for(i = w[u];i...
分类:其他好文   时间:2014-05-08 05:09:28    阅读次数:323
POJ2406Power Strings
来源:http://poj.org/problem?id=2406  Power Strings Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 30293   Accepted: 12631 Description Given two strin...
分类:其他好文   时间:2014-05-08 02:03:40    阅读次数:337
POJ 2121 Inglish-Number Translator
来源:http://poj.org/problem?id=2121  Inglish-Number Translator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4475   Accepted: 1747 Description In th...
分类:其他好文   时间:2014-05-06 23:29:32    阅读次数:419
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!