Codeforces Round 446 (Div. 1)

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
891 Codeforces Round 446 (Div. 1) FINISHED False 7200 226596323 Nov. 17, 2017, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3040 ) B Gluttony PROGRAMMING constructive algorithms greedy 2000

B'You are given an array a with n distinct integers. Construct an array b by permuting a such that for every non-empty subset of indices S xe2 x80 x89= xe2 x80 x89{x1, xe2 x80 x89x2, xe2 x80 x89..., xe2 x80 x89xk} (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, 0 xe2 x80 x89< xe2 x80 x89k xe2 x80 x89< xe2 x80 x89n) the sums of elements on that positions in a and b are different, i. e. The first line contains one integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8922) -- the size of the array. The second line contains n space-separated distinct integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the elements of the array. If there is no such array b, print -1. Otherwise in the only line print n space-separated integers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bn. Note that b must be a permutation of a. If there are multiple answers, print any of them. An array x is a permutation of y, if we can shuffle elements of y such that it will coincide with x. Note that the empty subset and the subset containing all indices are not counted. '...

Tutorials

Codeforces Round #446 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
32391288 yosupo B Nov. 17, 2017, 3:10 p.m. OK D TESTS 40 15 0 2000
32400632 fluffyowl B Nov. 17, 2017, 4:01 p.m. OK D TESTS 40 15 0 2000
32392077 Gassa B Nov. 17, 2017, 3:14 p.m. OK D TESTS 40 15 0 2000
32499018 FalseMirror B Nov. 20, 2017, 12:22 p.m. OK D TESTS 40 15 102400 2000
32431045 Faimerth B Nov. 18, 2017, 12:41 p.m. OK GNU C TESTS 40 15 20070400 2000
32569642 vjudge2 B Nov. 23, 2017, 8:25 a.m. OK GNU C++ TESTS 40 15 0 2000
32560478 a2357 B Nov. 22, 2017, 7:45 p.m. OK GNU C++ TESTS 40 15 0 2000
32517904 lsmll B Nov. 21, 2017, 6:54 a.m. OK GNU C++ TESTS 40 15 0 2000
32501779 bonaparte B Nov. 20, 2017, 1:55 p.m. OK GNU C++ TESTS 40 15 0 2000
32432293 wawade3 B Nov. 18, 2017, 1:28 p.m. OK GNU C++ TESTS 40 15 0 2000
32430296 Random_chen B Nov. 18, 2017, 12:16 p.m. OK GNU C++ TESTS 40 15 0 2000
32428940 abisheka B Nov. 18, 2017, 11:28 a.m. OK GNU C++ TESTS 40 15 0 2000
32574895 F.Darcy B Nov. 23, 2017, 12:26 p.m. OK GNU C++ TESTS 40 15 0 2000
32428261 Canoeing B Nov. 18, 2017, 11:01 a.m. OK GNU C++ TESTS 40 15 0 2000
32569648 vjudge4 B Nov. 23, 2017, 8:25 a.m. OK GNU C++ TESTS 40 15 0 2000
32418274 CtrlCV B Nov. 18, 2017, 2:15 a.m. OK GNU C11 TESTS 40 15 0 2000
32569032 1046764532 B Nov. 23, 2017, 7:55 a.m. OK GNU C++11 TESTS 40 15 0 2000
32551431 mltang B Nov. 22, 2017, 1:15 p.m. OK GNU C++11 TESTS 40 15 0 2000
32537834 Jonno B Nov. 22, 2017, 12:05 a.m. OK GNU C++11 TESTS 40 15 0 2000
32526081 mltang B Nov. 21, 2017, 1:06 p.m. OK GNU C++11 TESTS 40 15 0 2000
32522340 perchema B Nov. 21, 2017, 10:43 a.m. OK GNU C++11 TESTS 40 15 0 2000
32518671 Tawn B Nov. 21, 2017, 7:37 a.m. OK GNU C++11 TESTS 40 15 0 2000
32517351 Enigmo B Nov. 21, 2017, 6:22 a.m. OK GNU C++11 TESTS 40 15 0 2000
32505434 DragonKoko B Nov. 20, 2017, 4:12 p.m. OK GNU C++11 TESTS 40 15 0 2000
32574342 hesihesiwujiuwu B Nov. 23, 2017, 12:05 p.m. OK GNU C++11 TESTS 40 15 0 2000
32502424 J_X B Nov. 20, 2017, 2:18 p.m. OK GNU C++11 TESTS 40 15 0 2000
32564192 KyrieL B Nov. 23, 2017, 1:02 a.m. OK GNU C++14 TESTS 40 15 0 2000
58083694 vjudge1 B July 31, 2019, 2:45 p.m. OK GNU C++14 TESTS 40 15 0 2000
40256759 iShibly B July 13, 2018, 9:30 a.m. OK GNU C++14 TESTS 40 15 0 2000
38583712 saihemanth9019 B May 24, 2018, 10:56 a.m. OK GNU C++14 TESTS 40 15 0 2000
38347544 square1001 B May 17, 2018, 11:56 a.m. OK GNU C++14 TESTS 40 15 0 2000
32576649 sajalagrawal B Nov. 23, 2017, 1:38 p.m. OK GNU C++14 TESTS 40 15 0 2000
32574725 hicodeworld B Nov. 23, 2017, 12:19 p.m. OK GNU C++14 TESTS 40 15 0 2000
32571894 sfiction B Nov. 23, 2017, 10:19 a.m. OK GNU C++14 TESTS 40 15 0 2000
32570267 NiroBC B Nov. 23, 2017, 8:58 a.m. OK GNU C++14 TESTS 40 15 0 2000
32564257 thomasdo B Nov. 23, 2017, 1:11 a.m. OK GNU C++14 TESTS 40 15 0 2000
46851253 markotee B Dec. 10, 2018, 12:24 p.m. OK GNU C++17 TESTS 40 15 0 2000
40405357 vjudge5 B July 16, 2018, 9:29 a.m. OK GNU C++17 TESTS 40 15 0 2000
57934567 arbitrary_A B July 29, 2019, 10:03 a.m. OK GNU C++17 TESTS 40 15 0 2000
53901320 sping128 B May 9, 2019, 10:21 a.m. OK GNU C++17 TESTS 40 15 204800 2000
59907328 ST_C B Sept. 2, 2019, 3:53 p.m. OK GNU C++17 TESTS 40 30 0 2000
59578357 kostia244 B Aug. 27, 2019, 2:59 p.m. OK GNU C++17 TESTS 40 30 0 2000
58710815 qsh17 B Aug. 13, 2019, 12:10 p.m. OK GNU C++17 TESTS 40 30 0 2000
54972725 1509cxt B June 2, 2019, 9:19 a.m. OK GNU C++17 TESTS 40 30 0 2000
40526245 MMAA B July 18, 2018, 8:58 p.m. OK GNU C++17 TESTS 40 30 0 2000
60456851 HanaYukii B Sept. 12, 2019, 6:20 p.m. OK GNU C++17 TESTS 40 30 0 2000
39692272 vatsal.malaviya B June 27, 2018, 5:59 a.m. OK Java 8 TESTS 40 124 0 2000
65086912 yaoct B Nov. 15, 2019, 5:18 p.m. OK Java 8 TESTS 40 124 0 2000
32417795 tmwilliamlin168 B Nov. 18, 2017, 1:40 a.m. OK Java 8 TESTS 40 124 0 2000
32413931 fetetriste B Nov. 17, 2017, 8:48 p.m. OK Java 8 TESTS 40 124 0 2000
32407326 prashanth_rebala B Nov. 17, 2017, 6:15 p.m. OK Java 8 TESTS 40 124 0 2000
34957718 flyman3046 B Feb. 6, 2018, 12:32 a.m. OK Java 8 TESTS 40 124 20684800 2000
33275265 anhdt B Dec. 15, 2017, 7:28 p.m. OK Java 8 TESTS 40 124 20787200 2000
32386846 mmaxio B Nov. 17, 2017, 2:52 p.m. OK Java 8 TESTS 40 139 0 2000
33952734 tri B Jan. 5, 2018, 11:28 p.m. OK Java 8 TESTS 40 139 20684800 2000
32445652 habanera B Nov. 19, 2017, 2:23 a.m. OK Java 8 TESTS 40 139 20684800 2000
32415363 SlavaG B Nov. 17, 2017, 10:10 p.m. OK Kotlin TESTS 40 155 614400 2000
32415316 SlavaG B Nov. 17, 2017, 10:08 p.m. OK Kotlin TESTS 40 155 614400 2000
32412902 leign B Nov. 17, 2017, 8:04 p.m. OK MS C# TESTS 40 46 102400 2000
32387547 16silver B Nov. 17, 2017, 2:55 p.m. OK MS C++ TESTS 40 15 0 2000
32489695 Jayden123 B Nov. 20, 2017, 5:15 a.m. OK MS C++ TESTS 40 15 0 2000
32409912 mshcherba B Nov. 17, 2017, 7:01 p.m. OK MS C++ TESTS 40 15 0 2000
32397726 Khazhak B Nov. 17, 2017, 3:42 p.m. OK MS C++ TESTS 40 15 0 2000
32391902 waltz B Nov. 17, 2017, 3:13 p.m. OK MS C++ TESTS 40 15 0 2000
32456239 Artem84 B Nov. 19, 2017, 12:18 p.m. OK MS C++ TESTS 40 15 2048000 2000
37844446 vjudge3 B May 2, 2018, 3:43 p.m. OK MS C++ TESTS 40 30 3481600 2000
58105239 vjudge5 B Aug. 1, 2019, 3:47 a.m. OK MS C++ TESTS 40 31 0 2000
58100754 vjudge3 B Aug. 1, 2019, 12:36 a.m. OK MS C++ TESTS 40 31 0 2000
58085473 vjudge4 B July 31, 2019, 3:24 p.m. OK MS C++ TESTS 40 31 0 2000
58100740 vjudge3 B Aug. 1, 2019, 12:35 a.m. OK MS C++ 2017 TESTS 40 31 0 2000
64538985 CtrlAlt B Nov. 8, 2019, 5:56 p.m. OK MS C++ 2017 TESTS 40 31 307200 2000
58072539 vjudge2 B July 31, 2019, 11:13 a.m. OK MS C++ 2017 TESTS 40 46 0 2000
32433720 Yash_ B Nov. 18, 2017, 2:24 p.m. OK PyPy 2 TESTS 40 78 21196800 2000
59188885 Sevlll B Aug. 20, 2019, 7:49 p.m. OK PyPy 3 TESTS 40 140 0 2000
47719362 problem_solved B Dec. 30, 2018, 10:11 a.m. OK PyPy 3 TESTS 40 140 0 2000
32419221 songzy12 B Nov. 18, 2017, 3:23 a.m. OK Python 2 TESTS 40 61 0 2000
32562576 Neumann B Nov. 22, 2017, 10:07 p.m. OK Python 2 TESTS 40 62 0 2000
32409113 flower B Nov. 17, 2017, 6:46 p.m. OK Python 2 TESTS 40 62 0 2000
32393805 nwi B Nov. 17, 2017, 3:21 p.m. OK Python 2 TESTS 40 62 0 2000
32434189 xlk B Nov. 18, 2017, 2:42 p.m. OK Python 2 TESTS 40 77 4608000 2000
38988383 Ali_Pi B June 6, 2018, 8:32 a.m. OK Python 2 TESTS 40 109 0 2000
32575379 hicodeworld B Nov. 23, 2017, 12:43 p.m. OK Python 3 TESTS 40 62 0 2000
32561737 Taxman B Nov. 22, 2017, 9:06 p.m. OK Python 3 TESTS 40 62 0 2000
32557597 egorvlz568 Anbal B Nov. 22, 2017, 5:12 p.m. OK Python 3 TESTS 40 62 0 2000
32499941 Jiburiru B Nov. 20, 2017, 12:54 p.m. OK Python 3 TESTS 40 62 0 2000
32413356 atryapa B Nov. 17, 2017, 8:23 p.m. OK Python 3 TESTS 40 62 0 2000
32413332 atryapa B Nov. 17, 2017, 8:22 p.m. OK Python 3 TESTS 40 62 0 2000
33035248 yugle7 B Dec. 8, 2017, 8:15 p.m. OK Python 3 TESTS 40 62 5529600 2000
32776333 Yukimai B Nov. 29, 2017, 9:21 a.m. OK Python 3 TESTS 40 62 5529600 2000
32752163 StinsonOvO B Nov. 28, 2017, 1:45 p.m. OK Python 3 TESTS 40 62 6246400 2000
32490942 avalya7 B Nov. 20, 2017, 6:34 a.m. OK Python 3 TESTS 40 77 0 2000

remove filters

Back to search problems