题目链接: http://acm.hust.edu.cn/vjudge/problem/129727 D - Book Club Time Limit: 5000MS 题意 给你一个无自环的有向图,问你最后能不能将每个点都划分在若干个有向环里(每个点最后只能属于一个环). 题解 这题一开始思路就跑偏了,想到连通分量去了..orz 后来仔细一想,这不是边的分配问题吗!!!首先入度和出度可以分开考虑的,我们只需要考虑每个点的出度就行了,如果一个点的出度只有1,那就显然只能连它了,但是如果它有多个出边…
UVALive - 4108 SKYLINE Time Limit: 3000MS 64bit IO Format: %lld & %llu Submit Status uDebug Description The skyline of Singapore as viewed from the Marina Promenade (shown on the left) is one of the iconic scenes of Singapore. Country X would a…
UVALive - 3942 Remember the Word A potentiometer, or potmeter for short, is an electronic device with a variable electric resistance. It has two terminals and some kind of control mechanism (often a dial, a wheel or a slide) with which the resistance…
UVALive - 3942 Remember the Word Neal is very curious about combinatorial problems, and now here comes a problem about words. Know- ing that Ray has a photographic memory and this may not trouble him, Neal gives it to Jiejie. Since Jiejie can’t remem…
Malek Dance Club time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As a tradition, every year before IOI all the members of Natalia Fan Club are invited to Malek Dance Club to have a fun nigh…