摘要:
Raucous RockersYou just inherited the rights to N (1 <= N <= 20) previously unreleased songs recorded by the popular group Raucous Rockers. You plan to release a set of M (1 <= M <= 20) compact disks with a selection of these songs. Each disk can hold a maximum of T (1 <= T <= 20) 阅读全文
posted @ 2012-09-18 22:35
mtry
阅读(600)
评论(0)
推荐(0)
摘要:
Shopping OffersIOI'95In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In order to attract more customers, the shop introduces some special offers.A special offer consists of one or more product items 阅读全文
posted @ 2012-09-18 21:02
mtry
阅读(656)
评论(0)
推荐(0)
摘要:
Riding the FencesFarmer John owns a large number of fences that must be repaired annually. He traverses the fences by riding a horse along each and every one of them (and nowhere else) and fixing the broken parts.Farmer John is as lazy as the next farmer and hates to ride the same fence twice. Your 阅读全文
posted @ 2012-09-18 10:41
mtry
阅读(3335)
评论(0)
推荐(0)
摘要:
欧拉路径和欧拉回路欧拉路径:从某结点出发一笔画成所经过的路线叫做欧拉路径。欧拉回路:在欧拉路径的基础上又回到起点。a、凡是由偶点组成的连通图,一定可以一笔画成。画时可以把任一偶点为起点,最后一定能以这个点为终点画完此图。 b、凡是只有两个奇点的连通图(其余都为偶点),一定可以一笔画成。画时必须把一个奇点为起点,另一个奇点终点。 c、其他情况的图都不能一笔画出。(有偶数个奇点除以2便可算出此图需几笔画成。)欧拉回路和欧拉路径的判断欧拉回路:无向图:每个顶点的度数都是偶数,则存在欧拉回路。有向图:每个顶点的入度都等于出度,则存在欧拉回路。欧拉路径:无向图:当且仅当该图所有顶点的度数为偶数 或... 阅读全文
posted @ 2012-09-18 09:53
mtry
阅读(10622)
评论(0)
推荐(1)