码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Codeforces 535B Tavas and SaDDas 数位DP
题意:good number 的定义是只有4,和 7组成 ,给你一个 good number ,问你它是第几个good number。解题思路:预处理位数为k 的个数,然后再枚举n的位数,如果这一位为 7 那么答案就要加上 这一位为4的情况数。解题代码: 1 // File Name: b.cpp ...
分类:其他好文   时间:2015-04-15 19:06:13    阅读次数:199
LeetCode: Reverse Nodes in k-Group
Title :Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen...
分类:其他好文   时间:2015-04-15 16:32:57    阅读次数:114
迷你MVVM框架 avalonjs 1.4.1发布
以后有关avalon的版本升级消息,全部改放到这里重构parseHTML,让其支持xhtml强化 ms-duplex-number拦截器 添加data-duplex-number辅助指令 值为strong medium weak ms-duplex添加对input[type=hidden]的支持cr...
分类:Web程序   时间:2015-04-15 16:27:34    阅读次数:161
有一些关于,orapwd命令entries参数的探究
早上看Oracle官方文档《Administrator's Guide》时,在密码文件章节,关于orapwd命令entries参数的说明如下: This argument specifies the number of entries that you require the pas...
分类:其他好文   时间:2015-04-15 16:15:50    阅读次数:163
GOOGLE与百度经纬度互转(plsql版)
首先创建两个存储过程 ?? BAIDU2GOOGLE(百度转google)和GOOGLE2BAIDU(google转百度)。 CREATE OR REPLACE PROCEDURE "BAIDU2GOOGLE" (in_lat IN OUT NUMBER,in_lng IN OUT NUMBER) IS    RESULT NUMBER;    V NUMBER;    X NUMB...
分类:数据库   时间:2015-04-15 13:34:50    阅读次数:153
#299 (div.2) B. Tavas and SaDDas
1.题目描述:点击打开链接 2.解题思路:本题要求找出所给的幸运数的下标。本题类似于紫书上的一道例题ugly number。利用BFS即可解决。首先将4,7入队列,每次出队列后,将数字添加到set,同时将它们的末尾分别添加是4,7后得到新的幸运数入队列即可。上述过程打表后,直接输出即可。 3.代码: #define _CRT_SECURE_NO_WARNINGS #include #inc...
分类:其他好文   时间:2015-04-15 13:33:18    阅读次数:123
【算法】完全背包
有n种物品和一个容量为m的背包,每种物品都有无限件可用。第i种物品的体积是weight,价值是value。求解将哪些物品装入背包可使这些物品的体积总和不超过背包容量,且价值总和最大。1 //"n" is the number of kinds.2 //"m" is the capacity of t...
分类:编程语言   时间:2015-04-15 13:29:09    阅读次数:139
1. 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...
分类:其他好文   时间:2015-04-15 13:21:32    阅读次数:114
JS==和===的区别
1、对于string,number等基础类型,==和===是有区别的1)不同类型间比较,==之比较“转化成同一类型后的值”看“值”是否相等,===如果类型不同,其结果就是不等2)同类型比较,直接进行“值”比较,两者结果一样2、对于Array,Object等高级类型,==和===是没有区别的进行“指针...
分类:Web程序   时间:2015-04-15 13:12:48    阅读次数:178
[*leetcode 39] Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num...
分类:其他好文   时间:2015-04-15 12:54:51    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!