摘要: 1280. Topological SortingTime limit: 1.0 second Memory limit: 64 MBMichael wants to win the world championship in programming and decided to studyNsubjects (for convenience we will number these subjects from 1 toN). Michael has worked out a study plan for this purpose. But it turned out that certain 阅读全文
posted @ 2013-08-07 07:59 persistent codeants 阅读(216) 评论(0) 推荐(0)
摘要: A little town started to construct a subway. The peculiarity of the town is that it is located on small islands, some of them are connected with tunnels or bridges. The mayor is sure that the subway is to be under the ground, that’s why the project must use the less bridges the better. The only requ 阅读全文
posted @ 2013-08-06 22:00 persistent codeants 阅读(277) 评论(0) 推荐(0)
摘要: The railway line “Yekaterinburg-Sverdlovsk” with several stations has been built. This railway line can be represented as a line segment, railway stations being points on it. The railway line starts at the station “Yekaterinburg” and finishes at the station “Sverdlovsk”, so stations are numbered sta 阅读全文
posted @ 2013-08-06 13:38 persistent codeants 阅读(279) 评论(0) 推荐(0)
摘要: 1208. Legendary Teams ContestTime limit: 1.0 second Memory limit: 64 MBNothing makes as old as years. A lot of cool contests are gone, a lot of programmers are not students anymore and are not allowed to take part at the contests. Though their spirit is fresh and young as it was years ago! And so on 阅读全文
posted @ 2013-08-05 21:35 persistent codeants 阅读(332) 评论(0) 推荐(0)
摘要: 1709. Penguin-AviaTime limit: 1.0 second Memory limit: 64 MBThe Penguin-Avia airline, along with other Antarctic airlines, experiences financial difficulties because of the world's economic crisis. People of Antarctica economize on flights and use trains or prefer to stay at home. The airline 阅读全文
posted @ 2013-08-05 18:57 persistent codeants 阅读(334) 评论(0) 推荐(0)
摘要: Ivanushka the Fool lives at the planet of 0-level. It's very unpleasant to live there. An awful climate, 80 hours working week, ugly girls… He, as well as every inhabitant of his planet, dreams to get to a planet ofN-th level. To the paradise.At each of thei-th level planets there are several hy 阅读全文
posted @ 2013-08-05 16:14 persistent codeants 阅读(303) 评论(0) 推荐(0)
摘要: BackgroundThe system of Martians’ blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can have one parent as well as ten. Nobody will be surprised by a hundred of children. Martians have got used 阅读全文
posted @ 2013-08-05 14:12 persistent codeants 阅读(225) 评论(0) 推荐(0)
摘要: 1106. Two TeamsTime limit: 1.0 second Memory limit: 64 MBThe group of people consists ofNmembers. Every member has one or more friends in the group. You are to write program that divides this group into two teams. Every member of each team must have friends in another team.InputThe first line of inp 阅读全文
posted @ 2013-08-04 21:35 persistent codeants 阅读(257) 评论(0) 推荐(0)
摘要: Vladislav Isenbaev is a two-time champion of Ural, vice champion of TopCoder Open 2009, and absolute champion of ACM ICPC 2009. In the time you will spend reading this problem statement Vladislav would have solved a problem. Maybe, even two…Since Vladislav Isenbaev graduated from the Specialized Edu 阅读全文
posted @ 2013-08-04 20:12 persistent codeants 阅读(302) 评论(0) 推荐(0)
摘要: Home PageWeb ContestsProblemsRanklistStatusStatistics 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int c[100]; 9 int s[100];10 int ans;11 int bitmap[100];12 int f[100][70][70],h;13 char str[100];14 int n,m,i,j,k;15 void init()16 {17 cin>>n>>m 阅读全文
posted @ 2013-08-03 18:39 persistent codeants 阅读(284) 评论(0) 推荐(0)