Problem B: The Largest CliqueGiven a directed 
graphG, consider the following transformation. First, create a new graphT(G)to 
have the same vertex set ...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 14:09:34   
                                阅读次数:
357
                             
                    
                        
                            
                            
                                Problem XHuge ModInput:standard 
inputOutput:standard outputTime Limit:1 secondThe operator for exponentiation is 
different from the addition, subtract...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 09:03:35   
                                阅读次数:
540
                             
                    
                        
                            
                            
                                IIUPC2006Problem G: Going in Cycle!!Input: 
standard inputOutput: standard outputYou are given a weighted directed graph 
withnvertices andmedges. Each ...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 04:32:53   
                                阅读次数:
271
                             
                    
                        
                            
                            
                                Problem C: A Walk Through the ForestJimmy 
experiences a lot of stress at work these days, especially since his accident 
made working difficult. To rel...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 17:21:46   
                                阅读次数:
368
                             
                    
                        
                            
                            
                                Carmichael Numbers An important topic nowadays in 
computer science is cryptography. Some people even think that cryptography is 
the only important fi....
                            
                            
                                分类:
其他好文   时间:
2014-04-29 16:31:45   
                                阅读次数:
504
                             
                    
                        
                            
                            
                                题目链接:11538 - Chess Queen
题意:给一个n*m棋盘,问放两个皇后,使得两个皇后互相能攻击到,有几种放法
思路:分横竖,对角线来考虑。
横:n * A(m, 2)种
竖:m * A(n, 2)种
对角线:由于有两条,可以算一条再乘2
2 * 所有对角线和(A(对角线格数,2))。
那么对角线格数为:(1, 2, 3, 4 ... n .n .n .n.n - 1....
                            
                            
                                分类:
其他好文   时间:
2014-04-29 13:38:20   
                                阅读次数:
387
                             
                    
                        
                            
                            
                                题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=251
测模版:
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
#define ...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 13:31:21   
                                阅读次数:
542
                             
                    
                        
                            
                            
                                算法入门经典关于区间覆盖的讲解:
8.4.6:区间覆盖问题...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 13:21:23   
                                阅读次数:
262
                             
                    
                        
                            
                            
                                uva 10084 Hotter Colder
题目大意:
有一个人玩游戏,起初是个左下角(0,0) 右上角(10,10)的矩形,有一个宝藏藏在这之间。这个人起初在(0,0) 每次走到一个点,会告诉你与原来的点相比距离宝藏近了还是远了,还是不变,根据这个每次求宝藏的范围(面积)。
解题思路:
每次相当于形成一个新的范围是凸包,只需要求这个凸包所有的点,然后按照极角排序,求面积。
这题wa了很多次,感觉代码略麻烦了一点点。
代码:见文章...
                            
                            
                                分类:
其他好文   时间:
2014-04-28 10:14:41   
                                阅读次数:
370
                             
                    
                        
                            
                            
                                每个正整数都可以分解成斐波那契数列中的几个数相加……
从大到小贪心法就可以了……
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#define PI acos(-1.0)
#defi...
                            
                            
                                分类:
其他好文   时间:
2014-04-27 21:23:04   
                                阅读次数:
371