码迷,mamicode.com
首页 >  
搜索关键字:cf beautiful number    ( 30765个结果
Visulalization Voronoi in OpenSceneGraph
Abstract. In mathematics a Voronoi diagram is a way of dividing space into a number of regions. A set of points, called seeds, sites, or generators is...
分类:其他好文   时间:2014-05-01 09:46:54    阅读次数:493
求一个数的最大素因子(python实现)
首先想到的是,将这个数进行素因子分解,得到所有的因子,然后取最大的。 首先写一个判断一个数是否是素数的方法: #judge a number whether a prime def judgePrime(self,number,pme): if number < 2: ...
分类:编程语言   时间:2014-05-01 09:05:26    阅读次数:3333
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-05-01 08:35:40    阅读次数:443
C++术语
声明( declaration )是告诉编译器某个东西的名称和类型( type ),但略去细节。下面是声明的例子:extern int x; //对象(object )声明size_t numDigits( int number ); //函数声明( function ) 声明class...
分类:编程语言   时间:2014-05-01 08:20:43    阅读次数:414
装饰者模式
首先:我们建立一个超类:Clothes: public abstract class Clothes { public string Look = "beautiful"; public string Getlook() { ...
分类:其他好文   时间:2014-05-01 05:33:23    阅读次数:231
js中由undefined说起
typeof()函数 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"   js中undefined,null,NaN的区别 1.类型分析: js中的数据类型有undefined,boolean,number,string,object等5种,前4种为原始类型,第5种为引用类型。 未定义的值...
分类:Web程序   时间:2014-04-29 13:45:21    阅读次数:414
CF 295E Yaroslav and Points(Splay)
题目大意: 两个操作 1 id op  把id的位置+op 2 id op  查询在【id,op】之间的所有的数的差 思路: 关键是pushup函数。 自己退一下会发现,跟区间的总和,区间的节点个数有关。 比如如果左区间是 1 2 的话 右区间来一个 9 那么 就要加上 9-1+9-2  #include #include #include #incl...
分类:其他好文   时间:2014-04-29 13:44:22    阅读次数:475
sicily 1007 To and Fro (基础题)
链接:http://soj.me/show_problem.php?pid=1007 Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letter...
分类:其他好文   时间:2014-04-29 13:23:21    阅读次数:293
Codeforces Round #243 (Div. 1)-A,B,C-D
这场CF真是逗了。。。 因为早上7点起的,所以到做CF的时候已经17个小时没有休息了,再加上中午5小时的比赛。 头脑很不清晰。做第一个题的时候差点读成求最大字段和了。然后发现是水体,迅速A掉。 然后开始看了B题,第一遍没有看懂,此时大脑已经看不下去了。然后突然某个群说D是水题。 我去看了一下D,我去,D的题意好简单啊。。。。于是,冥思苦想中。。。。。一直到快要1点 的时候,还是没有结果。...
分类:其他好文   时间:2014-04-29 13:22:20    阅读次数:272
HDU2852 KiKi's K-Number 树状数组+二分
这题就是给了你三种操作, 1:往容器中一个元素 x 2::把容器中的元素x删除 3:查询比 x大的第k个数 想法:添加元素跟删除元素  直接是以数本身为序号然后以 value值为1和-1即可,相当于计数,至于找比x第k个大的数,那就看看当前往后数k个数的第一个数是哪个就可以了,一开始直接找出来,然后往后暴力的扫了一遍,结果错了,没关系,反应很快,直接改了个二分查找,然后就过了,弄清...
分类:其他好文   时间:2014-04-29 13:11:21    阅读次数:326
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!