Codeforces Round 792 (Div. 1 + 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
1684 Codeforces Round 792 (Div. 1 + Div. 2) FINISHED False 7200 78852299 May 19, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 619 ) G Euclid Guess PROGRAMMING constructive algorithms flows graph matchings math number theory 2800

B"Let's consider Euclid's algorithm for finding the greatest common divisor, where t is a list: There is an array p of pairs of positive integers that are not greater than m . Initially, the list t is empty. Then the function is run on each pair in p . After that the list t is shuffled and given to you. You have to find an array p of any size not greater than 2 cdot 10^4 that produces the given list t , or tell that no such array exists. The first line contains two integers n and m ( 1 <= n <= 10^3 , 1 <= m <= 10^9 ) -- the length of the array t and the constraint for integers in pairs. The second line contains n integers t_1, t_2, ldots, t_n ( 1 <= t_i <= m ) -- the elements of the array t . The i -th of the next k lines should contain two integers a_i and b_i ( 1 <= a_i, b_i <= m ) -- the i -th pair in p . If there are multiple valid answers you can output any of them. In the first sample let's consider the array t for each pair: So in total t = [8, 3, 2, 1, 6, 3, 1] , which is the same as the input t (up to a permutation). In the second test case it is impossible to find such array p of pairs that all integers are not greater than 10 and t = [7, 1] In the third test case for the pair (15, , 8) array t will be [7, 1] . "...

Tutorials

Codeforces Round #792 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
157723712 dlalswp25 G May 19, 2022, 4:21 p.m. OK GNU C++14 TESTS 51 15 1126400 2800
157734418 yao11617 G May 19, 2022, 5:50 p.m. OK GNU C++14 TESTS 52 15 1843200 2800
157741371 sHaHriAr_17s G May 19, 2022, 6:55 p.m. OK GNU C++14 TESTS 56 15 2048000 2800
157725968 feecIe6418 G May 19, 2022, 4:27 p.m. OK GNU C++14 TESTS 51 15 7372800 2800
157728496 RocketCider G May 19, 2022, 4:33 p.m. OK GNU C++14 TESTS 51 30 19456000 2800
157760420 fengqiyuka G May 20, 2022, 3:03 a.m. OK GNU C++14 TESTS 56 31 1536000 2800
157759664 cyh_toby G May 20, 2022, 2:48 a.m. OK GNU C++14 TESTS 56 31 8089600 2800
157746847 _SS G May 19, 2022, 8:22 p.m. OK GNU C++14 TESTS 56 31 22937600 2800
157758258 quisqualis G May 20, 2022, 2:16 a.m. OK GNU C++14 TESTS 56 31 48128000 2800
157767910 hydd G May 20, 2022, 5:21 a.m. OK GNU C++14 TESTS 56 46 4915200 2800
157762056 DerekFeng G May 20, 2022, 3:37 a.m. OK GNU C++17 TESTS 56 15 819200 2800
157733690 kamer G May 19, 2022, 5:47 p.m. OK GNU C++17 TESTS 51 15 1433600 2800
157734500 Wailydest G May 19, 2022, 5:51 p.m. OK GNU C++17 TESTS 52 15 1843200 2800
157744094 YeongTree G May 19, 2022, 7:33 p.m. OK GNU C++17 TESTS 56 15 2048000 2800
157733112 YaoBIG G May 19, 2022, 5:44 p.m. OK GNU C++17 TESTS 51 15 2048000 2800
157727233 icecuber G May 19, 2022, 4:30 p.m. OK GNU C++17 TESTS 51 15 2969600 2800
157726905 JOHNKRAM G May 19, 2022, 4:29 p.m. OK GNU C++17 TESTS 51 15 9216000 2800
157739636 Sexpert G May 19, 2022, 6:33 p.m. OK GNU C++17 TESTS 56 15 10444800 2800
157768336 wifiiii G May 20, 2022, 5:28 a.m. OK GNU C++17 TESTS 56 15 12697600 2800
157761590 ta4p G May 20, 2022, 3:27 a.m. OK GNU C++17 TESTS 56 31 921600 2800
157763356 Crz-Willis G May 20, 2022, 4:03 a.m. OK GNU C++17 (64) TESTS 56 15 921600 2800
157761249 rniya G May 20, 2022, 3:21 a.m. OK GNU C++17 (64) TESTS 56 15 921600 2800
157760905 gqf123 G May 20, 2022, 3:13 a.m. OK GNU C++17 (64) TESTS 56 15 921600 2800
157763762 xyf007 G May 20, 2022, 4:11 a.m. OK GNU C++17 (64) TESTS 56 15 1024000 2800
157763749 xyf007 G May 20, 2022, 4:11 a.m. OK GNU C++17 (64) TESTS 56 15 1024000 2800
157751839 natofp G May 19, 2022, 10:41 p.m. OK GNU C++17 (64) TESTS 56 15 1126400 2800
157762963 Toxel G May 20, 2022, 3:55 a.m. OK GNU C++17 (64) TESTS 56 15 2150400 2800
157725371 mango_lassi G May 19, 2022, 4:25 p.m. OK GNU C++17 (64) TESTS 51 15 2150400 2800
157725780 jtnydv25 G May 19, 2022, 4:27 p.m. OK GNU C++17 (64) TESTS 51 15 3276800 2800
157735010 stevenkplus G May 19, 2022, 5:54 p.m. OK GNU C++17 (64) TESTS 52 15 3379200 2800
157751294 DeadlyPillow G May 19, 2022, 10:18 p.m. OK GNU C++20 (64) TESTS 56 15 102400 2800
157768660 IntoTheNight G May 20, 2022, 5:33 a.m. OK GNU C++20 (64) TESTS 56 15 921600 2800
157746490 maximumSHOT G May 19, 2022, 8:15 p.m. OK GNU C++20 (64) TESTS 56 15 2150400 2800
157742888 abeker G May 19, 2022, 7:16 p.m. OK GNU C++20 (64) TESTS 56 15 2150400 2800
157737282 SSerxhs G May 19, 2022, 6:10 p.m. OK GNU C++20 (64) TESTS 54 15 2150400 2800
157729102 mtsd G May 19, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 51 15 2150400 2800
157727564 tute7627 G May 19, 2022, 4:31 p.m. OK GNU C++20 (64) TESTS 51 15 2150400 2800
157726715 Golovanov399 G May 19, 2022, 4:29 p.m. OK GNU C++20 (64) TESTS 51 15 2150400 2800
157723460 freak93 G May 19, 2022, 4:20 p.m. OK GNU C++20 (64) TESTS 51 15 2150400 2800
157726841 Suika_predator G May 19, 2022, 4:29 p.m. OK GNU C++20 (64) TESTS 51 15 2252800 2800
157723478 EduRoundOnly G May 19, 2022, 4:20 p.m. OK Kotlin 1.4 TESTS 51 124 24268800 2800
157733685 qwerty787788 G May 19, 2022, 5:47 p.m. OK Rust 2021 TESTS 51 15 3174400 2800
157759471 sansen G May 20, 2022, 2:44 a.m. OK Rust 2021 TESTS 56 31 17612800 2800

remove filters

Back to search problems