排序
信仰..
学无止境
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU-1258(拓扑排序Kahn算法)
问题概述:有n个比赛队,编号为从1到n,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在 裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2(用P1 P2表示)这种,排名时P1在 必须在P2之前,现在请你编程序确定排名(答案不止一种,按照队伍从小到大排列) 输入样例: 对应输出:原创 2016-08-26 17:38:52 · 947 阅读 · 0 评论 -
Tsinghua OJ:灯塔(手排+归并排序)
灯塔(LightHouse) Description As shown in the following figure, If another lighthouse is in gray area, they can beacon each other. For example, in following figure, (B, R) is a pair of lig原创 2017-02-04 22:44:21 · 1688 阅读 · 1 评论 -
旅行商(TSP)->(拓扑排序)
旅行商(TSP) Description Shrek is a postman working in the mountain, whose routine work is sending mail to n villages. Unfortunately, road between villages is out of repair for long time, such原创 2017-02-08 22:17:09 · 2455 阅读 · 0 评论 -
Codeforces Round #461 (Div. 2)-D-Robot Vacuum Cleaner(排序)
D. Robot Vacuum Cleanertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPushok the dog has been chasing Imp for a few hours already.Fortunately, Imp...原创 2018-02-10 20:45:10 · 440 阅读 · 0 评论 -
Educational Codeforces Round 29-E-Turn Off The TV(想法题)
E. Turn Off The TVtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLuba needs your help again! Luba has n TV sets. She knows that i-th TV set will ...原创 2018-03-02 14:41:52 · 494 阅读 · 0 评论
分享