码迷,mamicode.com
首页 >  
搜索关键字:the inversion number    ( 27715个结果
Leetcode--Combination Sum II
Problem Description: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only b...
分类:其他好文   时间:2014-07-26 15:24:02    阅读次数:252
Java杂谈三之判断素数以及穷举素数
首先确认下什么是素数,又称质数 百度的定义解答: 质数(prime number)又称素数,有无限个。一个大于1的自然数,如果除了1和它本身 外,不能被其他自然数整除(除0以外)的数称之为素数(质数) 明确了素数的定义后,下面用java来判断素数以及穷举2-999以内的素数,还是一样,主 要看的是对一个数进行判断或者对一组数进行判断的思想,至于怎样判断的,百度的定义已经给...
分类:编程语言   时间:2014-07-26 15:11:27    阅读次数:238
Javascript高级程序设计学习笔记
3. 基本概念基本数据类型:Undefined,Null,Boolean,Number,String.复杂数据类型:Object.3.6 语句switch比较值时用的是全等运算符 “===” ,因此不会进行类型转换。例如 “10” 不等于10.3.7 函数ECMAScript函数不介意传递进来多少个...
分类:编程语言   时间:2014-07-26 14:58:40    阅读次数:230
Javascript日历
/** *?Created?by?YCXJ-wanglihui?on?2014/7/25. ?*?@module?utils */ ‘use?strict‘; /** ?*?@class?日历类?Calendar ?*?@constructor ?*?@param?{Number}?year ?*?@param?{Number}?mon...
分类:编程语言   时间:2014-07-26 03:36:07    阅读次数:349
HDU4876:ZCC loves cards
Problem Description ZCC loves playing cards. He has n magical cards and each has a number on it. He wants to choose k cards and place them around in any order to form a circle. He can choose any se...
分类:其他好文   时间:2014-07-26 03:02:26    阅读次数:289
[cocos2dx笔记013]一个使用CCRenderTexture创建动态纹理显示数字的类
用CCLabelTTF显示的数字不好看,于是就想到用图片来代理。目前网上的实现都是把每个数字做一个CCSprite组合的方式。但是我想,动态生成纹理的方式。没有就只好自己手动写一个。 头文件 #ifndef _X_NUMBER_H_ #define _X_NUMBER_H_ #include #include namespace cocos2d { //基于图片显示的数字 /* 这...
分类:其他好文   时间:2014-07-26 02:36:56    阅读次数:252
uva10706 - Number Sequence(找规律)
题目:uva10706 - Number Sequence(找规律) 题目大意:有这样一串序列11212312341234512345612345671234567812345678912345678910123456789101112345678910...,问第i个位置数的值。                                                   1 ...
分类:其他好文   时间:2014-07-26 02:27:06    阅读次数:168
Distinct Subsequences
-----QUESTION----- Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from the original string by...
分类:其他好文   时间:2014-07-26 02:10:36    阅读次数:210
P85
#include long fun(long num) { long k=1; do { k*=num%10; num/=10; } while(num>0); return k; } main() { long n; printf("please enter a number:"); scanf("%ld",&n); printf("\n%ld\n",fun(n));...
分类:其他好文   时间:2014-07-26 02:06:06    阅读次数:247
题目1043:Day of Week(输入日期与当前日起天数差%7,在做相关星期调整)
题目描述:We now use the Gregorian style of dating in Russia. The leap years are years with number divisible by 4 but not divisible by 100, or divisible by...
分类:其他好文   时间:2014-07-26 01:34:27    阅读次数:252
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!