码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[Leetcode][Python]37: Sudoku Solver
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'37: Sudoku Solverhttps://oj.leetcode.com/problems/sudoku-solver/Write a program to solve a...
分类:编程语言   时间:2015-02-06 07:01:37    阅读次数:192
[Leetcode][Python]19: Remove Nth Node From End of List
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'38: Count and Sayhttps://oj.leetcode.com/problems/count-and-say/The count-and-say sequence...
分类:编程语言   时间:2015-02-06 07:00:15    阅读次数:197
POJ 2151 Check the difficulty of problems(dp,求概率)
题目大意: 求每个队伍都至少做出一题,并且有人做题数大于等于N的概率。 解题思路: dp[i][j][k]表示第i支队伍在前j道题中做出k道的概率。 转移方程为: dp[i][j][k] = dp[i][j-1][k] * (1 - p[i][j]) + dp[i][j-1][k-1] * p[i][j]; 用s[i][j]表示第i支队伍作出的题目小于等于j的概率。 则s[i][j] ...
分类:其他好文   时间:2015-02-05 16:25:10    阅读次数:124
[Leetcode][Python]36: Valid Sudoku
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'36: Valid Sudokuhttps://oj.leetcode.com/problems/valid-sudoku/Determine if a Sudoku is val...
分类:编程语言   时间:2015-02-05 01:58:23    阅读次数:209
Partition List
https://oj.leetcode.com/problems/partition-list/Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater...
分类:其他好文   时间:2015-02-04 23:12:58    阅读次数:201
Remove Nth Node From End of List
https://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/Given a linked list, remove thenthnode from the end of list and return its head.For ...
分类:其他好文   时间:2015-02-04 21:33:04    阅读次数:136
Remove Duplicates from Sorted Array II
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array-ii/Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?...
分类:其他好文   时间:2015-02-04 20:15:06    阅读次数:109
[Leetcode][Python]35: Search Insert Position
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'35: Search Insert Positionhttps://oj.leetcode.com/problems/search-insert-position/Given a ...
分类:编程语言   时间:2015-02-04 02:00:33    阅读次数:185
[Leetcode][Python]34: Search for a Range
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'34: Search for a Rangehttps://oj.leetcode.com/problems/search-for-a-range/Given a sorted a...
分类:编程语言   时间:2015-02-04 01:55:27    阅读次数:207
Linked List Cycle II
https://oj.leetcode.com/problems/linked-list-cycle-ii/Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Fo...
分类:其他好文   时间:2015-02-03 22:42:02    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!