海绵的博客

竞赛虐我千百遍,我待竞赛如初恋。 Never Give Up!!!

排序:
默认
按更新时间
按访问量

Werewolf( 推理+归纳)

Problem Description "The Werewolves" is a popular card game among young people.In the basic game, there are 2 different groups: th...

2018-08-09 21:02:29

阅读数:97

评论数:0

L2-007. 家庭房产(并查集,给我用join)

L2-007. 家庭房产 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard ...

2018-03-29 17:00:43

阅读数:30

评论数:0

风险度量 (判断联通性)

X星系的的防卫体系包含 n 个空间站。这 n 个空间站间有 m 条通信链路,构成通信网。 两个空间站间可能直接通信,也可能通过其它空间站中转。对于两个站点x和y (x != y), 如果能找到一个站点z,使得: 当z被破坏后,x和y无法通信,则称z为关于x,y的关键站点。显然,对于给定的两个站点,...

2018-03-24 22:53:48

阅读数:43

评论数:0

历届试题 国王的烦恼

问题描述  C国由n个小岛组成,为了方便小岛之间联络,C国在小岛间建立了m座大桥,每座大桥连接两座小岛。两个小岛间可能存在多座桥连接。然而,由于海水冲刷,有一些大桥面临着不能使用的危险。  如果两个小岛间的所有大桥都不能使用,则这两座小岛就不能直接到达了。然而,只要这两座小岛的居民能通过其他的桥或...

2018-03-07 21:52:04

阅读数:65

评论数:0

Mahmoud and a Dictionary CodeForces - 766D

http://codeforces.com/problemset/problem/766/D 带权并查集 #include #include #include #include #include #include typedef long long ll; using namespace ...

2017-10-30 23:16:17

阅读数:66

评论数:0

食物链 POJ - 1182 **

动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y&qu...

2017-08-26 23:43:12

阅读数:114

评论数:0

Assign the task

There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole comp...

2017-08-10 09:48:26

阅读数:84

评论数:0

The Suspects

Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimiz...

2017-07-27 10:01:23

阅读数:64

评论数:0

Wireless Network

An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an une...

2017-07-25 10:14:09

阅读数:260

评论数:0

Knight Tournament

Hooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the kingdom and they in t...

2017-07-25 10:07:38

阅读数:191

评论数:0

How Many Tables

Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to...

2017-07-25 10:05:47

阅读数:69

评论数:0

Vessels

There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered from 1 to n, in the or...

2017-07-20 23:23:49

阅读数:144

评论数:0

Ubiquitous Religions

Petya has recently learned data structure named “Binary heap”. The heap he is now operating with allows the following operations: put the given nu...

2017-07-20 22:23:13

阅读数:74

评论数:0

A - 畅通工程

并查集是我暑假从高手那里学到的一招,觉得真是太精妙的设计了。以前我无法解决的一类问题竟然可以用如此简单高效的方法搞定。不分享出来真是对不起party了。(party:我靠,关我嘛事啊?我跟你很熟么?)来看一个实例,杭电1232畅通工程首先在地图上给你若干个城镇,这些城镇都可以看作点,然后告诉你哪些...

2017-07-17 21:20:13

阅读数:108

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭