题意:给你一个数x,给你K次操作,每一次x变为大于等于 x 且是 i 的倍数的数。解题思路:可以知道 如果 变化以后 x 是i 和 i+1 的公倍数的倍数的话,那么x的值是不会变的,x 6 #include 7 #include 8 #include 9 #include10 #include11....
                            
                            
                                分类:
其他好文   时间:
2014-08-15 09:27:57   
                                阅读次数:
207
                             
                    
                        
                            
                            
                                HDU Number Transformation
题目链接
题意:按题目中要求求出最后的n
思路:推公式(i+1)x′>=ix,得到x′>=1+floor(xi+1),这样一来就可以递推x,那么注意题目中k很大,但是实际上如果i到一定数值之后,x就不会在增长了,这时候就可以break了
代码:
#include 
#include 
typedef long lo...
                            
                            
                                分类:
其他好文   时间:
2014-08-15 01:32:56   
                                阅读次数:
161
                             
                    
                        
                            
                            
                                题目链接题意:给你个x,k次操作,对于第i次操作是:要找个nx,使得nx是>=x的最小值,且能整除i,求k次操作后的数分析:经过打表找规律,会发现最后的x/i,这个倍数会趋于一个固定的值,求出这个固定的值和K相乘就可以了,为什么会趋于固定的值呢,因为最后虽然i在不断增长,但是x也是在增长的,每次的倍...
                            
                            
                                分类:
其他好文   时间:
2014-08-14 23:25:26   
                                阅读次数:
229
                             
                    
                        
                            
                            
                                打表可以知道到后面增量都一样了,,
推论就是  i 和 i+1 互质
#include 
#include 
#include 
#include 
using namespace std;
typedef long long ll;
const ll mx = 120000;
int main() {
    int cas = 0;
    ll x, k, y, dis, i;...
                            
                            
                                分类:
其他好文   时间:
2014-08-14 20:45:50   
                                阅读次数:
173
                             
                    
                        
                            
                            
                                Number Transformation
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 76 Accepted Submission(s): 28
Problem Description
Teacher Mai has an...
                            
                            
                                分类:
其他好文   时间:
2014-08-14 20:45:29   
                                阅读次数:
146
                             
                    
                        
                            
                            
                                hdu4952 Number Transformation(数学题 | 找规律)...
                            
                            
                                分类:
其他好文   时间:
2014-08-14 20:35:59   
                                阅读次数:
230
                             
                    
                        
                            
                            
                                Extraction-Transformation-Loading的缩写,中文名称为数据提取、转换和加载。将数据从ORACLE中抽取数据,经过hive进行分析转换,最后存放到ORACLE中去。本案例是纯demo级别,练手使用一、需求将emp和dept表的数据分析最后存放到result表。emp和de...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 22:14:52   
                                阅读次数:
371
                             
                    
                        
                            
                            
                                题目:Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can b....
                            
                            
                                分类:
编程语言   时间:
2014-08-06 01:52:30   
                                阅读次数:
251
                             
                    
                        
                            
                            
                                题目:Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter...
                            
                            
                                分类:
编程语言   时间:
2014-08-06 01:35:30   
                                阅读次数:
389
                             
                    
                        
                            
                            
                                Problem B: The Largest Clique
Given a directed graph G, consider the following transformation. First, create a new graph T(G) to have the same vertex set as G. Create a directed edge between two ve...
                            
                            
                                分类:
其他好文   时间:
2014-08-05 19:26:40   
                                阅读次数:
365