You are given an undirected graph G(V, E). Each vertex has a mark which is an integer from the range [0..231 – 1]. Different vertexes may have the same mark. For an edge (u, v), we define Cost(u, v) = mark[u] xor mark[v]. Now we know the marks of som…
Time Limit: 5 Seconds Memory Limit: 32768 KB Special Judge Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both directions. Two servers of the network are especially i…
Less Time, More profit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description The city planners plan to build N plants in the city which has M shops. Each shop needs products from some plants to make p…
Google Code Jam 2008 E 日程表 [题目描述] 热情的选手Sphinny正在看新一年的日程表,并发现已经安排了很多编 程竞赛.她将这一年的每一天都用以下三种方式之一在日程表上打标记. 1.白色:这一天她将不参加竞赛.或许这一天没有预定的竞赛,或许 这一天有更重要的事情要做(生活中肯定还有其他美好的事情). 2.蓝色:这一天她将参加一场竞赛. 3.问号:这一天有预定好的竞赛,但她还没有决定好是否参加. 为了简化问题,我们假设没有资格的概念:你不必参加一场比赛去取得另 一场比赛的…