随笔分类 -  拓扑排序

摘要:RewardTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2905Accepted Submission(s): 861Problem DescriptionDandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he has a tro 阅读全文
posted @ 2013-09-08 23:29 线性无关 阅读(98) 评论(0) 推荐(0)
摘要:Sorting It All OutTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 24712Accepted: 8565DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C. 阅读全文
posted @ 2013-09-08 21:09 线性无关 阅读(150) 评论(0) 推荐(0)
摘要:Rank of TetrisProblem Description自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的RP从高到低来排。终于,Lele要开始行动了,对N个人进行排名。为了方便起见,每个人都已经被编号,分别从0到N-1,并且编号越大,RP就越高。同时Lele从狗仔队里取得一些(M个)关于Ra 阅读全文
posted @ 2013-09-06 21:44 线性无关 阅读(387) 评论(0) 推荐(0)
摘要:确定比赛名次Problem Description有N个比赛队(1#include#include#include#include#include#includeusingnamespacestd;inthead[600],tol,n,in[600],ans[600],indexx;intmaxn=10010;structnode{intto,next;}edge[1000000];voidadd(intu,intv){edge[tol].to=v;edge[tol].next=head[u];head[u]=tol++;}inttopo(){inti,j,k;indexx=0;priorit 阅读全文
posted @ 2013-09-04 21:38 线性无关 阅读(92) 评论(0) 推荐(0)