Codeforces Round 862 (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
1805 Codeforces Round 862 (Div. 2) FINISHED False 7200 51377099 April 2, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 925 ) F1 Survival of the Weakest (easy version) PROGRAMMING brute force math sortings

B'This is the easy version of the problem. It differs from the hard one only in constraints on n . You can make hacks only if you lock both versions. Let a_1, a_2, ldots, a_n be an array of non-negative integers. Let F(a_1, a_2, ldots, a_n) be the sorted in the non-decreasing order array of n - 1 smallest numbers of the form a_i + a_j , where 1 <= i < j <= n . In other words, F(a_1, a_2, ldots, a_n) is the sorted in the non-decreasing order array of n - 1 smallest sums of all possible pairs of elements of the array a_1, a_2, ldots, a_n . For example, F(1, 2, 5, 7) = [1 + 2, 1 + 5, 2 + 5] = [3, 6, 7] . You are given an array of non-negative integers a_1, a_2, ldots, a_n . Determine the single element of the array underbrace{F(F(F ldots F}_{n-1}(a_1, a_2, ldots, a_n) ldots)) . Since the answer can be quite large, output it modulo 10^9+7 . The first line contains one integer n ( 2 <= n <= 3000 ) -- the initial length of the array. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= 10^9 ) -- the array elements. Output a single number -- the answer modulo 10^9 + 7 . In the first test, the array is transformed as follows: [1, 2, 4, 5, 6] to [3, 5, 6, 6] to [8, 9, 9] to [17, 17] to [34] . The only element of the final array is 34 . In the second test, F(a_1, a_2, ldots, a_n) is [2, 2, 2, 8, 8, 8, 8, 8] . This array is made up of 3 numbers of the form 1 + 1 and 5 numbers of the form 1 + 7 . In the fourth test, the array is transformed as follows: [10^9, 10^9, 777] to [10^9+777, 10^9+777] to [2 cdot 10^9 + 1554] . 2 cdot 10^9 + 1554 modulo 10^9+7 equals 1540 . '...

Tutorials

Editorial of Codeforces Round #862 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
200471963 rainboy F1 April 2, 2023, 7:17 p.m. OK GNU C11 TESTS 119 31 819200
200460586 Potassium F1 April 2, 2023, 5:39 p.m. OK GNU C++14 TESTS 119 124 512000
200515705 skk402429 F1 April 3, 2023, 5:39 a.m. OK GNU C++14 TESTS 119 624 218214400
200501047 prosader F1 April 3, 2023, 4:01 a.m. OK GNU C++14 TESTS 119 717 614400
200482567 NoLifeTrashPlayer F1 April 2, 2023, 9:25 p.m. OK GNU C++14 TESTS 119 717 3174400
200451501 aminsh F1 April 2, 2023, 4:31 p.m. OK GNU C++14 TESTS 119 872 512000
200459066 UranusITS F1 April 2, 2023, 5:30 p.m. OK GNU C++14 TESTS 119 889 9420800
200502187 Anonyme F1 April 3, 2023, 4:20 a.m. OK GNU C++14 TESTS 119 920 9830400
200459561 vivk F1 April 2, 2023, 5:33 p.m. OK GNU C++14 TESTS 119 982 512000
200493280 aajay7546888562 F1 April 3, 2023, 1:11 a.m. OK GNU C++14 TESTS 119 982 512000
200498816 pop_count F1 April 3, 2023, 3:19 a.m. OK GNU C++17 TESTS 119 31 204800
200458209 dat290320 F1 April 2, 2023, 5:26 p.m. OK GNU C++17 TESTS 119 78 409600
200522032 try_kuhn F1 April 3, 2023, 5:55 a.m. OK GNU C++17 TESTS 119 124 204800
200492315 rabbitcxk F1 April 3, 2023, 12:45 a.m. OK GNU C++17 TESTS 119 327 102400
200475776 El3ageed_Abu_Shehab F1 April 2, 2023, 8:02 p.m. OK GNU C++17 TESTS 119 451 716800
200460884 Chelovek9 F1 April 2, 2023, 5:41 p.m. OK GNU C++17 TESTS 119 468 409600
200453189 wyyxhjth F1 April 2, 2023, 4:34 p.m. OK GNU C++17 TESTS 119 623 512000
200465449 go_emon F1 April 2, 2023, 6:15 p.m. OK GNU C++17 TESTS 119 638 819200
200495542 zxy0909 F1 April 3, 2023, 2:09 a.m. OK GNU C++17 TESTS 119 655 409600
200501472 lddlinan F1 April 3, 2023, 4:08 a.m. OK GNU C++17 TESTS 119 702 102400
200480779 michao F1 April 2, 2023, 9:01 p.m. OK GNU C++17 (64) TESTS 119 156 1638400
200461100 ALILILILILI-KHAN F1 April 2, 2023, 5:42 p.m. OK GNU C++17 (64) TESTS 119 280 102400
200457380 sysulby F1 April 2, 2023, 5:23 p.m. OK GNU C++17 (64) TESTS 119 343 102400
200489826 trainwithoutpain F1 April 2, 2023, 11:40 p.m. OK GNU C++17 (64) TESTS 119 343 102400
200503539 tom0727 F1 April 3, 2023, 4:41 a.m. OK GNU C++17 (64) TESTS 119 343 614400
200456457 sysulby F1 April 2, 2023, 5:20 p.m. OK GNU C++17 (64) TESTS 119 358 204800
200489503 Superposition F1 April 2, 2023, 11:32 p.m. OK GNU C++17 (64) TESTS 119 374 614400
200488418 cuiaoxiang F1 April 2, 2023, 11:08 p.m. OK GNU C++17 (64) TESTS 119 421 921600
200484785 Giga_Cronos F1 April 2, 2023, 9:58 p.m. OK GNU C++17 (64) TESTS 119 451 204800
200481467 AlephZero01 F1 April 2, 2023, 9:10 p.m. OK GNU C++17 (64) TESTS 119 483 204800
200497008 Harry666 F1 April 3, 2023, 2:41 a.m. OK GNU C++20 (64) TESTS 119 31 0
200489010 Boboge F1 April 2, 2023, 11:20 p.m. OK GNU C++20 (64) TESTS 119 31 0
200501560 INF_512 F1 April 3, 2023, 4:10 a.m. OK GNU C++20 (64) TESTS 119 31 102400
200502312 Hritik12 F1 April 3, 2023, 4:22 a.m. OK GNU C++20 (64) TESTS 119 31 102400
200522138 K-423 F1 April 3, 2023, 5:56 a.m. OK GNU C++20 (64) TESTS 119 31 204800
200464662 siganai F1 April 2, 2023, 6:08 p.m. OK GNU C++20 (64) TESTS 119 61 307200
200502716 xx001 F1 April 3, 2023, 4:29 a.m. OK GNU C++20 (64) TESTS 119 78 12083200
200457296 siganai F1 April 2, 2023, 5:22 p.m. OK GNU C++20 (64) TESTS 119 124 307200
200495312 SF-Manman F1 April 3, 2023, 2:04 a.m. OK GNU C++20 (64) TESTS 119 156 102400
200490145 Dakovalev1 F1 April 2, 2023, 11:48 p.m. OK GNU C++20 (64) TESTS 119 171 102400
200490026 profchi F1 April 2, 2023, 11:45 p.m. OK Java 11 TESTS 119 1216 0
200495952 dzhi F1 April 3, 2023, 2:18 a.m. OK Java 11 TESTS 119 2963 0
200495739 dzhi F1 April 3, 2023, 2:13 a.m. OK Java 11 TESTS 119 2994 0
200488060 shorya1835 F1 April 2, 2023, 10:59 p.m. OK MS C++ 2017 TESTS 119 124 204800
200465584 vlk0 F1 April 2, 2023, 6:16 p.m. OK PyPy 3 TESTS 119 1403 13004800
200508666 ayushnew_7 F1 April 3, 2023, 5:26 a.m. OK PyPy 3-64 TESTS 119 155 9830400
200522565 Remineva F1 April 3, 2023, 6:02 a.m. OK PyPy 3-64 TESTS 119 170 9830400
200496576 ayushnew_7 F1 April 3, 2023, 2:32 a.m. OK PyPy 3-64 TESTS 119 810 13619200
200513009 Remineva F1 April 3, 2023, 5:28 a.m. OK PyPy 3-64 TESTS 119 826 13107200
200489359 pythonist_viking F1 April 2, 2023, 11:28 p.m. OK PyPy 3-64 TESTS 119 1029 13721600
200490512 Lhohelhohehmm F1 April 2, 2023, 11:58 p.m. OK PyPy 3-64 TESTS 119 1045 11264000
200468584 zouyu9631 F1 April 2, 2023, 6:43 p.m. OK PyPy 3-64 TESTS 119 1060 13209600
200487688 pythonist_viking F1 April 2, 2023, 10:51 p.m. OK PyPy 3-64 TESTS 119 1076 13414400
200488721 pythonist_viking F1 April 2, 2023, 11:14 p.m. OK PyPy 3-64 TESTS 119 1107 13619200
200487487 pythonist_viking F1 April 2, 2023, 10:47 p.m. OK PyPy 3-64 TESTS 119 1138 13209600

remove filters

Back to search problems