码迷,mamicode.com
首页 >  
搜索关键字:ugly number    ( 27156个结果
UVA 10689 - Yet another Number Sequence(矩阵快速幂)
UVA 10689 - Yet another Number Sequence 题目链接 题意:斐波那契给前两项,求出第n项,并保留m位 思路:挺裸的矩阵快速幂,就是取模的值是10^m 代码: #include #include const int mod[5] = {0, 10, 100, 1000, 10000}; int t, a, b, n, m; s...
分类:其他好文   时间:2014-07-22 00:31:37    阅读次数:279
LeetCode:Single Number II
Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
分类:其他好文   时间:2014-07-22 00:28:38    阅读次数:209
DBA日常维护SQL整理(原创)
database 概况信息检查 # 检查 database 基本信息 select * from v$version; select name ,open_mode,log_mode from v$database; select instance_number,instance_name ,status from gv$instance; show paramete...
分类:数据库   时间:2014-07-21 13:19:23    阅读次数:339
poj 3693 Maximum repetition substring(有点麻烦的后缀数组)
Maximum repetition substring Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6638   Accepted: 2007 Description The repetition number of a string is defined a...
分类:其他好文   时间:2014-07-21 11:35:34    阅读次数:244
从键盘上输入两个数,按小大的顺序输出
#include #include int main() {    int num1,num2;    int *num1_p=&num1,*num2_p=&num2,*pointer;    printf("Input the first number:");    scanf("%d",num1_p);    printf("Input the second num...
分类:其他好文   时间:2014-07-21 11:14:14    阅读次数:180
【leetcode刷题笔记】ZigZag Conversion
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo...
分类:其他好文   时间:2014-07-21 09:31:07    阅读次数:186
LeetCode:Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:其他好文   时间:2014-07-21 09:14:10    阅读次数:168
LeetCode:Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-07-21 09:07:24    阅读次数:207
HDU 4608 I-number--简单模拟
I-number Time Limit: 5000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 The I-number of x is defined to be an integer y, which satisfied the the conditions below: 1.  y>x; 2.  the sum of each...
分类:其他好文   时间:2014-07-20 23:24:13    阅读次数:298
ZOJ3543 Number String 动态规划
ZOJ3543 Number String状态f[i][j]表示长度为I的全排列,符合字符串的要求,最后一位数字是j的方案数。重点在要始终保持是f算的排列的数量,然后转移时用这些推出来新的情况。就是j#include #include using namespace std;const long l...
分类:其他好文   时间:2014-07-20 21:39:23    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!