码迷,mamicode.com
首页 >  
搜索关键字:humble numbers    ( 7694个结果
【leetcode】Add Two Numbers 解析以及拓展
题目: 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 it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Outpu...
分类:其他好文   时间:2014-08-10 13:08:30    阅读次数:296
LeetCode——Permutations
Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. 原题链接:https://oj...
分类:其他好文   时间:2014-08-10 10:25:50    阅读次数:265
HNU 12876 Quite Good Numbers 完美数变形
筛法是一种很快的方法,贴代码纪念一下。 做法很像筛法 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #...
分类:其他好文   时间:2014-08-10 10:19:50    阅读次数:223
cf55dBeautiful numbers数位dp
想到 最小公倍数 其余的就好搞了 ,可是没想到#include #include #include #include #include #include #include #include #include #include #include #include #includeusing names...
分类:数据库   时间:2014-08-09 23:11:49    阅读次数:313
Balanced Numbers数位dp
三进制搞下, 0 表示没出现过, 第i位为1 表示 i出现了奇数次, 2表示i 出现了偶数次。#include #include #include #include #include #include #include #include #include #include #include #inc...
分类:其他好文   时间:2014-08-09 23:07:59    阅读次数:325
UVA 401-- Palindromes--串处理
Palindromes  A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when t...
分类:其他好文   时间:2014-08-09 21:36:09    阅读次数:344
Minimum Inversion Number
Problem Description The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj. For a given sequence of numbers a1, a2, ..., an, if we move t...
分类:其他好文   时间:2014-08-09 18:48:38    阅读次数:241
poj 1845(等比数列前n项和及快速幂)
Sumdiv Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 13959   Accepted: 3433 Description Consider two natural numbers A and B. Let S be the sum of all natur...
分类:其他好文   时间:2014-08-09 11:43:07    阅读次数:226
POJ - 1392 Ouroboros Snake (欧拉回路的应用)
Description Ouroboros is a mythical snake from ancient Egypt. It has its tail in its mouth and continously devours itself. The Ouroboros numbers are binary numbers of 2^n bits that have the prop...
分类:其他好文   时间:2014-08-09 11:40:57    阅读次数:315
[LeetCode: 题解] Combination Sum
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-08 20:54:46    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!