Codeforces Round 891 (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
1857 Codeforces Round 891 (Div. 3) FINISHED False 8100 40404299 Aug. 7, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26658 ) C Assembly via Minimums PROGRAMMING greedy sortings

B'Sasha has an array a of n integers. He got bored and for all i , j ( i < j ), he wrote down the minimum value of a_i and a_j . He obtained a new array b of size frac{n cdot (n-1)}{2} . For example, if a= [ 2,3,5,1 ], he would write [ min(2, 3), min(2, 5), min(2, 1), min(3, 5), min(3, 1), min(5, 1) ] = [ 2, 2, 1, 3, 1, 1 ]. Then, he randomly shuffled all the elements of the array b . Unfortunately, he forgot the array a , and your task is to restore any possible array a from which the array b could have been obtained. The elements of array a should be in the range [-10^9,10^9] . The first line contains a single integer t ( 1 <= t <= 200 ) -- the number of test cases. The first line of each test case contains a single integer n ( 2 <= n <= 10^3 ) -- the length of array a . The second line of each test case contains frac{n cdot (n-1)}{2} integers b_1,b_2, ... ,b_{ frac{n cdot (n-1)}{2}} ( xe2 x88 x9210^9 <= b_i <= 10^9 ) -- the elements of array b . It is guaranteed that the sum of n over all tests does not exceed 10^3 and for each array b in the test, there exists an original array. For each test case, output any possible array a of length n . In the first sample, Sasha chose the array [1,3,3] , then the array b will look like [ min(a_1,a_2)=1, min(a_1,a_3)=1, min(a_2,a_3)=3] , after shuffling its elements, the array can look like [1,3,1] . In the second sample, there is only one pair, so the array [10,10] is suitable. Another suitable array could be [15,10] . '...

Tutorials

119134

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
217765857 impawstarlight C Aug. 7, 2023, 8:25 p.m. OK GNU C11 TESTS 7 109 3993600
217768140 jmawa1163 C Aug. 7, 2023, 9:03 p.m. OK GNU C11 TESTS 7 139 7987200
217767043 impawstarlight C Aug. 7, 2023, 8:40 p.m. OK GNU C11 TESTS 7 171 7987200
217782876 zhangzhimo C Aug. 8, 2023, 1:55 a.m. OK GNU C++14 TESTS 7 30 20787200
217787570 Leo_Messi_ljk C Aug. 8, 2023, 2:49 a.m. OK GNU C++14 TESTS 7 109 4096000
217797901 Ringss C Aug. 8, 2023, 3:09 a.m. OK GNU C++14 TESTS 7 109 6144000
217755039 omeganot C Aug. 7, 2023, 6:36 p.m. OK GNU C++14 TESTS 7 124 102400
217753917 S_raj C Aug. 7, 2023, 6:26 p.m. OK GNU C++14 TESTS 7 124 102400
217750246 cercatrova C Aug. 7, 2023, 5:59 p.m. OK GNU C++14 TESTS 7 124 102400
217749029 sunny1902 C Aug. 7, 2023, 5:50 p.m. OK GNU C++14 TESTS 7 124 102400
217783960 flashtester C Aug. 8, 2023, 2:08 a.m. OK GNU C++14 TESTS 7 124 102400
217785953 Krishna_xo18 C Aug. 8, 2023, 2:31 a.m. OK GNU C++14 TESTS 7 124 102400
217804374 jatinxkirito C Aug. 8, 2023, 4:26 a.m. OK GNU C++14 TESTS 7 124 102400
217782871 Ywave C Aug. 8, 2023, 1:55 a.m. OK GNU C++17 TESTS 7 93 3993600
217766621 Jeevier C Aug. 7, 2023, 8:35 p.m. OK GNU C++17 TESTS 7 108 2048000
217776781 anmol_02 C Aug. 8, 2023, 12:27 a.m. OK GNU C++17 TESTS 7 124 102400
217799791 iDoItSaNdWiTcH C Aug. 8, 2023, 3:30 a.m. OK GNU C++17 TESTS 7 124 102400
217785710 jcai972 C Aug. 8, 2023, 2:28 a.m. OK GNU C++17 TESTS 7 124 102400
217810165 Samar.Mahmoud C Aug. 8, 2023, 5:33 a.m. OK GNU C++17 TESTS 7 124 102400
217754513 Sajjat004 C Aug. 7, 2023, 6:31 p.m. OK GNU C++17 TESTS 7 124 204800
217754768 Blazing_Flame C Aug. 7, 2023, 6:34 p.m. OK GNU C++17 TESTS 7 124 204800
217746902 Kinan C Aug. 7, 2023, 5:36 p.m. OK GNU C++17 TESTS 7 124 409600
217804272 DangKhoizzzz C Aug. 8, 2023, 4:24 a.m. OK GNU C++17 TESTS 7 124 1228800
217786968 Mourad_Mahgoub C Aug. 8, 2023, 2:42 a.m. OK GNU C++17 (64) TESTS 7 77 0
217785397 Eman_Nasser C Aug. 8, 2023, 2:25 a.m. OK GNU C++17 (64) TESTS 7 77 0
217811875 shuvocoder2025 C Aug. 8, 2023, 5:50 a.m. OK GNU C++17 (64) TESTS 7 77 2048000
217803819 poxiao0 C Aug. 8, 2023, 4:18 a.m. OK GNU C++17 (64) TESTS 7 77 7987200
217759802 scotchtape13 C Aug. 7, 2023, 7:19 p.m. OK GNU C++17 (64) TESTS 7 78 2048000
217787433 Han_Ke C Aug. 8, 2023, 2:47 a.m. OK GNU C++17 (64) TESTS 7 78 3993600
217747281 Signior C Aug. 7, 2023, 5:39 p.m. OK GNU C++17 (64) TESTS 7 92 0
217779881 ccds C Aug. 8, 2023, 1:19 a.m. OK GNU C++17 (64) TESTS 7 92 0
217744052 ibrahim.KA C Aug. 7, 2023, 5:19 p.m. OK GNU C++17 (64) TESTS 7 92 1945600
217773707 enslaved C Aug. 7, 2023, 11:12 p.m. OK GNU C++17 (64) TESTS 7 92 2048000
217778924 cmk666 C Aug. 8, 2023, 1:06 a.m. OK GNU C++20 (64) TESTS 7 15 512000
217756573 mahirfaisal154 C Aug. 7, 2023, 6:49 p.m. OK GNU C++20 (64) TESTS 7 30 5017600
217748042 yuvraj_coder1 C Aug. 7, 2023, 5:44 p.m. OK GNU C++20 (64) TESTS 7 46 0
217749517 Usmaniii C Aug. 7, 2023, 5:54 p.m. OK GNU C++20 (64) TESTS 7 46 0
217787482 cmbefore2024 C Aug. 8, 2023, 2:48 a.m. OK GNU C++20 (64) TESTS 7 46 0
217747938 Mortelman C Aug. 7, 2023, 5:43 p.m. OK GNU C++20 (64) TESTS 7 46 307200
217751860 akms_limon C Aug. 7, 2023, 6:10 p.m. OK GNU C++20 (64) TESTS 7 46 1945600
217742409 tih-a C Aug. 7, 2023, 5:11 p.m. OK GNU C++20 (64) TESTS 7 46 2048000
217755315 noobguy69 C Aug. 7, 2023, 6:39 p.m. OK GNU C++20 (64) TESTS 7 46 2048000
217741893 MohamedMagdy C Aug. 7, 2023, 5:08 p.m. OK GNU C++20 (64) TESTS 7 46 2048000
217759476 Carve C Aug. 7, 2023, 7:15 p.m. OK Go TESTS 7 202 4812800
217753107 vana0kor C Aug. 7, 2023, 6:20 p.m. OK Go TESTS 7 217 4710400
217807075 MayhemLemon C Aug. 8, 2023, 4:59 a.m. OK Java 11 TESTS 7 280 15872000
217807860 Pranav_Sharda C Aug. 8, 2023, 5:08 a.m. OK Java 11 TESTS 7 311 16076800
217784218 Harwinvanak C Aug. 8, 2023, 2:11 a.m. OK Java 11 TESTS 7 327 16281600
217764983 Edge_Tree C Aug. 7, 2023, 8:14 p.m. OK Java 11 TESTS 7 389 71065600
217765054 kajal13 C Aug. 7, 2023, 8:15 p.m. OK Java 11 TESTS 7 795 0
217801766 anuj921210 C Aug. 8, 2023, 3:53 a.m. OK Java 11 TESTS 7 826 0
217753227 AkashKumarVarma C Aug. 7, 2023, 6:21 p.m. OK Java 11 TESTS 7 826 0
217756229 AkashKumarVarma C Aug. 7, 2023, 6:46 p.m. OK Java 11 TESTS 7 857 0
217741323 man-ray C Aug. 7, 2023, 5:06 p.m. OK Java 11 TESTS 7 873 0
217752363 monkey_d_viper C Aug. 7, 2023, 6:14 p.m. OK Java 11 TESTS 7 904 0
217746042 wkoder C Aug. 7, 2023, 5:31 p.m. OK Java 17 TESTS 7 156 512000
217743625 Asnkkzk C Aug. 7, 2023, 5:17 p.m. OK Java 17 TESTS 7 187 512000
217743222 Eslam_Ahmed C Aug. 7, 2023, 5:15 p.m. OK Java 17 TESTS 7 265 16486400
217760884 ADust C Aug. 7, 2023, 7:30 p.m. OK Java 17 TESTS 7 296 15667200
217746051 Sage_Saga C Aug. 7, 2023, 5:31 p.m. OK Java 17 TESTS 7 311 16998400
217776384 InfinitePath C Aug. 8, 2023, 12:20 a.m. OK Java 17 TESTS 7 311 71884800
217798267 not_just_rr C Aug. 8, 2023, 3:13 a.m. OK Java 17 TESTS 7 326 17203200
217773096 Zkrallah C Aug. 7, 2023, 10:58 p.m. OK Java 17 TESTS 7 342 16179200
217757762 Suraj1607 C Aug. 7, 2023, 6:59 p.m. OK Java 17 TESTS 7 342 17100800
217748518 swatishivam23 C Aug. 7, 2023, 5:47 p.m. OK Java 17 TESTS 7 342 25804800
217785527 chuquwan9964 C Aug. 8, 2023, 2:26 a.m. OK Java 8 TESTS 7 108 0
217755706 hamossa C Aug. 7, 2023, 6:42 p.m. OK Java 8 TESTS 7 218 34406400
217754108 hamossa C Aug. 7, 2023, 6:28 p.m. OK Java 8 TESTS 7 218 34406400
217749023 Y_T C Aug. 7, 2023, 5:50 p.m. OK Java 8 TESTS 7 249 29491200
217787364 SilveryZz C Aug. 8, 2023, 2:47 a.m. OK Java 8 TESTS 7 249 34406400
217741686 NerfThis C Aug. 7, 2023, 5:08 p.m. OK Java 8 TESTS 7 265 34304000
217745499 Akarsh2810 C Aug. 7, 2023, 5:27 p.m. OK Java 8 TESTS 7 295 34918400
217807080 Katoch C Aug. 8, 2023, 4:59 a.m. OK Java 8 TESTS 7 717 0
217757400 pcm_op C Aug. 7, 2023, 6:57 p.m. OK Java 8 TESTS 7 764 0
217741060 vjaswanthkrishna C Aug. 7, 2023, 5:05 p.m. OK Java 8 TESTS 7 764 0
217775303 Tubisek C Aug. 7, 2023, 11:55 p.m. OK MS C++ 2017 TESTS 7 327 2048000
217773259 maxK99 C Aug. 7, 2023, 11:01 p.m. OK MS C++ 2017 TESTS 7 327 2048000
217810952 gaporf C Aug. 8, 2023, 5:41 a.m. OK MS C++ 2017 TESTS 7 342 2048000
217757616 Kvazarus C Aug. 7, 2023, 6:58 p.m. OK MS C++ 2017 TESTS 7 343 2048000
217783033 exilesome C Aug. 8, 2023, 1:57 a.m. OK MS C++ 2017 TESTS 7 373 0
217774699 lqj C Aug. 7, 2023, 11:38 p.m. OK MS C++ 2017 TESTS 7 373 12083200
217758441 Aakash_Gore C Aug. 7, 2023, 7:06 p.m. OK MS C++ 2017 TESTS 7 436 6041600
217756280 Cplks C Aug. 7, 2023, 6:47 p.m. OK MS C++ 2017 TESTS 7 451 21913600
217743446 seeforty4040 C Aug. 7, 2023, 5:16 p.m. OK PyPy 3 TESTS 7 499 35737600
217761795 xKRISHNAx C Aug. 7, 2023, 7:39 p.m. OK PyPy 3 TESTS 7 530 35737600
217741114 Sayu-chan C Aug. 7, 2023, 5:05 p.m. OK PyPy 3 TESTS 7 545 35737600
217741292 tu144x C Aug. 7, 2023, 5:06 p.m. OK PyPy 3 TESTS 7 546 35737600
217749597 tr1ten C Aug. 7, 2023, 5:54 p.m. OK PyPy 3 TESTS 7 546 36659200
217754215 Imeon C Aug. 7, 2023, 6:29 p.m. OK PyPy 3 TESTS 7 624 39731200
217799656 b-baka C Aug. 8, 2023, 3:29 a.m. OK PyPy 3-64 TESTS 7 140 55500800
217742334 Hr_Wp C Aug. 7, 2023, 5:10 p.m. OK PyPy 3-64 TESTS 7 155 40140800
217755183 keatonmartin C Aug. 7, 2023, 6:37 p.m. OK PyPy 3-64 TESTS 7 156 49254400
217744410 lorika C Aug. 7, 2023, 5:21 p.m. OK PyPy 3-64 TESTS 7 170 40140800
217773469 karnyadav C Aug. 7, 2023, 11:06 p.m. OK PyPy 3-64 TESTS 7 171 46080000
217811989 katamba C Aug. 8, 2023, 5:52 a.m. OK PyPy 3-64 TESTS 7 171 50278400
217751754 l0stempl3 C Aug. 7, 2023, 6:10 p.m. OK PyPy 3-64 TESTS 7 171 81920000
217798828 Youarenotgood C Aug. 8, 2023, 3:19 a.m. OK PyPy 3-64 TESTS 7 186 66867200
217773722 lucifer1004 C Aug. 7, 2023, 11:12 p.m. OK PyPy 3-64 TESTS 7 187 57344000
217759101 pkr1012 C Aug. 7, 2023, 7:12 p.m. OK PyPy 3-64 TESTS 7 187 57651200
217744807 brownfox2k6 C Aug. 7, 2023, 5:23 p.m. OK Python 3 TESTS 7 170 62156800
217764078 Chelovek9 C Aug. 7, 2023, 8:04 p.m. OK Python 3 TESTS 7 186 62873600
217809612 eugalt C Aug. 8, 2023, 5:27 a.m. OK Python 3 TESTS 7 186 63385600
217799029 _BREEZE_ C Aug. 8, 2023, 3:21 a.m. OK Python 3 TESTS 7 187 62873600
217807789 eugalt C Aug. 8, 2023, 5:08 a.m. OK Python 3 TESTS 7 187 63692800
217760882 Pavan_kumar_Jangam C Aug. 7, 2023, 7:30 p.m. OK Python 3 TESTS 7 202 62156800
217803147 _rahul11_ C Aug. 8, 2023, 4:09 a.m. OK Python 3 TESTS 7 202 62873600
217784201 hckim C Aug. 8, 2023, 2:11 a.m. OK Python 3 TESTS 7 202 62873600
217763083 Kondru_Prabhu C Aug. 7, 2023, 7:52 p.m. OK Python 3 TESTS 7 202 62873600
217744770 21wh1a05j4 C Aug. 7, 2023, 5:23 p.m. OK Python 3 TESTS 7 202 62873600
217753459 0x81 C Aug. 7, 2023, 6:23 p.m. OK Ruby 3 TESTS 7 748 33996800
217752809 0x81 C Aug. 7, 2023, 6:18 p.m. OK Ruby 3 TESTS 7 764 33894400
217741645 SuperMatej999 C Aug. 7, 2023, 5:07 p.m. OK Rust 2021 TESTS 7 15 15769600
217749786 MenezesDM C Aug. 7, 2023, 5:55 p.m. OK Rust 2021 TESTS 7 31 11059200

remove filters

Back to search problems