码迷,mamicode.com
首页 >  
搜索关键字:consecutive numbers    ( 8082个结果
Codeforces 164 E Compatible Numbers
想法题!...
分类:其他好文   时间:2014-10-12 20:00:58    阅读次数:190
Leetcode: Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message con...
分类:其他好文   时间:2014-10-12 16:45:38    阅读次数:157
leetcode - Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1-...
分类:其他好文   时间:2014-10-12 15:51:58    阅读次数:190
BestCoder13 1001.Beautiful Palindrome Number(hdu 5062) 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5062题目意思:给出 N,找出 1 ~ 10^N 中满足 Beautiful Palindrome Numbers (BPN)的数量有多少。 满足 BPN 的条件有两个:(1)回文串 (2)对称的部分从....
分类:其他好文   时间:2014-10-12 13:30:28    阅读次数:185
Leetcode: Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest...
分类:其他好文   时间:2014-10-11 14:52:35    阅读次数:167
codeforces 165E - Compatible Numbers 【位运算】
题目:codeforces 165E - Compatible Numbers 题意:给出n个数,然后每个数对应输出一个当前数组中与 Ai 与运算为 0 的数,没有的话输出-1 分析:简单的位运算题目,技巧性题目 首先,我们知道与运算的性质,就是只有同时为 1的时候才是1,那么假如 x&y=0 ,就是至少 x 的为1的为 y 全为0,其他为自由,假设为 1 ,那么 y = x...
分类:其他好文   时间:2014-10-11 10:50:15    阅读次数:260
javascript精确计算
一篇文章:4 个用于执行高级数学计算的 JavaScript 库numbers.jsNumeric Javascriptaccounting.jsTangle有时只需要加减乘法能精确,没必要用到库。首先看下js浮点运算问题。JS里做小数的乘法运算时会出现浮点错误,具体可以测试一下: 结果是251.8...
分类:编程语言   时间:2014-10-10 19:52:24    阅读次数:225
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-10-10 16:26:13    阅读次数:141
Hunt the wumpus 《Python代码》
1 from random import choice 2 3 cave_numbers = range(1,21) 4 wumpus_location = choice(cave_numbers) 5 player_location = choice(cave_numbers) 6 while.....
分类:编程语言   时间:2014-10-10 15:18:43    阅读次数:289
leetcode--Add Two Numbers
Problem: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...
分类:其他好文   时间:2014-10-10 01:32:53    阅读次数:213
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!