摘要: A certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transport as much g 阅读全文
posted @ 2020-01-09 14:27 GRedComeT 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Order is an important concept in mathematics and in computer science. For example, Zorn's Lemma states: ``a partially ordered set in which every chain 阅读全文
posted @ 2020-01-09 12:48 GRedComeT 阅读(122) 评论(0) 推荐(0) 编辑
摘要: A catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second. For examp 阅读全文
posted @ 2020-01-09 10:37 GRedComeT 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to th 阅读全文
posted @ 2019-08-02 11:55 GRedComeT 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Ant Country consist of N towns.There are M roads connecting the towns. Ant Tony,together with his friends,wants to go through every part of the countr 阅读全文
posted @ 2019-08-02 09:27 GRedComeT 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Bessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing an 阅读全文
posted @ 2019-08-01 22:04 GRedComeT 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input输入有 阅读全文
posted @ 2019-08-01 15:42 GRedComeT 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。 球赛的规则如下: 如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。 如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。 根据这个规则,无需循环较量,或许就能确 阅读全文
posted @ 2019-08-01 14:53 GRedComeT 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任何2个素不相识的人中间最多只隔着6个人,即只用6个人就可以将他们联系在一起,因此他的理论也被称为“六度分离”理论(six degrees of sepa 阅读全文
posted @ 2019-08-01 13:46 GRedComeT 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。 Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s, 阅读全文
posted @ 2019-08-01 13:35 GRedComeT 阅读(173) 评论(0) 推荐(0) 编辑