Codeforces Round 569 (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
1180 Codeforces Round 569 (Div. 2) FINISHED False 7200 176302487 June 21, 2019, 5:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9678 ) B Nick and Array PROGRAMMING greedy implementation 1500

B"Nick had received an awesome array of integers a=[a_1, a_2, ... , a_n] as a gift for his 5 birthday from his mother. He was already going to explore its various properties but after unpacking he was disappointed a lot because the product a_1 cdot a_2 cdot ... a_n of its elements seemed to him not large enough. He was ready to throw out the array, but his mother reassured him. She told him, that array would not be spoiled after the following operation: choose any index i ( 1 <= i <= n ) and do a_i := -a_i - 1 . For example, he can change array [3, -1, -4, 1] to an array [-4, -1, 3, 1] after applying this operation to elements with indices i=1 and i=3 . Kolya had immediately understood that sometimes it's possible to increase the product of integers of the array a lot. Now he has decided that he wants to get an array with the maximal possible product of integers using only this operation with its elements (possibly zero, one or more times, as many as he wants), it is not forbidden to do this operation several times for the same index. Help Kolya and print the array with the maximal possible product of elements a_1 cdot a_2 cdot ... a_n which can be received using only this operation in some order. If there are multiple answers, print any of them. The first line contains integer n ( 1 <= q n <= q 10^{5} ) -- number of integers in the array. The second line contains n integers a_1, a_2, ldots, a_n ( -10^{6} <= q a_i <= q 10^{6} ) -- elements of the array Print n numbers -- elements of the array with the maximal possible product of elements which can be received using only this operation in some order from the given array. If there are multiple answers, print any of them. "...

Tutorials

Editorial of Round #569

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65616561 vjudge1 B Nov. 24, 2019, 4:01 a.m. OK Clang++17 Diagnostics TESTS 166 826 1536000 1500
56304035 Zeatea B June 30, 2019, 10:40 a.m. OK FPC TESTS 166 327 3993600 1500
59899864 pascal_handle B Sept. 2, 2019, 1:19 p.m. OK FPC TESTS 166 342 819200 1500
56535557 chenyewei_1234 B July 5, 2019, 12:08 a.m. OK FPC TESTS 166 343 409600 1500
55942288 LaSWeeG B June 22, 2019, 5:24 p.m. OK FPC TESTS 166 343 1228800 1500
55942344 Craspedacusta B June 22, 2019, 5:26 p.m. OK FPC TESTS 166 343 24064000 1500
55914135 Hridoy23 B June 22, 2019, 4:22 a.m. OK GNU C11 TESTS 166 358 409600 1500
61061420 nikhilreddy123 B Sept. 22, 2019, 9:35 a.m. OK GNU C11 TESTS 166 373 409600 1500
56067866 rexsong B June 26, 2019, 8:53 a.m. OK GNU C11 TESTS 166 373 409600 1500
56138393 As_if71 B June 27, 2019, 1:04 a.m. OK GNU C11 TESTS 166 373 409600 1500
56434306 Prasanth_Venkat B July 2, 2019, 1:27 p.m. OK GNU C11 TESTS 166 373 409600 1500
56435132 V_msi B July 2, 2019, 1:47 p.m. OK GNU C11 TESTS 166 373 409600 1500
55939247 apoorv1610 B June 22, 2019, 3:39 p.m. OK GNU C11 TESTS 166 373 819200 1500
55912026 chiraglr B June 22, 2019, 2:54 a.m. OK GNU C11 TESTS 166 373 819200 1500
57558430 cs234_shrey B July 22, 2019, 9:37 p.m. OK GNU C11 TESTS 166 374 409600 1500
56610690 prmangal B July 6, 2019, 7:09 a.m. OK GNU C11 TESTS 166 374 409600 1500
56754912 csj B July 9, 2019, 1:28 p.m. OK GNU C++11 TESTS 166 46 409600 1500
56754876 csj B July 9, 2019, 1:27 p.m. OK GNU C++11 TESTS 166 46 409600 1500
56291454 l1ll5 B June 30, 2019, 1:32 a.m. OK GNU C++11 TESTS 166 46 409600 1500
56162364 luogu_bot4 B June 27, 2019, 12:51 p.m. OK GNU C++11 TESTS 166 46 409600 1500
69026433 Cesarex B Jan. 18, 2020, 7:18 a.m. OK GNU C++11 TESTS 166 46 409600 1500
69026531 Cesarelg B Jan. 18, 2020, 7:19 a.m. OK GNU C++11 TESTS 166 46 409600 1500
63139925 luogu_bot1 B Oct. 22, 2019, 2:49 p.m. OK GNU C++11 TESTS 166 46 409600 1500
63137888 luogu_bot5 B Oct. 22, 2019, 2:46 p.m. OK GNU C++11 TESTS 166 46 409600 1500
59230841 chhokmah B Aug. 21, 2019, 3:25 p.m. OK GNU C++11 TESTS 166 46 409600 1500
59230787 chhokmah B Aug. 21, 2019, 3:23 p.m. OK GNU C++11 TESTS 166 46 409600 1500
55933172 vishnu_m B June 22, 2019, 12:33 p.m. OK GNU C++14 TESTS 166 46 409600 1500
56249926 tokitsukaze B June 29, 2019, 2:05 a.m. OK GNU C++14 TESTS 166 46 1228800 1500
69708426 vjudge1 B Jan. 29, 2020, 5:53 a.m. OK GNU C++14 TESTS 166 62 409600 1500
68969148 warrioramrit B Jan. 17, 2020, 6:19 a.m. OK GNU C++14 TESTS 166 62 409600 1500
68959153 Nenadm421 B Jan. 16, 2020, 10:34 p.m. OK GNU C++14 TESTS 166 62 409600 1500
68844957 ma_da_fa_ka B Jan. 15, 2020, 7:06 a.m. OK GNU C++14 TESTS 166 62 409600 1500
67853774 meet97_patel B Dec. 29, 2019, 5:03 a.m. OK GNU C++14 TESTS 166 62 409600 1500
66314880 bayazid B Dec. 5, 2019, 12:43 p.m. OK GNU C++14 TESTS 166 62 409600 1500
65708072 vjudge3 B Nov. 25, 2019, 1:19 p.m. OK GNU C++14 TESTS 166 62 409600 1500
69526508 Aditya_278 B Jan. 25, 2020, 3:18 p.m. OK GNU C++14 TESTS 166 62 409600 1500
57467242 lesskreker B July 21, 2019, 4:07 p.m. OK GNU C++17 TESTS 166 46 409600 1500
56269386 ygy B June 29, 2019, 11:28 a.m. OK GNU C++17 TESTS 166 46 2252800 1500
56190105 md.alam B June 28, 2019, 7:05 a.m. OK GNU C++17 TESTS 166 61 409600 1500
65757132 vjudge4 B Nov. 26, 2019, 2:24 p.m. OK GNU C++17 TESTS 166 62 409600 1500
65950626 guanhuhao B Nov. 29, 2019, 10:42 a.m. OK GNU C++17 TESTS 166 62 409600 1500
69012170 2018213529 B Jan. 18, 2020, 4:09 a.m. OK GNU C++17 TESTS 166 62 409600 1500
69259837 airad B Jan. 21, 2020, 4:43 p.m. OK GNU C++17 TESTS 166 62 409600 1500
69611018 Alisher B Jan. 27, 2020, 11:30 a.m. OK GNU C++17 TESTS 166 62 409600 1500
69805609 AuroraPrz1809 B Jan. 30, 2020, 1:38 a.m. OK GNU C++17 TESTS 166 62 409600 1500
65895981 Miracle_boY B Nov. 28, 2019, 6:12 a.m. OK GNU C++17 TESTS 166 62 409600 1500
60937123 sighduck B Sept. 20, 2019, 3:44 p.m. OK Go TESTS 166 109 0 1500
60949566 sighduck B Sept. 20, 2019, 8:49 p.m. OK Go TESTS 166 124 0 1500
67853798 krutarth07 B Dec. 29, 2019, 5:04 a.m. OK Java 11 TESTS 166 592 0 1500
68416831 TheDarkKnight03 B Jan. 8, 2020, 7:18 p.m. OK Java 11 TESTS 166 624 3174400 1500
67854046 tarpara.dhruv B Dec. 29, 2019, 5:11 a.m. OK Java 11 TESTS 166 670 0 1500
55939204 icpc_loser B June 22, 2019, 3:37 p.m. OK Java 8 TESTS 166 124 0 1500
69028911 bluesky111 B Jan. 18, 2020, 7:44 a.m. OK Java 8 TESTS 166 139 0 1500
56531298 atarw B July 4, 2019, 7:53 p.m. OK Java 8 TESTS 166 140 0 1500
57901577 richboy B July 28, 2019, 3:53 p.m. OK Java 8 TESTS 166 140 0 1500
56187421 amolpratap007 B June 28, 2019, 5:47 a.m. OK Java 8 TESTS 166 140 0 1500
56160839 DesaiNikunj B June 27, 2019, 12:15 p.m. OK Java 8 TESTS 166 140 0 1500
55993456 revanthreddy85 B June 24, 2019, 8:58 a.m. OK Java 8 TESTS 166 140 0 1500
55974376 r_sutaria B June 23, 2019, 4:36 p.m. OK Java 8 TESTS 166 140 0 1500
55944424 caoash B June 22, 2019, 6:44 p.m. OK Java 8 TESTS 166 140 0 1500
55935404 Seco_seco B June 22, 2019, 1:42 p.m. OK Java 8 TESTS 166 140 0 1500
55987676 orazbek B June 24, 2019, 5:28 a.m. OK JavaScript TESTS 166 109 17715200 1500
56029735 Spheniscine B June 25, 2019, 8:52 a.m. OK Kotlin TESTS 166 296 6451200 1500
68700942 yakamoto B Jan. 13, 2020, 9:26 a.m. OK Kotlin TESTS 166 311 7577600 1500
56001792 CauchyRiemann B June 24, 2019, 1:23 p.m. OK Kotlin TESTS 166 312 7270400 1500
55908710 Protagoras B June 21, 2019, 11:12 p.m. OK Kotlin TESTS 166 389 6451200 1500
56023181 mendel_vv B June 25, 2019, 5:22 a.m. OK Kotlin TESTS 166 592 5017600 1500
55962208 redjohn B June 23, 2019, 10:09 a.m. OK Kotlin TESTS 166 607 5324800 1500
55918595 og.kostya B June 22, 2019, 6:33 a.m. OK Mono C# TESTS 166 78 3379200 1500
55990467 svobodiannikov B June 24, 2019, 7:21 a.m. OK Mono C# TESTS 166 124 18124800 1500
59123957 treasuryonly B Aug. 20, 2019, 7:28 a.m. OK Mono C# TESTS 166 124 18124800 1500
64180807 SpinDOS B Nov. 4, 2019, 12:22 a.m. OK Mono C# TESTS 166 124 22835200 1500
55991572 LapsleyJuno SaurumanS lewasupaman B June 24, 2019, 7:57 a.m. OK Mono C# TESTS 166 139 22835200 1500
55953669 TRR B June 23, 2019, 5:27 a.m. OK Mono C# TESTS 166 390 15257600 1500
62939110 nastya1199 B Oct. 19, 2019, 2:59 p.m. OK Mono C# TESTS 166 405 14438400 1500
58031319 tihoson B July 30, 2019, 4:30 p.m. OK Mono C# TESTS 166 436 19763200 1500
56011445 Stepanova_Anastasia B June 24, 2019, 6:20 p.m. OK Mono C# TESTS 166 436 23142400 1500
56286212 e6eHaMaTb B June 29, 2019, 7:46 p.m. OK Mono C# TESTS 166 655 6246400 1500
65617992 vjudge4 B Nov. 24, 2019, 4:57 a.m. OK MS C++ TESTS 166 61 409600 1500
56374442 GStnt B July 1, 2019, 5:52 a.m. OK MS C++ TESTS 166 62 409600 1500
56295600 S.K B June 30, 2019, 5:39 a.m. OK MS C++ TESTS 166 62 409600 1500
56062740 vjudge4 B June 26, 2019, 6:23 a.m. OK MS C++ TESTS 166 62 409600 1500
56062384 vjudge1 B June 26, 2019, 6:12 a.m. OK MS C++ TESTS 166 62 409600 1500
56061444 vjudge2 B June 26, 2019, 5:43 a.m. OK MS C++ TESTS 166 62 409600 1500
56061165 vjudge2 B June 26, 2019, 5:32 a.m. OK MS C++ TESTS 166 62 409600 1500
57277913 qcwlmqy B July 18, 2019, 11:37 a.m. OK MS C++ TESTS 166 62 409600 1500
58015920 vjudge2 B July 30, 2019, 3:35 p.m. OK MS C++ TESTS 166 62 409600 1500
58527648 vjudge3 B Aug. 10, 2019, 7:56 a.m. OK MS C++ TESTS 166 62 409600 1500
55906612 j2v B June 21, 2019, 9:29 p.m. OK MS C++ 2017 TESTS 166 77 409600 1500
55918175 sirish_kp B June 22, 2019, 6:24 a.m. OK MS C++ 2017 TESTS 166 78 409600 1500
56034284 Aayush_2001 B June 25, 2019, 11:18 a.m. OK MS C++ 2017 TESTS 166 78 409600 1500
56061474 945578930 B June 26, 2019, 5:44 a.m. OK MS C++ 2017 TESTS 166 78 409600 1500
56190400 xsc B June 28, 2019, 7:13 a.m. OK MS C++ 2017 TESTS 166 78 409600 1500
55901494 whilefail B June 21, 2019, 6:55 p.m. OK MS C++ 2017 TESTS 166 78 819200 1500
55898765 alexey4eg B June 21, 2019, 6:40 p.m. OK MS C++ 2017 TESTS 166 78 819200 1500
55930591 tyf0530 B June 22, 2019, 11:17 a.m. OK MS C++ 2017 TESTS 166 78 819200 1500
57725696 ZSTU-2018329621261 B July 25, 2019, 7:05 a.m. OK MS C++ 2017 TESTS 166 78 819200 1500
55949237 hrustim25 B June 22, 2019, 11:12 p.m. OK MS C++ 2017 TESTS 166 78 2662400 1500
55897952 CyberGoose B June 21, 2019, 6:36 p.m. OK Ocaml TESTS 166 93 5324800 1500
55975211 Alexand_Romanenko B June 23, 2019, 5:04 p.m. OK PascalABC.NET TESTS 166 966 78233600 1500
55905995 mm944 B June 21, 2019, 9:16 p.m. OK PascalABC.NET TESTS 166 967 0 1500
56003248 lostamok B June 24, 2019, 2:06 p.m. OK PHP TESTS 166 77 10035200 1500
56239426 mayakin B June 28, 2019, 5:44 p.m. OK PHP TESTS 166 140 14233600 1500
56282572 frostD B June 29, 2019, 5:38 p.m. OK PyPy 2 TESTS 166 155 10547200 1500
58525032 vjudge3 B Aug. 10, 2019, 6:44 a.m. OK PyPy 2 TESTS 166 155 11059200 1500
55906241 bcollet B June 21, 2019, 9:20 p.m. OK PyPy 2 TESTS 166 156 11366400 1500
55899273 raj1307 B June 21, 2019, 6:43 p.m. OK PyPy 2 TESTS 166 171 9830400 1500
55909585 yumtam B June 22, 2019, 12:21 a.m. OK PyPy 2 TESTS 166 171 10137600 1500
56924092 jolt.tks B July 12, 2019, 3:58 p.m. OK PyPy 2 TESTS 166 171 11366400 1500
55928741 shubhankarsharma00 B June 22, 2019, 10:30 a.m. OK PyPy 2 TESTS 166 858 11161600 1500
55892459 shubhankarsharma00 B June 21, 2019, 6:09 p.m. OK PyPy 2 TESTS 166 873 11161600 1500
55940661 Baron3228 B June 22, 2019, 4:26 p.m. OK PyPy 3 TESTS 166 280 14438400 1500
55916239 codershuvo B June 22, 2019, 5:34 a.m. OK PyPy 3 TESTS 166 280 14540800 1500
55915093 komolakanto B June 22, 2019, 4:58 a.m. OK PyPy 3 TESTS 166 280 15257600 1500
66972707 vyassamir B Dec. 15, 2019, 1:41 p.m. OK PyPy 3 TESTS 166 280 15564800 1500
55913589 alexara1123 B June 22, 2019, 4:01 a.m. OK PyPy 3 TESTS 166 280 16384000 1500
56078048 Felerius B June 26, 2019, 1:46 p.m. OK PyPy 3 TESTS 166 280 16486400 1500
55914071 rajat_2548 B June 22, 2019, 4:19 a.m. OK PyPy 3 TESTS 166 296 11673600 1500
68722760 anishde85 B Jan. 13, 2020, 4:51 p.m. OK PyPy 3 TESTS 166 296 11878400 1500
55903323 Saftap B June 21, 2019, 7:02 p.m. OK PyPy 3 TESTS 166 296 14438400 1500
57953544 shreeSinghi B July 29, 2019, 5:36 p.m. OK PyPy 3 TESTS 166 296 14540800 1500
56839263 klond90 B July 11, 2019, 10:43 a.m. OK Python 2 TESTS 166 265 8704000 1500
55983031 muhitsarwar B June 23, 2019, 11:36 p.m. OK Python 2 TESTS 166 280 5632000 1500
57652326 Luxo B July 24, 2019, 2:45 p.m. OK Python 2 TESTS 166 296 6451200 1500
55899722 anonymous0314 B June 21, 2019, 6:45 p.m. OK Python 2 TESTS 166 296 6553600 1500
55928930 kaif_7 B June 22, 2019, 10:35 a.m. OK Python 2 TESTS 166 311 5632000 1500
57971151 -Morass- B July 30, 2019, 5:59 a.m. OK Python 2 TESTS 166 311 6553600 1500
56007717 vest B June 24, 2019, 4:27 p.m. OK Python 2 TESTS 166 311 6553600 1500
55906634 daniel.carlos B June 21, 2019, 9:30 p.m. OK Python 2 TESTS 166 451 10649600 1500
55967133 jokkebk B June 23, 2019, 12:45 p.m. OK Python 3 TESTS 166 187 9932800 1500
58541687 vjudge1 B Aug. 10, 2019, 2:30 p.m. OK Python 3 TESTS 166 187 11264000 1500
56445147 SandorGarcia B July 2, 2019, 6:27 p.m. OK Python 3 TESTS 166 202 9523200 1500
55938599 anushkaaa B June 22, 2019, 3:16 p.m. OK Python 3 TESTS 166 202 9523200 1500
55916267 codershuvo B June 22, 2019, 5:34 a.m. OK Python 3 TESTS 166 202 9932800 1500
56517096 HybridSkills B July 4, 2019, 1:14 p.m. OK Python 3 TESTS 166 202 10137600 1500
55935285 Jamoeba B June 22, 2019, 1:39 p.m. OK Python 3 TESTS 166 202 10444800 1500
56181963 tuannamnguyen B June 28, 2019, 12:50 a.m. OK Python 3 TESTS 166 202 10956800 1500
55928370 whirlpool27 B June 22, 2019, 10:21 a.m. OK Python 3 TESTS 166 202 10956800 1500
55907243 sowlosc B June 21, 2019, 9:52 p.m. OK Python 3 TESTS 166 202 11264000 1500
60740511 tpoeiras B Sept. 17, 2019, 7:45 p.m. OK Rust TESTS 166 62 3174400 1500
55966556 delta_4d B June 23, 2019, 12:27 p.m. OK Rust TESTS 166 77 3686400 1500
55924085 rubdos B June 22, 2019, 8:36 a.m. OK Rust TESTS 166 77 3891200 1500
55932934 Qusai_Hroub B June 22, 2019, 12:24 p.m. OK Rust TESTS 166 109 4812800 1500
55928852 Geralt_Of_Rivia B June 22, 2019, 10:33 a.m. OK Scala TESTS 166 561 5734400 1500
55973074 smas B June 23, 2019, 3:53 p.m. OK Scala TESTS 166 576 7168000 1500
56401626 mikkk B July 1, 2019, 5:07 p.m. OK Scala TESTS 166 701 5734400 1500

remove filters

Back to search problems