原地踏步了半年,感觉一切都陌生了~题意:a[i]-一个任意的数,这个数要等于a[1]~a[i-1]每个数减去任意一个数,经过多次这样的变换到达目标b序列,能到达就yes不能到达距no.一开始各种分析,所有的差的和必须是偶数,sum(cha[1~i-1])>=cha[i](其中cha[i]=a[i]-...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 07:09:20   
                                阅读次数:
231
                             
                         
                    
                        
                            
                            
                                Arrange the Schedule
Time Limit: 1 Second      Memory Limit: 65536 KB
In Summer 2011, the ZJU-ICPC Team has a n-days training schedule. ZJU-ICPC Team has been divided into 4 Group: Akiba, BiliBi...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 04:05:08   
                                阅读次数:
335
                             
                         
                    
                        
                            
                            
                                DescriptionCerror is the mayor of city 
HangZhou. As you may know, the traffic system of this city is so terrible, that 
there are traffic jams everywhe...
                            
                            
                                分类:
其他好文   时间:
2014-05-25 11:40:26   
                                阅读次数:
393
                             
                         
                    
                        
                            
                            
                                大意:几个小镇要通过公路互通,已经建成了一些公路,问还需要建哪几条,并满足公路总长最小。
有多组输入,每组输入的格式是:n个城镇的坐标(x,y)  m条已经修好的路(公路一端城镇编号,另一端编号)。
输出格式为:(待建公路一端城镇编号,另一端编号)特殊判题,不用在意输出顺序。
注意:相邻两组测试样例的输出要有空行。最后一组后不加空行。不然就WR,竟然还不是PE!zoj不够友好。...
                            
                            
                                分类:
其他好文   时间:
2014-05-25 01:48:49   
                                阅读次数:
338
                             
                         
                    
                        
                            
                            
                                线段树的区域更新,然后单点查询。
x1 x2 c:区域更新x1-x2为c。
全部染色之后,从0-8000依次查询每个点的颜色。然后存贮每一种颜色有几块。
#include
#include
#include
#include
#include
using namespace std;
#define lmin 0
#define rmax 8000
#define lson l,(l+r)/...
                            
                            
                                分类:
其他好文   时间:
2014-05-24 19:10:12   
                                阅读次数:
221
                             
                         
                    
                        
                            
                            
                                注意,条件:B>=C 。应考虑B=C的情况。#includeusing namespace 
std;int A,B,C;void jugs(int a,int b,int C){ if(b==C) { cout=B) { a=A-(B-b...
                            
                            
                                分类:
其他好文   时间:
2014-05-24 09:34:19   
                                阅读次数:
288
                             
                         
                    
                        
                            
                            
                                题意:每次筛三个骰子面分别为k1,k2,k3,如果三个骰子的值分别为a,b,c则得分置0,否则得到分数加上三个骰子的值的和,如果得分大于等于n则结束游戏。设E[i]表示当前得到i分时结束游戏的期望。则E[i]=sum{Pk*(E[i+k]+1)|k为三个骰子可能取得的分数且不包括a,b,c这种情况}...
                            
                            
                                分类:
其他好文   时间:
2014-05-23 11:48:09   
                                阅读次数:
303
                             
                         
                    
                        
                            
                            
                                Little Mammoth
Time Limit: 5 Seconds      
Memory Limit: 32768 KB      Special Judge 
It is well known that mammoths used to live in caves. This is a story of a little mammoth who lived in a ca...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 22:49:43   
                                阅读次数:
495
                             
                         
                    
                        
                            
                            
                                ??
A Stack or A Queue?
Time Limit: 
1 Second      Memory Limit: 32768 KB 
Do you know stack and queue? They're both important data structures. A stack is a "first in last out" (FILO) data ...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 12:24:38   
                                阅读次数:
236
                             
                         
                    
                        
                            
                            
                                Evolution is a long, long process with extreme complexity and involves many species. Dr. C. P. Lottery is currently investigating a simplified model of evolution: consider that we haveN (2
 N N -1, a...
                            
                            
                                分类:
其他好文   时间:
2014-05-21 13:43:27   
                                阅读次数:
444