DescriptionMike has many friends. Here are nine of them: Alice, Bob, Carol, Dave, Eve, Frank, Gloria, Henry and Irene.Mike is so skillful that he can ...
                            
                            
                                分类:
其他好文   时间:
2015-07-26 19:00:34   
                                阅读次数:
124
                             
                    
                        
                            
                            
                                ll T;while(~scanf("%d",&T)){while(T--) {= = ...思路:用秩合并,看了题解才发现 if(fx == fy)要输出当前集合的秩而不是0。。。#include #include #include #include #include #include #incl...
                            
                            
                                分类:
其他好文   时间:
2015-07-26 17:08:26   
                                阅读次数:
108
                             
                    
                        
                            
                            
                                Description 
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel’s friends...
                            
                            
                                分类:
其他好文   时间:
2015-07-26 15:47:49   
                                阅读次数:
86
                             
                    
                        
                            
                            
                                水水的DFS
题意:n个人m个关系,要求每个人的网上朋友和现实朋友一样多,求一共有多少种关系
解:因为数据小,暴力DFS就可以了,不过要一点小剪枝
#include 
#include 
int point[10];
struct aaa
{
    int x,y;
}line[30];
struct bbb
{
    int online,outline;
}node[10];
int...
                            
                            
                                分类:
其他好文   时间:
2015-07-26 11:14:08   
                                阅读次数:
126
                             
                    
                        
                            
                            
                                How Many Answers Are Wrong Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription TT and FF are ... friends. Uh....
                            
                            
                                分类:
其他好文   时间:
2015-07-25 21:33:40   
                                阅读次数:
159
                             
                    
                        
                            
                            
                                Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twili...
                            
                            
                                分类:
其他好文   时间:
2015-07-25 13:49:33   
                                阅读次数:
135
                             
                    
                        
                            
                            
                                题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5305
题面:
Friends
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1149    Accepted Subm...
                            
                            
                                分类:
其他好文   时间:
2015-07-25 12:21:59   
                                阅读次数:
86
                             
                    
                        
                            
                            
                                uva12546. LCM Pair SumOne of your friends desperately needs your help. He is working with a secret agency and doing some encoding stuffs. As the missi...
                            
                            
                                分类:
其他好文   时间:
2015-07-25 10:41:20   
                                阅读次数:
103
                             
                    
                        
                            
                            
                                题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5305题意:给你n个人,m条关系,关系可以是online也可以是offline,让你求在保证所有人online关系的朋友和offline关系的朋友相等的情况下,这样的情况有多少种。思路:因为online关...
                            
                            
                                分类:
其他好文   时间:
2015-07-24 22:13:33   
                                阅读次数:
125
                             
                    
                        
                            
                            
                                题意:
给你n个人m条关系
每条关系包含a,b
代表a和b可以是线上朋友也可以是线下朋友
然后保证每个人的线上朋友数和线下朋友数相等
问你有多少种组成方法
思路:
官方题解是爆搜+剪枝,然而并不会写。。
比赛的时候想到用高斯消元来剪枝
最后枚举自由元
因为关系的话到了最后肯定有些关系是确定的。
这样一定会消掉一些部分
最后G++AC C++TLE。。
代码:
#incl...
                            
                            
                                分类:
其他好文   时间:
2015-07-24 18:37:56   
                                阅读次数:
169