码迷,mamicode.com
首页 >  
搜索关键字:palindrome numbers    ( 9163个结果
Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.N...
分类:其他好文   时间:2014-08-25 20:41:44    阅读次数:192
ural Threeprime Numbers(dp)
http://acm.timus.ru/problem.aspx?space=1&num=1586 题意没看懂,看了别人的翻译。threeprime number的意思是任意三个连续的数组成的一个三位数是素数,注意必须是三位数。给出n,问满足条件的n位数有多少个。 先把三位数的素数筛选出来并标记,设dp[i][j][k]表示到i位为止,最后两位是j和k的满足条件的数的个数。 ...
分类:其他好文   时间:2014-08-25 19:15:44    阅读次数:161
Raising Modulo Numbers(ZOJ 2150)
这是题目的答案#include#includeusing namespace std;int a[45002];int b[45002];int mod(int a, int b, int c){ int z = 1; while(b) { if(b%2) ...
分类:其他好文   时间:2014-08-25 13:20:14    阅读次数:132
Hackerrank--Prime Sum
题目链接The problem is quite simple. You're given a number N and a positive integer K. Tell if N can be represented as a sum of K prime numbers (not neces...
分类:其他好文   时间:2014-08-25 13:19:04    阅读次数:270
projecteuler---->problem=34----Digit factorials
Problem 34 145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are...
分类:其他好文   时间:2014-08-25 11:59:14    阅读次数:243
projecteuler---->problem=36----Double-base palindromes
Problem 36 The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please...
分类:其他好文   时间:2014-08-25 10:06:04    阅读次数:198
19. Palindrome Partitioning && Palindrome Partitioning II (回文分割)
思想: 简单的深度优先搜索。 思想: 动态规划: n = s.length(); Record[i] = 0 , ( i = n || is...
分类:其他好文   时间:2014-08-25 02:17:23    阅读次数:187
[LeetCode] Combination Sum (bfs)
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeate...
分类:其他好文   时间:2014-08-24 23:34:33    阅读次数:259
[LeetCode] Combination Sum II (递归)
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:其他好文   时间:2014-08-24 23:29:33    阅读次数:176
LeetCode: Palindrome Partition
LeetCode: Palindrome PartitionGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome ...
分类:其他好文   时间:2014-08-24 19:21:22    阅读次数:196
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!