Codeforces Round 542 [Alex Lopashev Thanks-Round] (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
1130 Codeforces Round 542 [Alex Lopashev Thanks-Round] (Div. 2) FINISHED False 7200 180800699 Feb. 24, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11656 ) A Be Positive PROGRAMMING implementation 900

B'You are given an array of n integers: a_1, a_2, ldots, a_n . Your task is to find some non-zero integer d ( -10^3 <= q d <= q 10^3 ) such that, after each number in the array is divided by d , the number of positive numbers that are presented in the array is greater than or equal to half of the array size (i.e., at least lceil frac{n}{2} rceil ). Note that those positive numbers do not need to be an integer (e.g., a 2.5 counts as a positive number). If there are multiple values of d that satisfy the condition, you may print any of them. In case that there is no such d , print a single integer 0 . Recall that lceil x rceil represents the smallest integer that is not less than x and that zero ( 0 ) is neither positive nor negative. The first line contains one integer n ( 1 <= n <= 100 ) -- the number of elements in the array. The second line contains n space-separated integers a_1, a_2, ldots, a_n ( -10^3 <= a_i <= 10^3 ). Print one integer d ( -10^3 <= q d <= q 10^3 and d neq 0 ) that satisfies the given condition. If there are multiple values of d that satisfy the condition, you may print any of them. In case that there is no such d , print a single integer 0 . In the first sample, n = 5 , so we need at least lceil frac{5}{2} rceil = 3 positive numbers after division. If d = 4 , the array after division is [2.5, 0, -1.75, 0.5, 1.5] , in which there are 3 positive numbers (namely: 2.5 , 0.5 , and 1.5 ). In the second sample, there is no valid d , so 0 should be printed. '...

Tutorials

65520

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63685314 vjudge4 A Oct. 28, 2019, 10:11 p.m. OK Clang++17 Diagnostics TESTS 106 46 0 900
60937413 Ghozlan A Sept. 20, 2019, 3:50 p.m. OK Clang++17 Diagnostics TESTS 106 46 0 900
57143645 DTUPIS A July 16, 2019, 12:07 p.m. OK Clang++17 Diagnostics TESTS 106 46 0 900
67292210 Dariush_M A Dec. 20, 2019, 3:55 p.m. OK Clang++17 Diagnostics TESTS 106 61 0 900
51842638 pqhieu A March 26, 2019, 12:16 a.m. OK FPC TESTS 106 31 0 900
51753652 diaconu A March 23, 2019, 10:40 a.m. OK FPC TESTS 106 31 0 900
50554039 MakarA A Feb. 27, 2019, 6:50 a.m. OK FPC TESTS 106 31 0 900
50517105 panteleevda A Feb. 26, 2019, 7:10 a.m. OK FPC TESTS 106 31 0 900
51057947 vjudge3 A March 9, 2019, 12:43 a.m. OK FPC TESTS 106 31 307200 900
56551473 HQT2003 A July 5, 2019, 9:59 a.m. OK FPC TESTS 106 31 409600 900
50806199 simoncatcity A March 5, 2019, 5:41 a.m. OK FPC TESTS 106 46 0 900
63737269 vjudge4 A Oct. 29, 2019, 3:43 p.m. OK GNU C11 TESTS 106 31 0 900
66618394 yigezhe A Dec. 11, 2019, 5:44 a.m. OK GNU C11 TESTS 106 31 0 900
61085350 Backbenchar11 A Sept. 22, 2019, 6:06 p.m. OK GNU C11 TESTS 106 31 0 900
61849969 Eswar_114 A Oct. 4, 2019, 12:26 p.m. OK GNU C11 TESTS 106 31 0 900
62880993 Compiler_Error A Oct. 18, 2019, 4:44 p.m. OK GNU C11 TESTS 106 31 0 900
62894267 friedrich_hayek A Oct. 18, 2019, 10:28 p.m. OK GNU C11 TESTS 106 31 0 900
62903183 Israt_Jahan_Nahin A Oct. 19, 2019, 4:58 a.m. OK GNU C11 TESTS 106 31 0 900
63681696 vjudge3 A Oct. 28, 2019, 8:14 p.m. OK GNU C11 TESTS 106 31 0 900
63695422 vjudge4 A Oct. 29, 2019, 5:13 a.m. OK GNU C11 TESTS 106 31 0 900
69412819 Noob1507 A Jan. 23, 2020, 12:11 p.m. OK GNU C11 TESTS 106 31 0 900
65537534 martinmxq A Nov. 22, 2019, 2:43 p.m. OK GNU C++11 TESTS 106 31 0 900
68974793 Bazigar A Jan. 17, 2020, 8:24 a.m. OK GNU C++11 TESTS 106 31 0 900
68975203 Kanzashi A Jan. 17, 2020, 8:33 a.m. OK GNU C++11 TESTS 106 31 0 900
68974547 Bazigar A Jan. 17, 2020, 8:19 a.m. OK GNU C++11 TESTS 106 31 0 900
68953678 Ahmad_Albakri A Jan. 16, 2020, 7:03 p.m. OK GNU C++11 TESTS 106 31 0 900
68065251 Esteban A Jan. 2, 2020, 7:21 a.m. OK GNU C++11 TESTS 106 31 0 900
67190601 YouSube A Dec. 19, 2019, 6:54 a.m. OK GNU C++11 TESTS 106 31 0 900
66662924 Zhanna_forgive_me A Dec. 12, 2019, 5:38 a.m. OK GNU C++11 TESTS 106 31 0 900
66276739 vjudge3 A Dec. 4, 2019, 2:58 p.m. OK GNU C++11 TESTS 106 31 0 900
65915219 Infinite-00 A Nov. 28, 2019, 2:18 p.m. OK GNU C++11 TESTS 106 31 0 900
62917784 Michicosun A Oct. 19, 2019, 9:08 a.m. OK GNU C++14 TESTS 106 30 0 900
56240525 khalil.247 A June 28, 2019, 6:13 p.m. OK GNU C++14 TESTS 106 30 0 900
55498449 Mohammad_Alwarawreh A June 12, 2019, 1:47 p.m. OK GNU C++14 TESTS 106 30 0 900
52759684 ss1729 A April 14, 2019, 7:36 p.m. OK GNU C++14 TESTS 106 30 0 900
52722609 NumberTow A April 13, 2019, 8:51 p.m. OK GNU C++14 TESTS 106 30 0 900
51455060 HS776 A March 18, 2019, 4:41 p.m. OK GNU C++14 TESTS 106 30 0 900
51405358 sitaram A March 17, 2019, 9:32 a.m. OK GNU C++14 TESTS 106 30 0 900
51162206 u_turn_ A March 11, 2019, 12:52 p.m. OK GNU C++14 TESTS 106 30 0 900
51014089 harshit2202 A March 8, 2019, 10:01 a.m. OK GNU C++14 TESTS 106 30 0 900
50914800 LLL_2820 A March 7, 2019, 5:33 a.m. OK GNU C++14 TESTS 106 30 0 900
50478670 I_Monim A Feb. 25, 2019, 7:41 a.m. OK GNU C++17 TESTS 106 15 0 900
54346585 NaimSS A May 18, 2019, 12:45 p.m. OK GNU C++17 TESTS 106 15 0 900
67147837 tejas_soni512 A Dec. 18, 2019, 9:34 a.m. OK GNU C++17 TESTS 106 15 1638400 900
53413268 betrue12 A April 27, 2019, 11:16 a.m. OK GNU C++17 TESTS 106 30 0 900
51998995 aqaqaqaqaq A March 30, 2019, 5:05 a.m. OK GNU C++17 TESTS 106 30 0 900
58136499 mahshad A Aug. 1, 2019, 4:19 p.m. OK GNU C++17 TESTS 106 30 0 900
52313001 TooStupidToWin A April 4, 2019, 3:38 p.m. OK GNU C++17 TESTS 106 30 0 900
51849659 bigstomach A March 26, 2019, 7:11 a.m. OK GNU C++17 TESTS 106 30 0 900
64642665 Mip182 A Nov. 10, 2019, 1:46 p.m. OK GNU C++17 TESTS 106 30 0 900
58567285 kennethyonghw A Aug. 11, 2019, 8:32 a.m. OK GNU C++17 TESTS 106 30 0 900
50629952 sergiimazurok A March 1, 2019, 8:32 a.m. OK Go TESTS 106 31 0 900
68467266 ktateish A Jan. 9, 2020, 9:22 p.m. OK Go TESTS 106 31 0 900
50708930 dai A March 3, 2019, 5:50 a.m. OK Go TESTS 106 31 0 900
50529194 fruwajacybyk A Feb. 26, 2019, 12:59 p.m. OK Go TESTS 106 31 0 900
50467161 Givemetips A Feb. 24, 2019, 8:34 p.m. OK Go TESTS 106 31 0 900
63678700 vjudge3 A Oct. 28, 2019, 7:10 p.m. OK Go TESTS 106 46 0 900
54895506 tony_stark1 A June 1, 2019, 2:17 a.m. OK Go TESTS 106 46 0 900
53262369 fc-lib-xyz A April 24, 2019, 8:27 p.m. OK Go TESTS 106 46 0 900
52624941 365050244 A April 12, 2019, 2:25 a.m. OK Go TESTS 106 46 0 900
51567797 Lisanaaa A March 20, 2019, 10:26 a.m. OK Go TESTS 106 46 0 900
50910478 sonowz A March 7, 2019, 1:28 a.m. OK Haskell TESTS 106 46 102400 900
67681059 rishabh1008 A Dec. 27, 2019, 6:25 a.m. OK Java 11 TESTS 106 202 0 900
53197237 continued258 A April 23, 2019, 4 p.m. OK Java 8 TESTS 106 109 0 900
67576655 MagentaCobra A Dec. 25, 2019, 3 a.m. OK Java 8 TESTS 106 109 0 900
58204781 vvenkai A Aug. 3, 2019, 6:27 a.m. OK Java 8 TESTS 106 109 0 900
54523926 optimaniax A May 23, 2019, 1:33 p.m. OK Java 8 TESTS 106 109 0 900
53843064 surfer007 A May 7, 2019, 8:52 a.m. OK Java 8 TESTS 106 109 0 900
53692292 Lovinix A May 3, 2019, 5:43 a.m. OK Java 8 TESTS 106 109 0 900
53193609 rathi062 A April 23, 2019, 2:04 p.m. OK Java 8 TESTS 106 109 0 900
52924891 Jetch A April 17, 2019, 7:54 p.m. OK Java 8 TESTS 106 109 0 900
51335122 lem.najlae A March 15, 2019, 1:50 p.m. OK Java 8 TESTS 106 109 0 900
51086974 GreatWhite A March 9, 2019, 1:25 p.m. OK Java 8 TESTS 106 109 0 900
50468146 mayarkarout A Feb. 24, 2019, 9:18 p.m. OK JavaScript TESTS 106 46 0 900
62608002 Spheniscine A Oct. 15, 2019, 8:35 a.m. OK Kotlin TESTS 106 124 0 900
51916632 I.A.K.O.V A March 27, 2019, 10:36 p.m. OK Kotlin TESTS 106 124 0 900
62594538 omar6413 A Oct. 15, 2019, 12:29 a.m. OK Kotlin TESTS 106 140 0 900
50823547 jhw866 A March 5, 2019, 2:34 p.m. OK Kotlin TESTS 106 140 0 900
68770735 abdurauf1997 A Jan. 14, 2020, 11:46 a.m. OK Kotlin TESTS 106 140 102400 900
50873865 Killer45 A March 6, 2019, 4:41 a.m. OK Kotlin TESTS 106 140 512000 900
60185364 rego97 A Sept. 6, 2019, 6:12 p.m. OK Kotlin TESTS 106 155 102400 900
50444789 spookywooky A Feb. 24, 2019, 4:08 p.m. OK Kotlin TESTS 106 171 0 900
50493197 TRR A Feb. 25, 2019, 2:07 p.m. OK Mono C# TESTS 106 46 0 900
50483196 Xtreemist A Feb. 25, 2019, 10:11 a.m. OK Mono C# TESTS 106 61 0 900
58925014 GusztavSzmolik A Aug. 16, 2019, 7 p.m. OK Mono C# TESTS 106 62 0 900
63687396 vjudge4 A Oct. 28, 2019, 11:42 p.m. OK Mono C# TESTS 106 62 0 900
52600564 nastya1199 A April 11, 2019, 11:43 a.m. OK Mono C# TESTS 106 62 0 900
50672220 nata_sim A March 2, 2019, 7:36 a.m. OK Mono C# TESTS 106 62 0 900
50463893 SkyStalker A Feb. 24, 2019, 6:57 p.m. OK Mono C# TESTS 106 62 0 900
50459646 mircea85 A Feb. 24, 2019, 5:29 p.m. OK Mono C# TESTS 106 62 0 900
50440649 nigahouse1 A Feb. 24, 2019, 3:53 p.m. OK Mono C# TESTS 106 62 0 900
50446532 ansergeyg A Feb. 24, 2019, 4:15 p.m. OK Mono C# TESTS 106 62 102400 900
63688019 vjudge5 A Oct. 29, 2019, 12:13 a.m. OK MS C++ TESTS 106 31 0 900
63697549 vjudge1 A Oct. 29, 2019, 6:05 a.m. OK MS C++ TESTS 106 31 0 900
65534785 anas_almasri A Nov. 22, 2019, 1:46 p.m. OK MS C++ TESTS 106 31 0 900
63688207 vjudge3 A Oct. 29, 2019, 12:21 a.m. OK MS C++ TESTS 106 31 0 900
65534888 anas_almasri A Nov. 22, 2019, 1:48 p.m. OK MS C++ TESTS 106 31 0 900
63689022 vjudge5 A Oct. 29, 2019, 1 a.m. OK MS C++ TESTS 106 31 0 900
63689267 vjudge4 A Oct. 29, 2019, 1:12 a.m. OK MS C++ TESTS 106 31 0 900
63689293 vjudge1 A Oct. 29, 2019, 1:14 a.m. OK MS C++ TESTS 106 31 0 900
63689497 vjudge3 A Oct. 29, 2019, 1:25 a.m. OK MS C++ TESTS 106 31 0 900
63695778 vjudge1 A Oct. 29, 2019, 5:22 a.m. OK MS C++ TESTS 106 31 0 900
67673424 Tangerine A Dec. 26, 2019, 10:22 p.m. OK MS C++ 2017 TESTS 106 31 0 900
57364219 Still_Theory A July 20, 2019, 8:42 a.m. OK MS C++ 2017 TESTS 106 31 0 900
57870680 vjudge2 A July 28, 2019, 1:29 a.m. OK MS C++ 2017 TESTS 106 31 0 900
58227056 majid.sepasi A Aug. 3, 2019, 2:55 p.m. OK MS C++ 2017 TESTS 106 31 0 900
58814941 hosein_bidaki A Aug. 14, 2019, 12:11 p.m. OK MS C++ 2017 TESTS 106 31 0 900
59548772 catplatypus A Aug. 27, 2019, 12:58 a.m. OK MS C++ 2017 TESTS 106 31 0 900
62049195 coder_pikachu A Oct. 7, 2019, 8:55 a.m. OK MS C++ 2017 TESTS 106 31 0 900
63677681 vjudge2 A Oct. 28, 2019, 6:51 p.m. OK MS C++ 2017 TESTS 106 31 0 900
63691268 vjudge4 A Oct. 29, 2019, 2:47 a.m. OK MS C++ 2017 TESTS 106 31 0 900
69857036 vjudge2 A Jan. 30, 2020, 5:17 p.m. OK MS C++ 2017 TESTS 106 31 0 900
50822885 sngv A March 5, 2019, 2:16 p.m. OK Node.js TESTS 106 171 614400 900
50509411 moballack A Feb. 25, 2019, 10:18 p.m. OK Node.js TESTS 106 171 2048000 900
50656497 Sirivasv A March 1, 2019, 7:49 p.m. OK Node.js TESTS 106 186 2252800 900
50664490 Sirivasv A March 2, 2019, 2:55 a.m. OK Node.js TESTS 106 218 2252800 900
50464094 sbairammariabs A Feb. 24, 2019, 7 p.m. OK PascalABC.NET TESTS 106 187 0 900
50616315 bochkov A Feb. 28, 2019, 7:50 p.m. OK PascalABC.NET TESTS 106 187 0 900
50536948 Stanislav666 A Feb. 26, 2019, 4:11 p.m. OK PascalABC.NET TESTS 106 187 0 900
50523333 sbairammariabs A Feb. 26, 2019, 10:34 a.m. OK PascalABC.NET TESTS 106 187 0 900
50465484 sbairammariabs A Feb. 24, 2019, 7:35 p.m. OK PascalABC.NET TESTS 106 187 0 900
50464968 sbairammariabs A Feb. 24, 2019, 7:22 p.m. OK PascalABC.NET TESTS 106 202 0 900
56269377 Gimber A June 29, 2019, 11:28 a.m. OK PascalABC.NET TESTS 106 202 0 900
50891938 fanos A March 6, 2019, 1:30 p.m. OK PascalABC.NET TESTS 106 202 0 900
57239313 28Nik A July 17, 2019, 4:41 p.m. OK PascalABC.NET TESTS 106 217 0 900
50441971 great_fortune A Feb. 24, 2019, 3:58 p.m. OK PascalABC.NET TESTS 106 217 0 900
50479546 mayakin A Feb. 25, 2019, 8:10 a.m. OK PHP TESTS 106 46 512000 900
52827128 sainitejeshwar A April 16, 2019, 2:12 p.m. OK PyPy 2 TESTS 106 124 0 900
50492608 YESMAths A Feb. 25, 2019, 1:54 p.m. OK PyPy 2 TESTS 106 124 0 900
50476090 Mukundan314 A Feb. 25, 2019, 6:04 a.m. OK PyPy 2 TESTS 106 140 0 900
50921436 apoorv1999 A March 7, 2019, 9:27 a.m. OK PyPy 2 TESTS 106 155 0 900
54351313 pasthec A May 18, 2019, 3 p.m. OK PyPy 3 TESTS 106 124 0 900
50736323 Ilya_ A March 3, 2019, 1:04 p.m. OK PyPy 3 TESTS 106 124 0 900
50494795 hrustim25 A Feb. 25, 2019, 2:43 p.m. OK PyPy 3 TESTS 106 124 0 900
51315471 vjudge2 A March 14, 2019, 11:33 p.m. OK PyPy 3 TESTS 106 124 0 900
50703906 Ik_noom A March 3, 2019, 1:49 a.m. OK PyPy 3 TESTS 106 139 0 900
50716140 oliverwayne A March 3, 2019, 7:45 a.m. OK PyPy 3 TESTS 106 139 0 900
58925690 thekushalghosh A Aug. 16, 2019, 7:22 p.m. OK PyPy 3 TESTS 106 140 0 900
63676340 Dimitryliss A Oct. 28, 2019, 6:29 p.m. OK PyPy 3 TESTS 106 140 0 900
56395927 FlyingBag65 A July 1, 2019, 2:35 p.m. OK PyPy 3 TESTS 106 140 0 900
56037036 koptev A June 25, 2019, 12:34 p.m. OK PyPy 3 TESTS 106 140 0 900
50496940 ilkerkosaroglu A Feb. 25, 2019, 3:34 p.m. OK Python 2 TESTS 106 171 0 900
52901414 Saurabh66 A April 17, 2019, 11:13 a.m. OK Python 2 TESTS 106 171 0 900
51768405 jrobsonjr A March 23, 2019, 5:04 p.m. OK Python 2 TESTS 106 171 0 900
50539335 kaif_7 A Feb. 26, 2019, 5:16 p.m. OK Python 2 TESTS 106 171 0 900
50528400 SoSooding A Feb. 26, 2019, 12:42 p.m. OK Python 2 TESTS 106 171 0 900
50517564 Luxo A Feb. 26, 2019, 7:29 a.m. OK Python 2 TESTS 106 171 0 900
50510595 nealzane A Feb. 25, 2019, 11:49 p.m. OK Python 2 TESTS 106 171 0 900
50500619 chaorrupted A Feb. 25, 2019, 5:05 p.m. OK Python 2 TESTS 106 171 0 900
50499830 deren A Feb. 25, 2019, 4:45 p.m. OK Python 2 TESTS 106 171 0 900
50496764 anunay A Feb. 25, 2019, 3:29 p.m. OK Python 2 TESTS 106 171 0 900
69422731 rkaiser A Jan. 23, 2020, 2:52 p.m. OK Python 3 TESTS 106 109 0 900
63675199 vjudge5 A Oct. 28, 2019, 6:10 p.m. OK Python 3 TESTS 106 109 0 900
61730363 Abhishek_Tyagi A Oct. 2, 2019, 4:36 p.m. OK Python 3 TESTS 106 109 0 900
60405866 ucantfindme A Sept. 11, 2019, 6:37 p.m. OK Python 3 TESTS 106 109 0 900
60295202 mohi07 A Sept. 9, 2019, 9:38 a.m. OK Python 3 TESTS 106 109 0 900
60294332 SpamBot A Sept. 9, 2019, 9:13 a.m. OK Python 3 TESTS 106 109 0 900
58169743 _IchBin_ A Aug. 2, 2019, 10:45 a.m. OK Python 3 TESTS 106 109 0 900
58093312 Abhay1dhillon A July 31, 2019, 6:29 p.m. OK Python 3 TESTS 106 109 0 900
57137556 Vasiliy_48 A July 16, 2019, 9:30 a.m. OK Python 3 TESTS 106 109 0 900
55502856 tchr A June 12, 2019, 4:01 p.m. OK Python 3 TESTS 106 109 0 900
51059527 kisasexypantera94 A March 9, 2019, 1:59 a.m. OK Rust TESTS 106 31 0 900
50707445 Acc_plus A March 3, 2019, 5:05 a.m. OK Scala TESTS 106 405 0 900
50708306 Acc_plus A March 3, 2019, 5:32 a.m. OK Scala TESTS 106 405 0 900
51414750 yakamoto A March 17, 2019, 1:32 p.m. OK Scala TESTS 106 436 0 900
52688841 jedikni A April 13, 2019, 2:20 p.m. OK Scala TESTS 106 467 0 900
50443598 wrick A Feb. 24, 2019, 4:03 p.m. OK Scala TESTS 106 467 0 900
50775944 conjecture_xyz A March 4, 2019, 8:30 a.m. OK Scala TESTS 106 467 0 900

remove filters

Back to search problems