Educational Codeforces Round 55 (Rated for Div. 2)

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
1082 Educational Codeforces Round 55 (Rated for Div. 2) FINISHED False 7200 188407499 Nov. 28, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3822 ) D Maximum Diameter Graph PROGRAMMING constructive algorithms graphs implementation 1800

B'Graph constructive problems are back! This time the graph you are asked to build should match the following properties. The graph is connected if and only if there exists a path between every pair of vertices. The diameter (aka "longest shortest path") of a connected undirected graph is the maximum number of edges in the shortest path between any pair of its vertices. The degree of a vertex is the number of edges incident to it. Given a sequence of n integers a_1, a_2, ... , a_n construct a connected undirected graph of n vertices such that: Output the resulting graph or report that no solution exists. The first line contains a single integer n ( 3 <= n <= 500 ) -- the number of vertices in the graph. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n - 1 ) -- the upper limits to vertex degrees. Print "NO" if no graph can be constructed under the given conditions. Otherwise print "YES" and the diameter of the resulting graph in the first line. The second line should contain a single integer m -- the number of edges in the resulting graph. The i -th of the next m lines should contain two integers v_i, u_i ( 1 <= v_i, u_i <= n , v_i neq u_i ) -- the description of the i -th edge. The graph should contain no multiple edges -- for each pair (x, y) you output, you should output no more pairs (x, y) or (y, x) . Here are the graphs for the first two example cases. Both have diameter of 2 . d_2 = 2 <= a_2 = 2 d_3 = 1 <= a_3 = 2 d_2 = 4 <= a_2 = 4 d_3 = 1 <= a_3 = 1 d_4 = 1 <= a_4 = 1 '...

Tutorials

63544

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
46396134 Khanh_Moriaty D Nov. 30, 2018, 9:23 a.m. OK FPC TESTS 31 31 0 1800
46363789 shreya_2004 D Nov. 29, 2018, 12:18 p.m. OK GNU C11 TESTS 31 31 0 1800
49114488 rainboy D Jan. 28, 2019, 4:22 p.m. OK GNU C11 TESTS 31 31 0 1800
48571516 MYNAMEISSHARIFUL D Jan. 19, 2019, 12:12 p.m. OK GNU C11 TESTS 31 31 0 1800
46354144 stefansav D Nov. 29, 2018, 7:11 a.m. OK GNU C++11 TESTS 31 15 0 1800
46904429 A.K.E.E. D Dec. 11, 2018, 1:31 p.m. OK GNU C++11 TESTS 31 15 102400 1800
46369360 scau_json D Nov. 29, 2018, 2:51 p.m. OK GNU C++11 TESTS 31 15 1228800 1800
54010753 vjudge1 D May 12, 2019, 2:03 a.m. OK GNU C++11 TESTS 31 30 0 1800
56424935 oleh1421 D July 2, 2019, 9:07 a.m. OK GNU C++11 TESTS 31 30 0 1800
60746584 AQT D Sept. 18, 2019, 2:14 a.m. OK GNU C++11 TESTS 31 30 0 1800
51245216 vjudge5 D March 13, 2019, 4:19 a.m. OK GNU C++11 TESTS 31 30 0 1800
64774035 chenke D Nov. 13, 2019, 2:41 a.m. OK GNU C++11 TESTS 31 30 0 1800
64866983 yuzhechuan D Nov. 14, 2019, 6:40 a.m. OK GNU C++11 TESTS 31 30 0 1800
48286426 yonkoaman D Jan. 12, 2019, 10:42 a.m. OK GNU C++11 TESTS 31 30 0 1800
69002656 MB1151 D Jan. 17, 2020, 8:29 p.m. OK GNU C++14 TESTS 31 15 0 1800
69929475 Luzivanlt D Jan. 31, 2020, 10:30 p.m. OK GNU C++14 TESTS 31 15 0 1800
59089408 ahshafi D Aug. 19, 2019, 12:15 p.m. OK GNU C++14 TESTS 31 15 0 1800
54812805 unknown11 D May 29, 2019, 5:52 p.m. OK GNU C++14 TESTS 31 15 0 1800
52327274 xyw5vplus1 D April 5, 2019, 2:06 a.m. OK GNU C++14 TESTS 31 15 0 1800
50080915 xiaowuc1 D Feb. 18, 2019, 3:53 a.m. OK GNU C++14 TESTS 31 15 0 1800
49524280 am1tbh47 D Feb. 6, 2019, 10:19 a.m. OK GNU C++14 TESTS 31 15 0 1800
48899101 alvinvaja D Jan. 24, 2019, 5:13 p.m. OK GNU C++14 TESTS 31 15 0 1800
48569238 akj_j D Jan. 19, 2019, 11:10 a.m. OK GNU C++14 TESTS 31 15 0 1800
48477353 FarmerKb D Jan. 17, 2019, 3:47 a.m. OK GNU C++14 TESTS 31 15 0 1800
51872117 Tommy_Vercetti D March 26, 2019, 5:53 p.m. OK GNU C++17 TESTS 31 15 0 1800
51209695 happy_ D March 12, 2019, 7:10 a.m. OK GNU C++17 TESTS 31 15 0 1800
51209435 MonsterInMe D March 12, 2019, 7:01 a.m. OK GNU C++17 TESTS 31 15 0 1800
47361790 Hitler D Dec. 22, 2018, 9:07 a.m. OK GNU C++17 TESTS 31 15 0 1800
47164970 vjudge3 D Dec. 17, 2018, 12:03 p.m. OK GNU C++17 TESTS 31 15 0 1800
47074858 ak07_ D Dec. 15, 2018, 4:53 p.m. OK GNU C++17 TESTS 31 15 0 1800
46817883 sam7007 D Dec. 9, 2018, 1:11 p.m. OK GNU C++17 TESTS 31 15 0 1800
52901131 stArliGht D April 17, 2019, 11:08 a.m. OK GNU C++17 TESTS 31 15 0 1800
61963021 chirag7145 D Oct. 6, 2019, 8:02 a.m. OK GNU C++17 TESTS 31 15 0 1800
67989507 kiowords D Dec. 31, 2019, 3:12 a.m. OK GNU C++17 TESTS 31 15 0 1800
46435620 3013216027 D Dec. 1, 2018, 8:53 a.m. OK Go TESTS 31 31 0 1800
46375752 flyman3046 D Nov. 29, 2018, 6:48 p.m. OK Java 8 TESTS 31 108 0 1800
46343050 baobab D Nov. 28, 2018, 4:55 p.m. OK Java 8 TESTS 31 108 0 1800
63853623 A5SAS51N D Oct. 30, 2019, 4:33 p.m. OK Java 8 TESTS 31 109 0 1800
61770354 apurvaj D Oct. 3, 2019, 9:58 a.m. OK Java 8 TESTS 31 109 0 1800
49939995 kusomushi D Feb. 15, 2019, 9:09 a.m. OK Java 8 TESTS 31 109 0 1800
49113668 Dukkha D Jan. 28, 2019, 4:02 p.m. OK Java 8 TESTS 31 109 0 1800
47288272 revanthreddy85 D Dec. 20, 2018, 7:37 a.m. OK Java 8 TESTS 31 109 0 1800
47035989 boltUsain D Dec. 15, 2018, 12:13 p.m. OK Java 8 TESTS 31 109 0 1800
46734633 KulikAlex D Dec. 7, 2018, 7:10 p.m. OK Java 8 TESTS 31 109 0 1800
46409103 sarthakmanna D Nov. 30, 2018, 4:10 p.m. OK Java 8 TESTS 31 109 0 1800
60174243 rego97 D Sept. 6, 2019, 1:50 p.m. OK Kotlin TESTS 31 155 204800 1800
47386428 moss3s D Dec. 23, 2018, 5:20 a.m. OK Kotlin TESTS 31 187 1126400 1800
46359024 eki D Nov. 29, 2018, 10:02 a.m. OK Mono C# TESTS 31 46 102400 1800
46354157 Coder_D D Nov. 29, 2018, 7:12 a.m. OK Mono C# TESTS 31 62 3584000 1800
46344637 peregrinus D Nov. 28, 2018, 5:27 p.m. OK Mono C# TESTS 31 62 70963200 1800
46646993 vjudge3 D Dec. 5, 2018, 12:20 p.m. OK MS C++ TESTS 31 30 0 1800
46749142 wjfwjfwjf D Dec. 8, 2018, 8:21 a.m. OK MS C++ TESTS 31 30 0 1800
46647242 vjudge2 D Dec. 5, 2018, 12:26 p.m. OK MS C++ TESTS 31 31 0 1800
46908796 vjudge1 D Dec. 11, 2018, 3:42 p.m. OK MS C++ TESTS 31 31 0 1800
46788813 vjudge4 D Dec. 9, 2018, 8:04 a.m. OK MS C++ TESTS 31 31 0 1800
46646168 vjudge4 D Dec. 5, 2018, 12:01 p.m. OK MS C++ TESTS 31 31 0 1800
52573383 vjudge1 D April 10, 2019, 3:11 p.m. OK MS C++ TESTS 31 31 0 1800
47327500 ys1468362286 D Dec. 21, 2018, 11:12 a.m. OK MS C++ TESTS 31 31 0 1800
47327958 vjudge1 D Dec. 21, 2018, 11:24 a.m. OK MS C++ TESTS 31 31 0 1800
46853475 vjudge5 D Dec. 10, 2018, 1:30 p.m. OK MS C++ TESTS 31 31 0 1800
50521291 CodeZYQ D Feb. 26, 2019, 9:32 a.m. OK MS C++ 2017 TESTS 31 30 0 1800
50481736 CodeZYQ D Feb. 25, 2019, 9:22 a.m. OK MS C++ 2017 TESTS 31 30 0 1800
50481452 CodeZYQ D Feb. 25, 2019, 9:13 a.m. OK MS C++ 2017 TESTS 31 31 0 1800
59641579 siwei D Aug. 29, 2019, 2:09 a.m. OK MS C++ 2017 TESTS 31 31 0 1800
56786220 Tkachova D July 10, 2019, 8:35 a.m. OK MS C++ 2017 TESTS 31 31 0 1800
52861386 ecjtu18-1224 D April 16, 2019, 4:17 p.m. OK MS C++ 2017 TESTS 31 31 0 1800
50588906 ecjtu-18jsk D Feb. 28, 2019, 6:09 a.m. OK MS C++ 2017 TESTS 31 31 0 1800
50478177 CodeZYQ D Feb. 25, 2019, 7:20 a.m. OK MS C++ 2017 TESTS 31 31 0 1800
57352796 ZSTU-2018329621261 D July 20, 2019, 4:46 a.m. OK MS C++ 2017 TESTS 31 46 0 1800
46964083 mayakin D Dec. 13, 2018, 10:12 a.m. OK PHP TESTS 31 46 0 1800
46346392 c1729 D Nov. 28, 2018, 6:23 p.m. OK PyPy 2 TESTS 31 139 204800 1800
46346640 c1729 D Nov. 28, 2018, 6:31 p.m. OK PyPy 2 TESTS 31 140 0 1800
46351410 aeternalis1 D Nov. 28, 2018, 10:11 p.m. OK PyPy 2 TESTS 31 140 102400 1800
46336352 Jonte_98 D Nov. 28, 2018, 4:14 p.m. OK PyPy 2 TESTS 31 140 6860800 1800
47325980 tiantian5 D Dec. 21, 2018, 10:25 a.m. OK PyPy 3 TESTS 31 139 0 1800
48269639 knight-erraunt D Jan. 12, 2019, 12:22 a.m. OK PyPy 3 TESTS 31 140 204800 1800
46353281 nadchu D Nov. 29, 2018, 6:42 a.m. OK PyPy 3 TESTS 31 140 614400 1800
46338617 titia D Nov. 28, 2018, 4:24 p.m. OK PyPy 3 TESTS 31 155 204800 1800
46913556 ..vince D Dec. 11, 2018, 6:30 p.m. OK PyPy 3 TESTS 31 155 512000 1800
57845836 brosucks D July 27, 2019, 11:07 a.m. OK PyPy 3 TESTS 31 156 1843200 1800
62108358 deadguy D Oct. 8, 2019, 11:31 a.m. OK PyPy 3 TESTS 31 186 2150400 1800
58640913 artifexbm D Aug. 12, 2019, 3:30 a.m. OK PyPy 3 TESTS 31 249 3276800 1800
46964819 satyamcse D Dec. 13, 2018, 10:41 a.m. OK PyPy 3 TESTS 31 389 8806400 1800
46452276 Skand D Dec. 1, 2018, 4:03 p.m. OK Python 2 TESTS 31 171 0 1800
47157474 whatshisbucket D Dec. 17, 2018, 7:47 a.m. OK Python 3 TESTS 31 109 102400 1800
46779387 nine_tails9 D Dec. 8, 2018, 11:55 p.m. OK Python 3 TESTS 31 109 102400 1800
46635364 Charles_Han D Dec. 5, 2018, 6:19 a.m. OK Python 3 TESTS 31 109 102400 1800
46365328 deflat D Nov. 29, 2018, 12:59 p.m. OK Python 3 TESTS 31 109 102400 1800
46338695 nullcline D Nov. 28, 2018, 4:25 p.m. OK Python 3 TESTS 31 109 102400 1800
46335973 fikr D Nov. 28, 2018, 4:12 p.m. OK Python 3 TESTS 31 109 102400 1800
48269634 knight-erraunt D Jan. 12, 2019, 12:22 a.m. OK Python 3 TESTS 31 109 409600 1800
46774335 tieros D Dec. 8, 2018, 7:05 p.m. OK Python 3 TESTS 31 124 0 1800
47501203 CHelle D Dec. 25, 2018, 6:03 p.m. OK Python 3 TESTS 31 124 102400 1800
46688747 PhilTheFish D Dec. 6, 2018, 3:17 p.m. OK Python 3 TESTS 31 124 102400 1800
46411177 nikitoz D Nov. 30, 2018, 5:08 p.m. OK Rust TESTS 31 46 0 1800
46344966 yakamoto D Nov. 28, 2018, 5:36 p.m. OK Scala TESTS 31 467 0 1800

remove filters

Back to search problems