Codeforces Round 550 (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
1144 Codeforces Round 550 (Div. 3) FINISHED False 7200 183398087 March 31, 2019, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10433 ) D Equalize Them All PROGRAMMING constructive algorithms greedy 1400

B'You are given an array a consisting of n integers. You can perform the following operations arbitrary number of times (possibly, zero): The value |x| means the absolute value of x . For example, |4| = 4 , |-3| = 3 . Your task is to find the minimum number of operations required to obtain the array of equal elements and print the order of operations to do it. It is guaranteed that you always can obtain the array of equal elements using such operations. Note that after each operation each element of the current array should not exceed 10^{18} by absolute value. The first line of the input contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of elements in a . The second line of the input contains n integers a_1, a_2, ... , a_n ( 0 <= a_i <= 2 cdot 10^5 ), where a_i is the i -th element of a . In the first line print one integer k -- the minimum number of operations required to obtain the array of equal elements. In the next k lines print operations itself. The p -th operation should be printed as a triple of integers (t_p, i_p, j_p) , where t_p is either 1 or 2 ( 1 means that you perform the operation of the first type, and 2 means that you perform the operation of the second type), and i_p and j_p are indices of adjacent elements of the array such that 1 <= i_p, j_p <= n , |i_p - j_p| = 1 . See the examples for better understanding. Note that after each operation each element of the current array should not exceed 10^{18} by absolute value. If there are many possible answers, you can print any. '...

Tutorials

66307

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52547653 Denor D April 9, 2019, 11:34 p.m. OK Delphi TESTS 31 171 1638400 1400
52538444 lfhnvjk D April 9, 2019, 4:49 p.m. OK FPC TESTS 31 670 1638400 1400
52751879 PhuongPeu D April 14, 2019, 2:30 p.m. OK FPC TESTS 31 685 3993600 1400
52536288 silvestrov2002 D April 9, 2019, 3:46 p.m. OK FPC TESTS 31 702 1638400 1400
52537729 VladKuz D April 9, 2019, 4:28 p.m. OK FPC TESTS 31 1247 1638400 1400
52234991 thantrongtri3 D April 2, 2019, 1:24 p.m. OK FPC TESTS 31 1247 1843200 1400
52535550 Kuzya2.0 D April 9, 2019, 3:25 p.m. OK FPC TESTS 31 1263 1638400 1400
55610393 ReaLNero1 D June 16, 2019, 5:18 a.m. OK GNU C11 TESTS 31 62 1638400 1400
52265140 Felix555 D April 3, 2019, 11:03 a.m. OK GNU C11 TESTS 31 795 1638400 1400
54810094 _nmp_ D May 29, 2019, 4:20 p.m. OK GNU C11 TESTS 31 795 1638400 1400
58907592 pranaykanjolia D Aug. 16, 2019, 11:49 a.m. OK GNU C11 TESTS 31 795 1638400 1400
54407667 Lunism D May 20, 2019, 7:31 a.m. OK GNU C11 TESTS 31 795 5017600 1400
54417292 Lunism D May 20, 2019, 1:20 p.m. OK GNU C11 TESTS 31 795 5017600 1400
58916160 contact2prateek21 D Aug. 16, 2019, 3:04 p.m. OK GNU C11 TESTS 31 811 1638400 1400
62577863 kaiboy D Oct. 14, 2019, 4:25 p.m. OK GNU C11 TESTS 31 811 2457600 1400
52197853 ananaygupta70 D April 1, 2019, 4:44 p.m. OK GNU C11 TESTS 31 826 1638400 1400
52498444 vjudge5 D April 8, 2019, 2:50 p.m. OK GNU C11 TESTS 31 826 4812800 1400
57984942 vjudge4 D July 30, 2019, 11:01 a.m. OK GNU C++11 TESTS 31 78 1638400 1400
57878661 Frame233 D July 28, 2019, 6:44 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57984655 Dawn_Chase D July 30, 2019, 10:53 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57983754 luogu_bot1 D July 30, 2019, 10:28 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57982901 ModestCoder D July 30, 2019, 10:07 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57971969 fancycoser D July 30, 2019, 6:19 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57984676 vjudge3 D July 30, 2019, 10:54 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57984947 luogu_bot3 D July 30, 2019, 11:01 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57985452 Kevin224 D July 30, 2019, 11:14 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
57985539 vjudge5 D July 30, 2019, 11:16 a.m. OK GNU C++11 TESTS 31 93 1638400 1400
52466532 Fancy_Gemini D April 7, 2019, 3:59 p.m. OK GNU C++14 TESTS 31 109 1638400 1400
52220420 vjudge1 D April 2, 2019, 6:14 a.m. OK GNU C++14 TESTS 31 124 1536000 1400
52607229 Niko_Niko D April 11, 2019, 2:21 p.m. OK GNU C++14 TESTS 31 124 1536000 1400
52256744 evenharder D April 3, 2019, 6:15 a.m. OK GNU C++14 TESTS 31 124 1536000 1400
58264088 gurwika.dev D Aug. 4, 2019, 1:42 p.m. OK GNU C++14 TESTS 31 124 1638400 1400
65234239 zstuycz D Nov. 17, 2019, 6:33 a.m. OK GNU C++14 TESTS 31 124 1638400 1400
62120638 HedaaYaa_101 D Oct. 8, 2019, 2:33 p.m. OK GNU C++14 TESTS 31 124 1638400 1400
57991542 vjudge3 D July 30, 2019, 1:26 p.m. OK GNU C++14 TESTS 31 124 1638400 1400
57973089 vjudge1 D July 30, 2019, 6:45 a.m. OK GNU C++14 TESTS 31 124 1638400 1400
57834343 vjudge4 D July 27, 2019, 7:03 a.m. OK GNU C++14 TESTS 31 124 1638400 1400
52529554 berlou3 D April 9, 2019, 12:57 p.m. OK GNU C++17 TESTS 31 124 1536000 1400
52530203 Nobilta D April 9, 2019, 1:10 p.m. OK GNU C++17 TESTS 31 124 1536000 1400
52533366 chakchen D April 9, 2019, 2:25 p.m. OK GNU C++17 TESTS 31 124 1536000 1400
57105617 pmitkov D July 15, 2019, 3:12 p.m. OK GNU C++17 TESTS 31 124 1536000 1400
58112056 direks D Aug. 1, 2019, 7:35 a.m. OK GNU C++17 TESTS 31 124 1638400 1400
59969977 yu_gi D Sept. 4, 2019, 12:02 a.m. OK GNU C++17 TESTS 31 124 1638400 1400
57636307 Goddan. D July 24, 2019, 10:56 a.m. OK GNU C++17 TESTS 31 124 1638400 1400
57636276 015-28904-Bogdan-7 D July 24, 2019, 10:55 a.m. OK GNU C++17 TESTS 31 124 1638400 1400
57992197 vjudge5 D July 30, 2019, 1:41 p.m. OK GNU C++17 TESTS 31 124 1638400 1400
57999687 vjudge1 D July 30, 2019, 2:50 p.m. OK GNU C++17 TESTS 31 124 1638400 1400
52556558 Fairuzi10 D April 10, 2019, 8:05 a.m. OK Go TESTS 31 78 5324800 1400
52531179 Fairuzi10 D April 9, 2019, 1:32 p.m. OK Go TESTS 31 93 5222400 1400
62870894 120405217 D Oct. 18, 2019, 1:44 p.m. OK Go TESTS 31 234 4505600 1400
62898714 sighduck D Oct. 19, 2019, 2:44 a.m. OK Go TESTS 31 249 9830400 1400
52364695 Dekedro D April 5, 2019, 11:13 p.m. OK Go TESTS 31 264 5324800 1400
52227593 2012201208 D April 2, 2019, 10:27 a.m. OK Go TESTS 31 842 5324800 1400
69299885 hakr_2104 D Jan. 22, 2020, 1:31 p.m. OK Java 11 TESTS 31 686 14028800 1400
56188970 IBatJ D June 28, 2019, 6:32 a.m. OK Java 8 TESTS 31 186 0 1400
54659477 In_The_Name_Of_Love D May 26, 2019, 10:02 a.m. OK Java 8 TESTS 31 186 0 1400
53717876 catforce D May 3, 2019, 8:03 p.m. OK Java 8 TESTS 31 187 0 1400
52211942 prabhat236218 D April 1, 2019, 8:29 p.m. OK Java 8 TESTS 31 187 72294400 1400
57928326 garnacha D July 29, 2019, 7:53 a.m. OK Java 8 TESTS 31 202 0 1400
53591275 ronaldocr7 D April 30, 2019, 11:55 p.m. OK Java 8 TESTS 31 202 0 1400
52797182 prichuda D April 15, 2019, 10:03 p.m. OK Java 8 TESTS 31 202 0 1400
52316735 Ziklon D April 4, 2019, 5:27 p.m. OK Java 8 TESTS 31 202 0 1400
52210288 nopre D April 1, 2019, 7:19 p.m. OK Java 8 TESTS 31 202 2969600 1400
57970946 darren_yao D July 30, 2019, 5:53 a.m. OK Java 8 TESTS 31 202 3174400 1400
52631684 RI7 D April 12, 2019, 7:28 a.m. OK Kotlin TESTS 31 233 4198400 1400
52821111 RI7 D April 16, 2019, 12:01 p.m. OK Kotlin TESTS 31 234 4198400 1400
52622940 RI7 D April 11, 2019, 11:48 p.m. OK Kotlin TESTS 31 280 16179200 1400
52819273 RI7 D April 16, 2019, 11:12 a.m. OK Kotlin TESTS 31 311 6041600 1400
52631589 RI7 D April 12, 2019, 7:24 a.m. OK Kotlin TESTS 31 405 15872000 1400
52635651 harryoooooooooo D April 12, 2019, 9:51 a.m. OK Kotlin TESTS 31 498 38195200 1400
58414466 Spheniscine D Aug. 7, 2019, 3:51 a.m. OK Kotlin TESTS 31 499 30412800 1400
58414359 Spheniscine D Aug. 7, 2019, 3:46 a.m. OK Kotlin TESTS 31 545 39833600 1400
58414163 Spheniscine D Aug. 7, 2019, 3:37 a.m. OK Kotlin TESTS 31 576 39833600 1400
52281173 CrafterKolyan D April 3, 2019, 5:06 p.m. OK Kotlin TESTS 31 1263 73932800 1400
55612774 og.kostya D June 16, 2019, 6:59 a.m. OK Mono C# TESTS 31 140 7270400 1400
52677842 Zedronar D April 13, 2019, 10:38 a.m. OK Mono C# TESTS 31 295 47923200 1400
53782088 treasuryonly D May 5, 2019, 9:14 a.m. OK Mono C# TESTS 31 296 37683200 1400
52676908 Zedronar D April 13, 2019, 10:05 a.m. OK Mono C# TESTS 31 327 55705600 1400
63678997 ilia.kot D Oct. 28, 2019, 7:16 p.m. OK Mono C# TESTS 31 779 29593600 1400
52224590 TRR D April 2, 2019, 8:41 a.m. OK Mono C# TESTS 31 811 26828800 1400
63678283 ilia.kot D Oct. 28, 2019, 7:02 p.m. OK Mono C# TESTS 31 826 29593600 1400
52798783 SantiC D April 16, 2019, 12:27 a.m. OK Mono C# TESTS 31 842 40345600 1400
53900235 vjudge5 D May 9, 2019, 8:41 a.m. OK MS C++ TESTS 31 109 1638400 1400
53406821 vjudge2 D April 27, 2019, 11:09 a.m. OK MS C++ TESTS 31 124 1638400 1400
53465958 vjudge2 D April 28, 2019, 10:05 a.m. OK MS C++ TESTS 31 124 1638400 1400
53466758 vjudge3 D April 28, 2019, 10:33 a.m. OK MS C++ TESTS 31 124 1638400 1400
53819217 vjudge2 D May 6, 2019, 12:17 p.m. OK MS C++ TESTS 31 124 1638400 1400
53898146 vjudge3 D May 9, 2019, 7:27 a.m. OK MS C++ TESTS 31 124 1638400 1400
53938849 vjudge4 D May 10, 2019, 12:55 a.m. OK MS C++ TESTS 31 124 1638400 1400
56392915 vjudge3 D July 1, 2019, 1:20 p.m. OK MS C++ TESTS 31 124 1638400 1400
57986630 vjudge5 D July 30, 2019, 11:38 a.m. OK MS C++ TESTS 31 124 1638400 1400
62662977 vjudge2 D Oct. 16, 2019, 6:32 a.m. OK MS C++ TESTS 31 124 1638400 1400
52820520 A19180288 D April 16, 2019, 11:44 a.m. OK MS C++ 2017 TESTS 31 140 1638400 1400
57986606 System_Y D July 30, 2019, 11:38 a.m. OK MS C++ 2017 TESTS 31 156 1638400 1400
57985801 System_Y D July 30, 2019, 11:21 a.m. OK MS C++ 2017 TESTS 31 156 1638400 1400
52308449 DWAE86 D April 4, 2019, 1:27 p.m. OK MS C++ 2017 TESTS 31 171 1638400 1400
68739279 vjudge4 D Jan. 13, 2020, 10:47 p.m. OK MS C++ 2017 TESTS 31 171 6246400 1400
68648754 sphkemlane D Jan. 12, 2020, 10 a.m. OK MS C++ 2017 TESTS 31 171 6348800 1400
52353011 AleksanderBalobanov D April 5, 2019, 3:25 p.m. OK MS C++ 2017 TESTS 31 171 28979200 1400
60489044 xiaorenshi D Sept. 13, 2019, 1:47 p.m. OK MS C++ 2017 TESTS 31 202 4812800 1400
54484327 ItzSylic D May 22, 2019, 12:24 p.m. OK MS C++ 2017 TESTS 31 218 7270400 1400
53811381 yp0413170331 D May 6, 2019, 7:01 a.m. OK MS C++ 2017 TESTS 31 249 7270400 1400
52770288 raj1307 D April 15, 2019, 8:16 a.m. OK PyPy 2 TESTS 31 343 29081600 1400
52345635 gatsko D April 5, 2019, 12:33 p.m. OK PyPy 2 TESTS 31 343 31948800 1400
55657096 LunaWaala D June 16, 2019, 5:59 p.m. OK PyPy 3 TESTS 31 577 18432000 1400
52239718 ratel_03 D April 2, 2019, 3:17 p.m. OK PyPy 3 TESTS 31 592 18227200 1400
52517163 chengzi D April 9, 2019, 6:21 a.m. OK PyPy 3 TESTS 31 592 18534400 1400
56046712 3x7 D June 25, 2019, 4:57 p.m. OK PyPy 3 TESTS 31 592 26419200 1400
59095217 king7699 D Aug. 19, 2019, 2 p.m. OK PyPy 3 TESTS 31 608 22732800 1400
52960201 deadguy D April 18, 2019, 3:30 p.m. OK PyPy 3 TESTS 31 623 19251200 1400
52320721 renjied D April 4, 2019, 7:37 p.m. OK PyPy 3 TESTS 31 623 31436800 1400
52160486 yfo D April 1, 2019, 3:04 p.m. OK PyPy 3 TESTS 31 624 33689600 1400
52293241 xiaozhao D April 4, 2019, 4:09 a.m. OK PyPy 3 TESTS 31 624 41779200 1400
62353206 lIn_nIl D Oct. 11, 2019, 10:04 a.m. OK PyPy 3 TESTS 31 639 16896000 1400
52236842 Nika86 D April 2, 2019, 2:06 p.m. OK Python 2 TESTS 31 608 13926400 1400
52940334 Cifko D April 18, 2019, 8:52 a.m. OK Python 2 TESTS 31 639 13414400 1400
52480714 allonsy_kim D April 8, 2019, 5:16 a.m. OK Python 2 TESTS 31 639 13619200 1400
58452722 soumyasarkar1998 D Aug. 7, 2019, 4:12 p.m. OK Python 2 TESTS 31 654 13619200 1400
52327784 nealzane D April 5, 2019, 2:34 a.m. OK Python 2 TESTS 31 701 13516800 1400
52206095 kaif_7 D April 1, 2019, 5:28 p.m. OK Python 2 TESTS 31 717 13721600 1400
52448647 SoSooding D April 7, 2019, 8:51 a.m. OK Python 2 TESTS 31 717 29491200 1400
54870222 tchr D May 31, 2019, 8:48 a.m. OK Python 3 TESTS 31 686 34201600 1400
52755530 wofka72 D April 14, 2019, 4:37 p.m. OK Python 3 TESTS 31 779 16384000 1400
53283027 ayejayys D April 25, 2019, 12:47 p.m. OK Python 3 TESTS 31 795 16486400 1400
52505585 DDieter D April 8, 2019, 6:26 p.m. OK Python 3 TESTS 31 811 16896000 1400
56046698 3x7 D June 25, 2019, 4:57 p.m. OK Python 3 TESTS 31 811 21913600 1400
52799778 MitI_7 D April 16, 2019, 1:56 a.m. OK Python 3 TESTS 31 826 28774400 1400
52621755 erickjohnross D April 11, 2019, 10:23 p.m. OK Python 3 TESTS 31 857 21913600 1400
52322427 jddymx D April 4, 2019, 8:41 p.m. OK Python 3 TESTS 31 857 22835200 1400
54723682 dann_romm D May 27, 2019, 6:52 p.m. OK Python 3 TESTS 31 873 16384000 1400
52811542 changhc D April 16, 2019, 9:02 a.m. OK Python 3 TESTS 31 888 16384000 1400
55608347 kobae964 D June 16, 2019, 3:20 a.m. OK Rust TESTS 31 202 12697600 1400
52225530 koka831 D April 2, 2019, 9:13 a.m. OK Rust TESTS 31 1887 6656000 1400
52263082 nik-in-au D April 3, 2019, 9:59 a.m. OK Scala TESTS 31 1341 63692800 1400

remove filters

Back to search problems