Number Sequence
Time Limit: 1000MS
 
Memory Limit: 10000K
Total Submissions: 33215
 
Accepted: 9490
Description
A single positive integer i is given. Write a program to f...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 22:06:17   
                                阅读次数:
437
                             
                         
                    
                        
                            
                            
                                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
                             
                         
                    
                        
                            
                            
                                首先想到的是,将这个数进行素因子分解,得到所有的因子,然后取最大的。 
首先写一个判断一个数是否是素数的方法: #judge a number whether a prime def 
judgePrime(self,number,pme): if number < 2: ...
                            
                            
                                分类:
编程语言   时间:
2014-05-01 09:05:26   
                                阅读次数:
3333
                             
                         
                    
                        
                            
                            
                                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
                             
                         
                    
                        
                            
                            
                                2012山东省第三届ACM大学生程序设计竞赛    Mine Number     ACM省赛    DFS...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 13:47:21   
                                阅读次数:
359
                             
                         
                    
                        
                            
                            
                                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
                             
                         
                    
                        
                            
                            
                                有一个需要,给定一个数组,从中生成要求个数的随机数组,不重复,即getRandomArray(int[] originalArray,int number) 这样的一个函数。想了一下,可以这样做:
把数组元素放到一个List中从List中随机取一个数把取到的数从List中删除重复上述过程
代码如下:
import java.util.ArrayList;
import java.ut...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 13:41:20   
                                阅读次数:
295
                             
                         
                    
                        
                            
                            
                                链接: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
                             
                         
                    
                        
                            
                            
                                Pick apples
Time Limit: 1000MS Memory limit: 165536K
题目描述
Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a...
                            
                            
                                分类:
移动开发   时间:
2014-04-29 13:18:22   
                                阅读次数:
489
                             
                         
                    
                        
                            
                            
                                这题就是给了你三种操作,
1:往容器中一个元素 x
2::把容器中的元素x删除
3:查询比 x大的第k个数
想法:添加元素跟删除元素  直接是以数本身为序号然后以 value值为1和-1即可,相当于计数,至于找比x第k个大的数,那就看看当前往后数k个数的第一个数是哪个就可以了,一开始直接找出来,然后往后暴力的扫了一遍,结果错了,没关系,反应很快,直接改了个二分查找,然后就过了,弄清...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 13:11:21   
                                阅读次数:
326