题目描述Description求任何一个大于1的自然数n,总可以拆分成若干个小于n的自然数之和输入输出格式Input/output输入格式:一个正整数n输出格式:n=XXX+XXX+XXX+XXX…total(总方案数)=XXX输入输出样例Sample input/output样例测试点#1输入样例...
                            
                            
                                分类:
其他好文   时间:
2015-05-03 17:19:41   
                                阅读次数:
164
                             
                         
                    
                        
                            
                            
                                题目描述 Description用递归的方法求斐波那契数列中的第N个数输入输出格式Input/output输入格式:一行,一个正整数n输出格式:一行,一个数,表示斐波那契数列中的第N个数输入输出样例Sample input/output样例测试点#1输入样例:15输出样例:610思路:经过讨论,得出...
                            
                            
                                分类:
其他好文   时间:
2015-05-01 23:43:56   
                                阅读次数:
225
                             
                         
                    
                        
                            
                            
                                题目描述 Description给定n(n>=1),用递归的方法计算1+2+3+4+...+(n-1)+n输入输出格式Input/output输入格式:一行,一个数n输出格式:一行,结果输入输出样例Sample input/output样例测试点#1输入样例:3输出样例:6思路:运行程序,当T=5时...
                            
                            
                                分类:
其他好文   时间:
2015-05-01 00:25:27   
                                阅读次数:
125
                             
                         
                    
                        
                            
                            
                                Wavio Sequence 
Input: Standard Input 
Output: Standard Output 
Time Limit: 2 Seconds 
  
Wavio is a sequence of integers. It has some interesting properties. 
·  Wavio is of odd length i.e. L =...
                            
                            
                                分类:
其他好文   时间:
2015-04-29 10:09:39   
                                阅读次数:
120
                             
                         
                    
                        
                            
                            
                                publicclassSolution{//youneedtotreatnasanunsignedvaluepublicinthammingWeight(intn){intc=0;while(n>0){c=c+n%2;n=n/2;}if(n==1)returnc+1;elsereturnc;}}Input:2147483648(10000000000000000000000000000000)Output:0Expected:1原因,题目要求int是无符号int型,而java..
                            
                            
                                分类:
其他好文   时间:
2015-04-28 18:57:10   
                                阅读次数:
98
                             
                         
                    
                        
                            
                            
                                Problem G
Probability|Given
Input: Standard Input
Output: Standard Output
 
N friends go to the local super market together. The probability of their buying something from the market is respectiv...
                            
                            
                                分类:
其他好文   时间:
2015-04-28 09:49:46   
                                阅读次数:
145
                             
                         
                    
                        
                            
                            
                                Description
Input
Output
Sample Input
4 4
1 2 3 4
Sample Output
4
HINT
Source
NCPC 2014
#include
#include
#include
using namespace...
                            
                            
                                分类:
编程语言   时间:
2015-04-26 19:48:33   
                                阅读次数:
273
                             
                         
                    
                        
                            
                            
                                Description
Input
 
Output
 
Sample Input
0
Sample Output
1
HINT
Source
NCPC 2014
题目我没看,直接看公式和输出要求就开始做了,意思就是求公式。。
明显大数,...
                            
                            
                                分类:
其他好文   时间:
2015-04-26 18:23:45   
                                阅读次数:
128
                             
                         
                    
                        
                            
                            
                                Description
Input
Output
Sample Input
1 4 1 4
1 6 1 6
Sample Output
Emma
HINT
Source
NCPC 2014
题意:两个人丢色子,每人有两个色子,给出色子的大小,要...
                            
                            
                                分类:
其他好文   时间:
2015-04-26 18:22:34   
                                阅读次数:
144
                             
                         
                    
                        
                            
                            
                                Description
Input
 
Output
 
Sample Input
4 4
1 2 2
2 3 1
3 4 1
4 1 2
Sample Output
3
HINT
Source
NCPC 2014
题意:有n个点,每个点最多一个加油站,然后m个条...
                            
                            
                                分类:
其他好文   时间:
2015-04-26 18:22:27   
                                阅读次数:
158