Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!]

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
1067 Codeforces Round 518 (Div. 1) [Thanks, Mail.Ru!] FINISHED False 7200 191424299 Oct. 24, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2710 ) B Multihedgehog PROGRAMMING dfs and similar graphs shortest paths 2000

B'Someone give a strange birthday present to Ivan. It is hedgehog -- connected undirected graph in which one vertex has degree at least 3 (we will call it center) and all other vertices has degree 1. Ivan thought that hedgehog is too boring and decided to make himself k -multihedgehog. Let us define k -multihedgehog as follows: Thereby k -multihedgehog is a tree. Ivan made k -multihedgehog but he is not sure that he did not make any mistakes. That is why he asked you to check if his tree is indeed k -multihedgehog. First line of input contains 2 integers n , k ( 1 <= n <= 10^{5} , 1 <= k <= 10^{9} ) -- number of vertices and hedgehog parameter. Next n-1 lines contains two integers u v ( 1 <= u, , , v <= n; , , u ne v ) -- indices of vertices connected by edge. It is guaranteed that given graph is a tree. Print "Yes" (without quotes), if given graph is k -multihedgehog, and "No" (without quotes) otherwise. 2-multihedgehog from the first example looks like this: Its center is vertex 13 . Hedgehogs created on last step are: [4 (center), 1, 2, 3], [6 (center), 7, 8, 9], [5 (center), 10, 11, 12, 13]. Tree from second example is not a hedgehog because degree of center should be at least 3 . '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46295415 ZredXNy B Nov. 28, 2018, 1:37 a.m. OK GNU C++11 TESTS 124 31 3584000 2000
44892829 YxwKeith B Oct. 26, 2018, 4:32 a.m. OK GNU C++11 TESTS 124 46 2662400 2000
46297521 CrazyTeaMajor B Nov. 28, 2018, 4:42 a.m. OK GNU C++11 TESTS 124 46 2969600 2000
44820624 remember B Oct. 25, 2018, 1:58 a.m. OK GNU C++11 TESTS 124 46 3276800 2000
45461940 hznu_kk B Nov. 9, 2018, 1:25 a.m. OK GNU C++11 TESTS 124 46 3379200 2000
48657274 ReaLNero1 B Jan. 21, 2019, 3:38 a.m. OK GNU C++11 TESTS 124 46 3584000 2000
45328146 thx B Nov. 5, 2018, 1:55 p.m. OK GNU C++11 TESTS 124 46 3584000 2000
44795843 EnjoyCallen B Oct. 24, 2018, 5:21 p.m. OK GNU C++11 TESTS 124 46 3584000 2000
52350686 Gaozijian B April 5, 2019, 2:28 p.m. OK GNU C++11 TESTS 124 46 3686400 2000
56848074 msuwakow B July 11, 2019, 2:27 p.m. OK GNU C++11 TESTS 124 46 3993600 2000
45345644 Enzyme125 B Nov. 6, 2018, 2:46 a.m. OK GNU C++14 TESTS 124 46 6451200 2000
46687358 Not_A_SingleDogQrz B Dec. 6, 2018, 2:36 p.m. OK GNU C++14 TESTS 124 62 3686400 2000
44828913 mxh1999 B Oct. 25, 2018, 7:37 a.m. OK GNU C++14 TESTS 124 62 3993600 2000
45984768 wleung_bvg B Nov. 20, 2018, 5:33 a.m. OK GNU C++14 TESTS 124 62 4710400 2000
66542649 selia B Dec. 9, 2019, 12:07 p.m. OK GNU C++14 TESTS 124 62 7168000 2000
44789009 dujvet B Oct. 24, 2018, 5 p.m. OK GNU C++14 TESTS 124 77 3686400 2000
44788451 Subconscious B Oct. 24, 2018, 4:59 p.m. OK GNU C++14 TESTS 124 77 5632000 2000
44813313 molamola. B Oct. 24, 2018, 8:18 p.m. OK GNU C++14 TESTS 124 77 7065600 2000
46106035 Fairuzi10 B Nov. 23, 2018, 9:15 a.m. OK GNU C++14 TESTS 124 77 8294400 2000
62656937 yihan106115 B Oct. 16, 2019, 2:31 a.m. OK GNU C++14 TESTS 124 77 9625600 2000
44820428 Trisolaris B Oct. 25, 2018, 1:45 a.m. OK GNU C++17 TESTS 124 46 7372800 2000
45329985 purple_bro B Nov. 5, 2018, 2:45 p.m. OK GNU C++17 TESTS 124 62 3072000 2000
45676893 jkxjkx1031 B Nov. 13, 2018, 1:32 p.m. OK GNU C++17 TESTS 124 62 3584000 2000
45410077 201732110113 B Nov. 7, 2018, 11:41 a.m. OK GNU C++17 TESTS 124 62 3584000 2000
45792721 jingxiaomo B Nov. 16, 2018, 8:22 a.m. OK GNU C++17 TESTS 124 62 5120000 2000
44795550 zoomswk B Oct. 24, 2018, 5:20 p.m. OK GNU C++17 TESTS 124 62 5324800 2000
44829354 201612201402013 B Oct. 25, 2018, 7:48 a.m. OK GNU C++17 TESTS 124 62 5836800 2000
45868926 pbihao B Nov. 17, 2018, 9:12 a.m. OK GNU C++17 TESTS 124 62 6860800 2000
50927888 qinyuyang B March 7, 2019, 12:41 p.m. OK GNU C++17 TESTS 124 62 43315200 2000
47819678 1664988610 B Jan. 1, 2019, 4:49 p.m. OK GNU C++17 TESTS 124 77 4198400 2000
69290073 synapse B Jan. 22, 2020, 9:52 a.m. OK Go TESTS 124 171 4505600 2000
69289552 synapse B Jan. 22, 2020, 9:39 a.m. OK Go TESTS 124 171 4505600 2000
69289503 synapse B Jan. 22, 2020, 9:37 a.m. OK Go TESTS 124 171 4505600 2000
69287046 synapse B Jan. 22, 2020, 8:39 a.m. OK Go TESTS 124 187 4505600 2000
44790768 uwi B Oct. 24, 2018, 5:05 p.m. OK Java 8 TESTS 124 140 0 2000
44833815 wadissimo B Oct. 25, 2018, 9:50 a.m. OK Java 8 TESTS 124 202 0 2000
55389465 dalt B June 10, 2019, 9:01 a.m. OK Java 8 TESTS 124 233 4505600 2000
44826401 Srinivasa_Ramanujan B Oct. 25, 2018, 6:17 a.m. OK Java 8 TESTS 124 233 15667200 2000
44961847 beroul B Oct. 27, 2018, 4:54 p.m. OK Java 8 TESTS 124 249 16384000 2000
44793248 ankurdua15 B Oct. 24, 2018, 5:12 p.m. OK Java 8 TESTS 124 265 17203200 2000
44823162 jwozniak B Oct. 25, 2018, 4:05 a.m. OK Java 8 TESTS 124 265 18636800 2000
44789949 Lewin B Oct. 24, 2018, 5:03 p.m. OK Java 8 TESTS 124 280 18739200 2000
62560136 Shady51 B Oct. 14, 2019, 11:44 a.m. OK Java 8 TESTS 124 295 17510400 2000
45858547 megaspazz B Nov. 17, 2018, 3:52 a.m. OK Java 8 TESTS 124 326 18534400 2000
44788951 LoneFox B Oct. 24, 2018, 5 p.m. OK MS C++ TESTS 124 109 5529600 2000
44810936 CtrlAlt B Oct. 24, 2018, 6:33 p.m. OK MS C++ TESTS 124 109 6144000 2000
51742677 vjudge4 B March 23, 2019, 6:26 a.m. OK MS C++ TESTS 124 343 20684800 2000
49835939 Programmer007 B Feb. 12, 2019, 4:08 p.m. OK MS C++ 2017 TESTS 124 109 4608000 2000
59853543 Spiritum B Sept. 1, 2019, 12:35 p.m. OK MS C++ 2017 TESTS 124 342 14131200 2000
45107204 ElIlia B Oct. 30, 2018, 4:45 p.m. OK PascalABC.NET TESTS 124 280 19865600 2000
44820358 pajenegod B Oct. 25, 2018, 1:39 a.m. OK PyPy 2 TESTS 124 374 13004800 2000
48947961 conjecture_xyz B Jan. 25, 2019, 8:25 p.m. OK PyPy 2 TESTS 124 764 15667200 2000
46991726 whatshisbucket B Dec. 14, 2018, 5:05 a.m. OK Python 3 TESTS 124 498 14848000 2000
45698902 knighthawk B Nov. 14, 2018, 6:35 a.m. OK Python 3 TESTS 124 546 10342400 2000
67161399 NocturneBflat B Dec. 18, 2019, 2:05 p.m. OK Python 3 TESTS 124 592 14950400 2000
45563944 AngelicosPhosphoros B Nov. 11, 2018, 1:17 p.m. OK Python 3 TESTS 124 733 26214400 2000

remove filters

Back to search problems