Good Bye 2013

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
379 Good Bye 2013 FINISHED False 7200 349280997 Dec. 30, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 143 ) G New Year Cactus PROGRAMMING dp 3100

B"Jack and Jill are tired of the New Year tree, now they've got a New Year cactus at home! A cactus is a connected undirected graph where any two simple cycles have at most one common vertex. In other words, this graph doesn't have any edges that lie on more than one simple cycle. On the 31st of December they are going to decorate the cactus by hanging toys to its vertices. At most one toy is going to hang on each vertex -- it's either the toy Jack hung or the toy Jill hung. It's possible for a vertex to have no toys. Jack and Jill has been arguing, so they don't want any edge to connect two vertices where one vertex has Jack's toy and the other vertex has Jill's toy. Jack has decided to hang a toys. What maximum number of toys b can Jill hang if they both cooperate to maximize this value? Your task is to write a program that finds the sought b for all a from 0 to the number of vertices on the New Year Cactus. The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892500, xe2 x80 x89n xe2 x80 x89- xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m) -- the number of vertices and the number of edges, correspondingly. The next m lines contain two integers a, b each (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89a xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89b) that mean that there is an edge connecting vertices a xd0 xb8 b. Any pair of vertices has at most one edge between them. The first line must contain space-separated ba (for all 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) where ba equals the maximum number of Jill's toys on the cactus considering that it has a Jack's toys. Numbers ba go in the order of increasing a. The cactus from the second example is:"...

Tutorials

Tutorial Good Bye 2013

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
28021720 vjudge5 G June 25, 2017, 12:02 p.m. OK FPC TESTS 93 873 228659200 3100
40989203 ReaLNero1 G July 30, 2018, 10:42 p.m. OK GNU C++ TESTS 93 109 75673600 3100
16463690 bnuvjudge2 G March 2, 2016, 12:02 p.m. OK GNU C++ TESTS 93 109 76390400 3100
38578248 zx2003 G May 24, 2018, 6:28 a.m. OK GNU C++ TESTS 93 109 76492800 3100
27946935 vjudge1 G June 21, 2017, 1:34 p.m. OK GNU C++ TESTS 93 109 81817600 3100
16483756 vjudge5 G March 3, 2016, 2:04 p.m. OK GNU C++ TESTS 93 124 76390400 3100
16463742 bnuvjudge2 G March 2, 2016, 12:05 p.m. OK GNU C++ TESTS 93 124 76390400 3100
16463186 bnuvjudge2 G March 2, 2016, 11:41 a.m. OK GNU C++ TESTS 93 124 76390400 3100
14035212 130705009 G Nov. 2, 2015, 11:44 p.m. OK GNU C++ TESTS 93 124 76390400 3100
27944014 vjudge5 G June 21, 2017, 10:58 a.m. OK GNU C++ TESTS 93 124 78438400 3100
27944200 vjudge5 G June 21, 2017, 11:09 a.m. OK GNU C++ TESTS 93 124 126668800 3100
26795930 Yukine_Chris G May 2, 2017, 4:18 a.m. OK GNU C++11 TESTS 93 155 111104000 3100
27783420 miaom G June 15, 2017, midnight OK GNU C++11 TESTS 93 187 226611200 3100
27783407 miaom G June 14, 2017, 11:58 p.m. OK GNU C++11 TESTS 93 187 226611200 3100
20870774 ShyngyS G Sept. 23, 2016, 5:44 p.m. OK GNU C++11 TESTS 93 202 75878400 3100
12861304 syc1999 G Sept. 6, 2015, 7:20 a.m. OK GNU C++11 TESTS 93 202 75878400 3100
55544920 ragnarosS G June 14, 2019, 12:50 a.m. OK GNU C++11 TESTS 93 296 76083200 3100
57892701 lopare G July 28, 2019, 12:24 p.m. OK GNU C++11 TESTS 93 342 227737600 3100
57820187 py_ultron G July 26, 2019, 10:29 p.m. OK GNU C++11 TESTS 93 342 227737600 3100
40778593 zhouyuyang G July 26, 2018, 12:34 p.m. OK GNU C++11 TESTS 93 358 75776000 3100
12622810 -XraY- G Aug. 21, 2015, 4:34 a.m. OK GNU C++11 TESTS 93 389 76595200 3100
61100245 HIR180 G Sept. 23, 2019, 6:19 a.m. OK GNU C++14 TESTS 93 265 3584000 3100
26715433 hogloid G April 28, 2017, 8:19 a.m. OK GNU C++14 TESTS 93 311 66048000 3100
32789943 _LeMur_ G Nov. 29, 2017, 8:28 p.m. OK GNU C++14 TESTS 93 389 153702400 3100
23657272 Ali.Pi G Jan. 8, 2017, 10:03 p.m. OK GNU C++14 TESTS 93 467 229580800 3100
26715418 hogloid G April 28, 2017, 8:17 a.m. OK GNU C++14 TESTS 93 498 66764800 3100
26715430 hogloid G April 28, 2017, 8:19 a.m. OK GNU C++14 TESTS 93 498 66969600 3100
38685399 wcz112 G May 28, 2018, 5:45 a.m. OK GNU C++14 TESTS 93 561 152268800 3100
63421468 gongsuidashen G Oct. 26, 2019, 6:32 a.m. OK GNU C++17 TESTS 93 124 76492800 3100

remove filters

Back to search problems