Codeforces Round 421 (Div. 1)

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
819 Codeforces Round 421 (Div. 1) FINISHED False 7200 238605863 June 27, 2017, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 550 ) E Mister B and Flight to the Moon PROGRAMMING constructive algorithms graphs 2800

B'In order to fly to the Moon Mister B just needs to solve the following problem. There is a complete indirected graph with n vertices. You need to cover it with several simple cycles of length 3 and 4 so that each edge is in exactly 2 cycles. We are sure that Mister B will solve the problem soon and will fly to the Moon. Will you? The only line contains single integer n (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300). If there is no answer, print -1. Otherwise, in the first line print k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n2) -- the number of cycles in your solution. In each of the next k lines print description of one cycle in the following format: first print integer m (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x894) -- the length of the cycle, then print m integers v1, xe2 x80 x89v2, xe2 x80 x89..., xe2 x80 x89vm (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89vi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the vertices in the cycle in the traverse order. Each edge should be in exactly two cycles. '...

Tutorials

Codeforces Round #421 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
28099793 jiyutian E June 27, 2017, 5:25 p.m. OK GNU C++ TESTS 55 15 1945600 2800
28208556 BeLikeIroh E July 2, 2017, 10:51 a.m. OK GNU C++ TESTS 55 30 2150400 2800
28107596 a_student E June 28, 2017, 4:20 a.m. OK GNU C++ TESTS 55 30 2150400 2800
28587243 Scut82 E July 16, 2017, 5:04 a.m. OK GNU C++ TESTS 55 30 3686400 2800
28111736 wanna_yellow E June 28, 2017, 8:53 a.m. OK GNU C++ TESTS 55 30 4198400 2800
31937580 xht13127 E Nov. 1, 2017, 3:52 a.m. OK GNU C++ TESTS 55 31 1331200 2800
28168189 victbr E June 30, 2017, 9:02 a.m. OK GNU C++ TESTS 55 31 2150400 2800
28248247 737363395 E July 3, 2017, 7:55 a.m. OK GNU C++ TESTS 55 31 3584000 2800
28097177 1919810 E June 27, 2017, 4:28 p.m. OK GNU C++ TESTS 55 31 3584000 2800
28101762 skywalkert E June 27, 2017, 6:34 p.m. OK GNU C++ TESTS 55 31 3686400 2800
28094347 FizzyDavid E June 27, 2017, 4:09 p.m. OK GNU C++11 TESTS 55 15 3072000 2800
30912194 XJT E Oct. 1, 2017, 3:01 p.m. OK GNU C++11 TESTS 55 30 1228800 2800
28160224 Cherries E June 30, 2017, 12:26 a.m. OK GNU C++11 TESTS 55 30 1945600 2800
34502009 zhouyuyang E Jan. 24, 2018, 3:01 a.m. OK GNU C++11 TESTS 55 30 4915200 2800
57874151 lopare E July 28, 2019, 4:05 a.m. OK GNU C++11 TESTS 55 31 0 2800
54504350 WOSHIGEPACHONG2 E May 23, 2019, 2:16 a.m. OK GNU C++11 TESTS 55 31 0 2800
69936818 Ging_ E Feb. 1, 2020, 4:17 a.m. OK GNU C++11 TESTS 55 31 1024000 2800
28315243 2016339910033 E July 6, 2017, 3:19 a.m. OK GNU C++11 TESTS 55 31 2150400 2800
28204956 DTDT E July 2, 2017, 7:03 a.m. OK GNU C++11 TESTS 55 31 3072000 2800
28174190 geniucos E June 30, 2017, 2:06 p.m. OK GNU C++11 TESTS 55 31 3072000 2800
33956508 kfoozminus E Jan. 6, 2018, 6 a.m. OK GNU C++14 TESTS 55 15 1843200 2800
28713585 Mr.Gangpao E July 20, 2017, 6:12 a.m. OK GNU C++14 TESTS 55 15 1945600 2800
28141234 _ShadowSong E June 29, 2017, 2 p.m. OK GNU C++14 TESTS 55 15 1945600 2800
28347842 gamegame E July 7, 2017, 10:59 a.m. OK GNU C++14 TESTS 55 15 2764800 2800
28723528 jiaqiyang E July 20, 2017, 11:42 a.m. OK GNU C++14 TESTS 55 15 2969600 2800
28093882 Seter E June 27, 2017, 4:05 p.m. OK GNU C++14 TESTS 55 15 2969600 2800
28477992 gasin E July 12, 2017, 3:20 p.m. OK GNU C++14 TESTS 55 15 3072000 2800
28099999 ko_osaga E June 27, 2017, 5:30 p.m. OK GNU C++14 TESTS 55 15 3174400 2800
29025455 shirry E July 30, 2017, 7:20 p.m. OK GNU C++14 TESTS 55 30 1945600 2800
28140242 xiangel E June 29, 2017, 1:04 p.m. OK GNU C++14 TESTS 55 30 1945600 2800
45221134 Shayan.P E Nov. 2, 2018, 9:13 p.m. OK GNU C++17 TESTS 55 31 1126400 2800
40431098 ganbaranai E July 16, 2018, 3:31 p.m. OK GNU C++17 TESTS 55 31 1638400 2800
43415693 aki167yuuki E Sept. 25, 2018, 3:24 p.m. OK GNU C++17 TESTS 55 46 0 2800
68121640 hjk1030 E Jan. 3, 2020, 1:33 p.m. OK GNU C++17 TESTS 55 46 1126400 2800
48374826 Smaug E Jan. 14, 2019, 7 a.m. OK GNU C++17 TESTS 55 46 1740800 2800
48532274 _MGH_ E Jan. 18, 2019, 12:34 p.m. OK GNU C++17 TESTS 55 93 11059200 2800
28098866 Lewin E June 27, 2017, 5:08 p.m. OK Java 8 TESTS 55 171 20889600 2800
28195434 dened E July 1, 2017, 4:48 p.m. OK Kotlin TESTS 55 264 20889600 2800
28104677 Yash_ E June 27, 2017, 10:25 p.m. OK PyPy 2 TESTS 55 421 26316800 2800
28103344 Lewin E June 27, 2017, 8:10 p.m. OK Python 2 TESTS 55 108 6656000 2800
28103400 Lewin E June 27, 2017, 8:16 p.m. OK Python 2 TESTS 55 124 6860800 2800
28102665 Golovanov399 E June 27, 2017, 7:23 p.m. OK Python 2 TESTS 55 124 7577600 2800
36316441 cjquines E March 16, 2018, 4:41 a.m. OK Python 2 TESTS 55 124 7884800 2800
28236827 kambabamba E July 2, 2017, 8:35 p.m. OK Python 3 TESTS 55 187 6553600 2800
28114241 Vosatorp E June 28, 2017, 11:17 a.m. OK Python 3 TESTS 55 343 7270400 2800

remove filters

Back to search problems