Codeforces Round 565 (Div. 3)

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
1176 Codeforces Round 565 (Div. 3) FINISHED False 7200 177348287 June 9, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11554 ) E Cover it! PROGRAMMING dfs and similar ds graphs shortest paths trees 1700

B"You are given an undirected unweighted connected graph consisting of n vertices and m edges. It is guaranteed that there are no self-loops or multiple edges in the given graph. Your task is to choose at most lfloor frac{n}{2} rfloor vertices in this graph so each unchosen vertex is adjacent (in other words, connected by an edge) to at least one of chosen vertices. It is guaranteed that the answer exists. If there are multiple answers, you can print any. You will be given multiple independent queries to answer. The first line contains a single integer t ( 1 <= t <= 2 cdot 10^5 ) -- the number of queries. Then t queries follow. The first line of each query contains two integers n and m ( 2 <= n <= 2 cdot 10^5 , n - 1 <= m <= min(2 cdot 10^5, frac{n(n-1)}{2}) ) -- the number of vertices and the number of edges, respectively. The following m lines denote edges: edge i is represented by a pair of integers v_i , u_i ( 1 <= v_i, u_i <= n , u_i ne v_i ), which are the indices of vertices connected by the edge. There are no self-loops or multiple edges in the given graph, i. xe2 x80 x89e. for each pair ( v_i, u_i ) there are no other pairs ( v_i, u_i ) or ( u_i, v_i ) in the list of edges, and for each pair ( v_i, u_i ) the condition v_i ne u_i is satisfied. It is guaranteed that the given graph is connected. It is guaranteed that sum m <= 2 cdot 10^5 over all queries. For each query print two lines. In the first line print k ( 1 <= lfloor frac{n}{2} rfloor ) -- the number of chosen vertices. In the second line print k distinct integers c_1, c_2, ... , c_k in any order, where c_i is the index of the i -th chosen vertex. It is guaranteed that the answer exists. If there are multiple answers, you can print any. In the first query any vertex or any pair of vertices will suffice. Note that you don't have to m"...

Tutorials

67598

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55396595 vjudge2 E June 10, 2019, 12:03 p.m. OK Clang++17 Diagnostics TESTS 23 1419 36249600 1700
55584410 xzxxzx401 E June 15, 2019, 8:38 a.m. OK Clang++17 Diagnostics TESTS 23 1466 35635200 1700
55430076 Denor E June 11, 2019, 10:58 a.m. OK Delphi TESTS 23 233 7475200 1700
56028097 gregr E June 25, 2019, 8:03 a.m. OK GNU C11 TESTS 23 1840 819200 1700
55537900 fabianoo E June 13, 2019, 5:34 p.m. OK GNU C11 TESTS 23 1902 819200 1700
61395783 chenyewei_1234 E Sept. 28, 2019, 2:05 a.m. OK GNU C++11 TESTS 23 46 10649600 1700
55610705 ReaLNero1 E June 16, 2019, 5:31 a.m. OK GNU C++11 TESTS 23 62 41574400 1700
58843178 BestMSN E Aug. 15, 2019, 3:20 a.m. OK GNU C++11 TESTS 23 77 614400 1700
55403993 luoZH111 E June 10, 2019, 3:32 p.m. OK GNU C++11 TESTS 23 77 10444800 1700
68843614 yl6273500 E Jan. 15, 2020, 6:40 a.m. OK GNU C++11 TESTS 23 77 11878400 1700
56270016 OIerwanhong E June 29, 2019, 11:43 a.m. OK GNU C++11 TESTS 23 77 14643200 1700
63076816 Kylin_ E Oct. 21, 2019, 1:56 p.m. OK GNU C++11 TESTS 23 77 18944000 1700
58843512 BestMSN E Aug. 15, 2019, 3:35 a.m. OK GNU C++11 TESTS 23 78 614400 1700
55433722 Frame233 E June 11, 2019, 12:50 p.m. OK GNU C++11 TESTS 23 78 5427200 1700
55395197 luogu_bot1 E June 10, 2019, 11:28 a.m. OK GNU C++11 TESTS 23 78 12492800 1700
57380113 a_solo_player E July 20, 2019, 2:14 p.m. OK GNU C++14 TESTS 23 155 819200 1700
55432687 StupidTurtle E June 11, 2019, 12:16 p.m. OK GNU C++14 TESTS 23 155 8294400 1700
55389491 Chirography_11 E June 10, 2019, 9:02 a.m. OK GNU C++14 TESTS 23 155 10137600 1700
56064148 201716080213 E June 26, 2019, 7:03 a.m. OK GNU C++14 TESTS 23 155 11059200 1700
58870963 zhaoxiaoyun E Aug. 15, 2019, 3:25 p.m. OK GNU C++14 TESTS 23 155 11878400 1700
55389468 ac_or_wa E June 10, 2019, 9:01 a.m. OK GNU C++14 TESTS 23 155 13312000 1700
56640823 Scut82 E July 7, 2019, 1:29 a.m. OK GNU C++14 TESTS 23 155 13619200 1700
55409541 Jefe E June 10, 2019, 6:43 p.m. OK GNU C++14 TESTS 23 155 14336000 1700
55401948 echozhou E June 10, 2019, 2:29 p.m. OK GNU C++14 TESTS 23 156 819200 1700
69168270 _XXXTENTACION E Jan. 20, 2020, 5:02 a.m. OK GNU C++14 TESTS 23 156 10240000 1700
57557499 lesskreker E July 22, 2019, 8:48 p.m. OK GNU C++17 TESTS 23 124 19558400 1700
55394420 Kurisuzzz E June 10, 2019, 11:10 a.m. OK GNU C++17 TESTS 23 124 20582400 1700
55388047 Shawshen E June 10, 2019, 8:25 a.m. OK GNU C++17 TESTS 23 139 819200 1700
55917573 vjudge4 E June 22, 2019, 6:09 a.m. OK GNU C++17 TESTS 23 140 11776000 1700
55683100 LIN88 E June 17, 2019, 2:04 p.m. OK GNU C++17 TESTS 23 155 4403200 1700
55401730 zzbone E June 10, 2019, 2:23 p.m. OK GNU C++17 TESTS 23 155 10752000 1700
55405622 Edwivv E June 10, 2019, 4:22 p.m. OK GNU C++17 TESTS 23 155 13209600 1700
59937186 vjudge4 E Sept. 3, 2019, 9:57 a.m. OK GNU C++17 TESTS 23 155 14540800 1700
56046126 BBpigeon E June 25, 2019, 4:41 p.m. OK GNU C++17 TESTS 23 155 15360000 1700
57883128 andywu E July 28, 2019, 8:41 a.m. OK GNU C++17 TESTS 23 155 26316800 1700
55609305 efimmanevich E June 16, 2019, 4:17 a.m. OK Go TESTS 23 327 4608000 1700
56281080 pohzipohzi E June 29, 2019, 4:50 p.m. OK Go TESTS 23 1684 77516800 1700
56281142 pohzipohzi E June 29, 2019, 4:52 p.m. OK Go TESTS 23 1684 77516800 1700
68742024 zhanyi_xiaolu E Jan. 14, 2020, 1:55 a.m. OK Java 11 TESTS 23 577 49152000 1700
68466738 ZeyadKhattab E Jan. 9, 2020, 8:58 p.m. OK Java 11 TESTS 23 685 51814400 1700
58171936 hasan5788 E Aug. 2, 2019, 11:41 a.m. OK Java 8 TESTS 23 187 0 1700
55412630 Ahmed_Diab E June 10, 2019, 9:30 p.m. OK Java 8 TESTS 23 218 10854400 1700
55430802 In_The_Name_Of_Love E June 11, 2019, 11:20 a.m. OK Java 8 TESTS 23 233 4812800 1700
57700201 JCKG E July 24, 2019, 5:37 p.m. OK Java 8 TESTS 23 248 15052800 1700
55412539 Ahmed_Diab E June 10, 2019, 9:23 p.m. OK Java 8 TESTS 23 249 11878400 1700
55946284 kusomushi E June 22, 2019, 8 p.m. OK Java 8 TESTS 23 265 5222400 1700
55387384 cplayer E June 10, 2019, 8:09 a.m. OK Java 8 TESTS 23 265 5939200 1700
68395515 rishisharma__ E Jan. 8, 2020, 10:52 a.m. OK Java 8 TESTS 23 373 39424000 1700
55560147 bluesky111 E June 14, 2019, 12:13 p.m. OK Java 8 TESTS 23 374 38502400 1700
55397269 amolpratap007 E June 10, 2019, 12:20 p.m. OK Java 8 TESTS 23 374 39833600 1700
55978514 bavian E June 23, 2019, 7:07 p.m. OK Kotlin TESTS 23 327 5734400 1700
59931526 Spheniscine E Sept. 3, 2019, 7:22 a.m. OK Kotlin TESTS 23 1091 75673600 1700
59931576 Spheniscine E Sept. 3, 2019, 7:24 a.m. OK Kotlin TESTS 23 1122 75673600 1700
59930704 Spheniscine E Sept. 3, 2019, 7:04 a.m. OK Kotlin TESTS 23 1185 75776000 1700
55422794 max_kibble E June 11, 2019, 7:25 a.m. OK Kotlin TESTS 23 1201 54374400 1700
55659722 Jamb0t E June 16, 2019, 7:52 p.m. OK Kotlin TESTS 23 1481 142950400 1700
55388355 alxrm E June 10, 2019, 8:34 a.m. OK Kotlin TESTS 23 1778 49356800 1700
56626641 toysheeyeyraku E July 6, 2019, 2:15 p.m. OK Mono C# TESTS 23 530 44441600 1700
55727668 maxkh E June 18, 2019, 6:42 p.m. OK Mono C# TESTS 23 639 35123200 1700
56631220 vjudge5 E July 6, 2019, 4:25 p.m. OK MS C++ TESTS 23 139 8192000 1700
68843930 vjudge1 E Jan. 15, 2020, 6:46 a.m. OK MS C++ TESTS 23 140 6246400 1700
56301067 CoolKey E June 30, 2019, 8:54 a.m. OK MS C++ TESTS 23 140 11161600 1700
56689111 vjudge4 E July 8, 2019, 2:20 a.m. OK MS C++ TESTS 23 155 9830400 1700
57926368 vjudge4 E July 29, 2019, 7:15 a.m. OK MS C++ TESTS 23 156 7475200 1700
68840382 vjudge2 E Jan. 15, 2020, 5:33 a.m. OK MS C++ TESTS 23 156 8806400 1700
63924270 vjudge5 E Oct. 31, 2019, 12:37 p.m. OK MS C++ TESTS 23 156 9830400 1700
68841661 vjudge5 E Jan. 15, 2020, 6 a.m. OK MS C++ TESTS 23 156 11571200 1700
55916862 vjudge5 E June 22, 2019, 5:50 a.m. OK MS C++ TESTS 23 156 12697600 1700
66015055 vjudge5 E Nov. 30, 2019, 4:59 a.m. OK MS C++ TESTS 23 171 13312000 1700
56135228 xsc E June 26, 2019, 9:17 p.m. OK MS C++ 2017 TESTS 23 249 8396800 1700
55508613 petko_mitkov E June 12, 2019, 7:51 p.m. OK MS C++ 2017 TESTS 23 249 11673600 1700
57302750 vjudge5 E July 19, 2019, 1:28 a.m. OK MS C++ 2017 TESTS 23 264 2867200 1700
55429800 risa243 E June 11, 2019, 10:50 a.m. OK MS C++ 2017 TESTS 23 264 10854400 1700
56401749 CtrlAlt E July 1, 2019, 5:11 p.m. OK MS C++ 2017 TESTS 23 280 10137600 1700
57923449 Yanhui E July 29, 2019, 6:08 a.m. OK MS C++ 2017 TESTS 23 467 8806400 1700
55387576 Skeef79 E June 10, 2019, 8:13 a.m. OK MS C++ 2017 TESTS 23 608 8806400 1700
55498494 Still_Theory E June 12, 2019, 1:49 p.m. OK MS C++ 2017 TESTS 23 655 11776000 1700
61386457 MrLolthe1st E Sept. 27, 2019, 7:19 p.m. OK MS C++ 2017 TESTS 23 685 18944000 1700
55387849 Skeef79 E June 10, 2019, 8:20 a.m. OK MS C++ 2017 TESTS 23 717 8806400 1700
55677584 AryaKnight E June 17, 2019, 11:18 a.m. OK PyPy 2 TESTS 23 327 30105600 1700
55533680 hyta4982 E June 13, 2019, 3:05 p.m. OK PyPy 2 TESTS 23 342 30310400 1700
55390572 drd93 E June 10, 2019, 9:31 a.m. OK PyPy 2 TESTS 23 421 26726400 1700
55737111 yumtam E June 19, 2019, 5:02 a.m. OK PyPy 2 TESTS 23 467 32358400 1700
55676407 c1729 E June 17, 2019, 10:39 a.m. OK PyPy 2 TESTS 23 467 37478400 1700
55531851 hyta4982 E June 13, 2019, 1:59 p.m. OK PyPy 2 TESTS 23 483 29184000 1700
55676492 c1729 E June 17, 2019, 10:42 a.m. OK PyPy 2 TESTS 23 498 37068800 1700
55675686 c1729 E June 17, 2019, 10:17 a.m. OK PyPy 2 TESTS 23 529 36966400 1700
59694941 shanu_im E Aug. 30, 2019, 8:07 a.m. OK PyPy 2 TESTS 23 530 28057600 1700
55676869 c1729 E June 17, 2019, 10:54 a.m. OK PyPy 2 TESTS 23 546 36454400 1700
55676272 AryaKnight E June 17, 2019, 10:35 a.m. OK PyPy 3 TESTS 23 389 31129600 1700
55675804 AryaKnight E June 17, 2019, 10:21 a.m. OK PyPy 3 TESTS 23 451 31129600 1700
55676891 AryaKnight E June 17, 2019, 10:55 a.m. OK PyPy 3 TESTS 23 576 29081600 1700
55530587 hyta4982 E June 13, 2019, 1:22 p.m. OK PyPy 3 TESTS 23 608 31744000 1700
55530111 hyta4982 E June 13, 2019, 1:09 p.m. OK PyPy 3 TESTS 23 608 32256000 1700
56887721 Jarik E July 12, 2019, 1:28 p.m. OK PyPy 3 TESTS 23 639 57548800 1700
56885445 Leendertz E July 12, 2019, 12:23 p.m. OK PyPy 3 TESTS 23 639 57548800 1700
55419004 KanhuKeNanu E June 11, 2019, 5:05 a.m. OK PyPy 3 TESTS 23 685 26316800 1700
55406985 KblP_COCN4KA E June 10, 2019, 5:09 p.m. OK PyPy 3 TESTS 23 685 26316800 1700
55389614 Evil__Coder E June 10, 2019, 9:05 a.m. OK PyPy 3 TESTS 23 701 26112000 1700
56244160 pohzipohzi E June 28, 2019, 7:59 p.m. OK Python 2 TESTS 23 1637 55398400 1700
55531863 hyta4982 E June 13, 2019, 2 p.m. OK Python 2 TESTS 23 1762 29491200 1700
56243879 pohzipohzi E June 28, 2019, 7:49 p.m. OK Python 2 TESTS 23 1793 57958400 1700
58435416 ssk497 E Aug. 7, 2019, 1:40 p.m. OK Python 2 TESTS 23 1825 32563200 1700
56439444 PlusZero E July 2, 2019, 3:38 p.m. OK Python 2 TESTS 23 1856 24268800 1700
55610613 tang0404 E June 16, 2019, 5:26 a.m. OK Python 2 TESTS 23 1918 33996800 1700
55389337 anshuman16423 E June 10, 2019, 8:58 a.m. OK Python 2 TESTS 23 1918 53862400 1700
55409731 _nathan_drake_ E June 10, 2019, 6:51 p.m. OK Python 2 TESTS 23 1949 24268800 1700
62253579 ashok123 E Oct. 10, 2019, 10:04 a.m. OK Python 2 TESTS 23 1949 31232000 1700
56244384 pohzipohzi E June 28, 2019, 8:06 p.m. OK Python 2 TESTS 23 1949 55398400 1700
55530286 hyta4982 E June 13, 2019, 1:14 p.m. OK Python 3 TESTS 23 1809 26112000 1700
55749544 vovosch E June 19, 2019, 11:59 a.m. OK Python 3 TESTS 23 1809 26214400 1700
55839280 the_white_devil E June 20, 2019, 5:04 p.m. OK Python 3 TESTS 23 1996 28979200 1700

remove filters

Back to search problems