Codeforces Round 811 (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
1714 Codeforces Round 811 (Div. 3) FINISHED False 8100 77815463 Aug. 1, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3317 ) F Build a Tree and That Is It PROGRAMMING brute force constructive algorithms greedy implementation trees

B'A tree is a connected undirected graph without cycles. Note that in this problem, we are talking about not rooted trees. You are given four positive integers n, d_{12}, d_{23} and d_{31} . Construct a tree such that: Output any tree that satisfies all the requirements above, or determine that no such tree exists. The first line of the input contains an integer t ( 1 <= t <= 10^4 ) --the number of test cases in the test. This is followed by t test cases, each written on a separate line. Each test case consists of four positive integers n, d_{12}, d_{23} and d_{31} ( 3 <= n <= 2 cdot10^5; 1 <= d_{12}, d_{23}, d_{31} <= n-1 ). It is guaranteed that the sum of n values for all test cases does not exceed 2 cdot10^5 . For each test case, print YES if the suitable tree exists, and NO otherwise. If the answer is positive, print another n-1 line each containing a description of an edge of the tree -- a pair of positive integers x_i, y_i , which means that the i th edge connects vertices x_i and y_i . The edges and vertices of the edges can be printed in any order. If there are several suitable trees, output any of them. '...

Tutorials

Codeforces Round #811 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
166603171 sandeephembrom08 F Aug. 1, 2022, 5:06 p.m. OK GNU C++14 TESTS 51 62 819200
166603590 Leo_W F Aug. 1, 2022, 5:09 p.m. OK GNU C++14 TESTS 51 62 1638400
166654722 xuan13853715014 F Aug. 2, 2022, 6:01 a.m. OK GNU C++14 TESTS 51 62 1740800
166643874 QQH F Aug. 2, 2022, 3:16 a.m. OK GNU C++14 TESTS 51 62 1740800
166635572 hcs1994 F Aug. 2, 2022, 1:04 a.m. OK GNU C++14 TESTS 51 62 1740800
166608392 cbdsopa F Aug. 1, 2022, 5:42 p.m. OK GNU C++14 TESTS 51 62 2457600
166603151 Suffocating F Aug. 1, 2022, 5:06 p.m. OK GNU C++14 TESTS 51 62 2457600
166605996 hy_honglian F Aug. 1, 2022, 5:23 p.m. OK GNU C++14 TESTS 51 62 2969600
166642125 quanlt206 F Aug. 2, 2022, 2:49 a.m. OK GNU C++14 TESTS 51 62 3993600
166634218 zltzlt F Aug. 2, 2022, 12:34 a.m. OK GNU C++14 TESTS 51 62 6348800
166629536 MuntherCarrot F Aug. 1, 2022, 10:23 p.m. OK GNU C++17 TESTS 51 61 0
166654606 man_of_culture F Aug. 2, 2022, 5:59 a.m. OK GNU C++17 TESTS 51 62 0
166647221 igba F Aug. 2, 2022, 4:10 a.m. OK GNU C++17 TESTS 51 62 0
166642214 Frozencode F Aug. 2, 2022, 2:51 a.m. OK GNU C++17 TESTS 51 62 0
166639253 roger9527 F Aug. 2, 2022, 2:05 a.m. OK GNU C++17 TESTS 51 62 0
166638050 GStnt F Aug. 2, 2022, 1:47 a.m. OK GNU C++17 TESTS 51 62 0
166628670 proof_by_ac F Aug. 1, 2022, 10:04 p.m. OK GNU C++17 TESTS 51 62 0
166625676 matheuzinn F Aug. 1, 2022, 9 p.m. OK GNU C++17 TESTS 51 62 0
166620801 AbhilashaBansal F Aug. 1, 2022, 7:48 p.m. OK GNU C++17 TESTS 51 62 0
166618827 GreatSageEqualToHeaven F Aug. 1, 2022, 7:24 p.m. OK GNU C++17 TESTS 51 62 0
166618410 opPO F Aug. 1, 2022, 7:20 p.m. OK GNU C++17 (64) TESTS 51 46 0
166605550 Chime F Aug. 1, 2022, 5:20 p.m. OK GNU C++17 (64) TESTS 51 46 0
166653546 jiajieshi F Aug. 2, 2022, 5:46 a.m. OK GNU C++17 (64) TESTS 51 46 2560000
166629563 AEIOU_09 F Aug. 1, 2022, 10:24 p.m. OK GNU C++17 (64) TESTS 51 46 7372800
166648235 Haven_ F Aug. 2, 2022, 4:28 a.m. OK GNU C++17 (64) TESTS 51 61 0
166602365 XHYU61 F Aug. 1, 2022, 5:02 p.m. OK GNU C++17 (64) TESTS 51 61 0
166646306 MarkBcc168 F Aug. 2, 2022, 3:55 a.m. OK GNU C++17 (64) TESTS 51 62 0
166644166 Colala F Aug. 2, 2022, 3:21 a.m. OK GNU C++17 (64) TESTS 51 62 0
166617561 Beevo F Aug. 1, 2022, 7:10 p.m. OK GNU C++17 (64) TESTS 51 62 0
166609081 yanwang F Aug. 1, 2022, 5:48 p.m. OK GNU C++17 (64) TESTS 51 62 0
166608304 hnust_zenggai F Aug. 1, 2022, 5:41 p.m. OK GNU C++20 (64) TESTS 51 31 0
166601061 nlog F Aug. 1, 2022, 4:56 p.m. OK GNU C++20 (64) TESTS 51 31 0
166600237 fahimcp495 F Aug. 1, 2022, 4:53 p.m. OK GNU C++20 (64) TESTS 51 31 0
166599688 soongsil F Aug. 1, 2022, 4:51 p.m. OK GNU C++20 (64) TESTS 51 31 0
166636733 Akib_12 F Aug. 2, 2022, 1:26 a.m. OK GNU C++20 (64) TESTS 51 31 6144000
166647010 nitss9 F Aug. 2, 2022, 4:07 a.m. OK GNU C++20 (64) TESTS 51 46 0
166645546 Ench_Lolz F Aug. 2, 2022, 3:42 a.m. OK GNU C++20 (64) TESTS 51 46 0
166645487 Msstt F Aug. 2, 2022, 3:41 a.m. OK GNU C++20 (64) TESTS 51 46 0
166641357 ayush567 F Aug. 2, 2022, 2:37 a.m. OK GNU C++20 (64) TESTS 51 46 0
166641181 none_c F Aug. 2, 2022, 2:35 a.m. OK GNU C++20 (64) TESTS 51 46 0
166627962 dzhi F Aug. 1, 2022, 9:47 p.m. OK Java 11 TESTS 51 264 4198400
166609378 ekwek F Aug. 1, 2022, 5:50 p.m. OK Java 11 TESTS 51 280 4505600
166638809 profchi F Aug. 2, 2022, 1:58 a.m. OK Java 11 TESTS 51 296 8089600
166604135 Serg_ F Aug. 1, 2022, 5:11 p.m. OK Java 11 TESTS 51 343 4505600
166620548 soumit915 F Aug. 1, 2022, 7:45 p.m. OK Java 17 TESTS 51 233 6144000
166629664 Abdallah_Ragab00 F Aug. 1, 2022, 10:26 p.m. OK Java 8 TESTS 51 171 2150400
166629414 Abdallah_Ragab00 F Aug. 1, 2022, 10:20 p.m. OK Java 8 TESTS 51 187 2560000
166628936 Abdallah_Ragab00 F Aug. 1, 2022, 10:10 p.m. OK Java 8 TESTS 51 249 19353600
166607659 SOME_ONEE F Aug. 1, 2022, 5:36 p.m. OK Java 8 TESTS 51 265 6144000
166605723 wjomlex F Aug. 1, 2022, 5:21 p.m. OK Java 8 TESTS 51 1404 0
166625717 vacom13 F Aug. 1, 2022, 9:01 p.m. OK Java 8 TESTS 51 1918 123801600
166625374 vacom13 F Aug. 1, 2022, 8:55 p.m. OK Java 8 TESTS 51 1980 126156800
166640543 ripity F Aug. 2, 2022, 2:25 a.m. OK Kotlin 1.6 TESTS 51 358 14848000
166651796 LarryNY F Aug. 2, 2022, 5:21 a.m. OK PyPy 3 TESTS 51 389 13414400
166612893 shehebe F Aug. 1, 2022, 6:21 p.m. OK PyPy 3 TESTS 51 421 30924800
166599081 manish.17 F Aug. 1, 2022, 4:49 p.m. OK PyPy 3 TESTS 51 421 33587200
166622186 xyxoro F Aug. 1, 2022, 8:07 p.m. OK PyPy 3 TESTS 51 436 10649600
166599860 titia F Aug. 1, 2022, 4:52 p.m. OK PyPy 3 TESTS 51 467 13312000
166612102 sushmanth.dampur8780 F Aug. 1, 2022, 6:14 p.m. OK PyPy 3 TESTS 51 482 23552000
166612286 sushmanth.dampur8780 F Aug. 1, 2022, 6:15 p.m. OK PyPy 3 TESTS 51 514 23552000
166599973 heathcliff_sun F Aug. 1, 2022, 4:52 p.m. OK PyPy 3 TESTS 51 514 24780800
166612072 sushmanth.dampur8780 F Aug. 1, 2022, 6:14 p.m. OK PyPy 3 TESTS 51 530 23552000
166604653 Leocosmos F Aug. 1, 2022, 5:14 p.m. OK PyPy 3-64 TESTS 51 202 19968000
166599996 alacrate F Aug. 1, 2022, 4:52 p.m. OK PyPy 3-64 TESTS 51 233 23654400
166601013 alacrate F Aug. 1, 2022, 4:56 p.m. OK PyPy 3-64 TESTS 51 249 23756800
166620468 SoleProprietor F Aug. 1, 2022, 7:44 p.m. OK PyPy 3-64 TESTS 51 327 40652800
166604902 eudemonia_ F Aug. 1, 2022, 5:16 p.m. OK PyPy 3-64 TESTS 51 374 19865600
166633400 shaletome F Aug. 2, 2022, 12:14 a.m. OK PyPy 3-64 TESTS 51 374 23142400
166603526 sashasup F Aug. 1, 2022, 5:08 p.m. OK PyPy 3-64 TESTS 51 405 10956800
166630644 mattagar6 F Aug. 1, 2022, 10:53 p.m. OK PyPy 3-64 TESTS 51 420 26214400
166600340 dzuskee F Aug. 1, 2022, 4:53 p.m. OK PyPy 3-64 TESTS 51 451 24166400
166626275 zamaninikan F Aug. 1, 2022, 9:12 p.m. OK Python 3 TESTS 51 561 7884800

remove filters

Back to search problems