题意:good number 的定义是只有4,和 7组成 ,给你一个 good number ,问你它是第几个good number。解题思路:预处理位数为k 的个数,然后再枚举n的位数,如果这一位为 7 那么答案就要加上 这一位为4的情况数。解题代码: 1 // File Name: b.cpp ...
分类:
其他好文 时间:
2015-04-15 19:06:13
阅读次数:
199
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
以后有关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
早上看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
首先创建两个存储过程
??
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
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
题目: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
1、对于string,number等基础类型,==和===是有区别的1)不同类型间比较,==之比较“转化成同一类型后的值”看“值”是否相等,===如果类型不同,其结果就是不等2)同类型比较,直接进行“值”比较,两者结果一样2、对于Array,Object等高级类型,==和===是没有区别的进行“指针...
分类:
Web程序 时间:
2015-04-15 13:12:48
阅读次数:
178
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