Codeforces Global Round 11

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
1427 Codeforces Global Round 11 FINISHED False 10800 134838563 Oct. 10, 2020, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17383 ) A Avoiding Zero PROGRAMMING math sortings 900

B'You are given an array of n integers a_1,a_2, ... ,a_n . You have to create an array of n integers b_1,b_2, ... ,b_n such that: For example, if a=[1,-1,0,1] , then b=[-1,1,1,0] and b=[0,1,-1,1] are rearrangements of a , but b=[1,-1,-1,0] and b=[1,0,2,-3] are not rearrangements of a . If an array b_1,b_2, ... , b_n with the required properties does not exist, you have to print NO. Each test contains multiple test cases. The first line contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. The description of the test cases follows. The first line of each testcase contains one integer n ( 1 <= n <= 50 ) -- the length of the array a . The second line of each testcase contains n integers a_1,a_2, ... , a_n ( -50 <= a_i <= 50 ) -- the elements of a . For each testcase, if there is not an array b_1,b_2, ... ,b_n with the required properties, print a single line with the word NO. Otherwise print a line with the word YES, followed by a line with the n integers b_1,b_2, ... ,b_n . If there is more than one array b_1,b_2, ... ,b_n satisfying the required properties, you can print any of them. Explanation of the first testcase: An array with the desired properties is b=[1,-2,3,-4] . For this array, it holds: Explanation of the second testcase: Since all values in a are 0 , any rearrangement b of a will have all elements equal to 0 and therefore it clearly cannot satisfy the second property described in the statement (for example because b_1=0 ). Hence in this case the answer is NO. Explanation of the third testcase: An array with the desired properties is b=[1, 1, -1, 1, -1] . For this array, it holds: Explanation of the fourth testcase: An array with the desired properties is b=[-40,13,40,0,-9,-31] . For this array, it holds: '...

Tutorials

Editorial of Global Round 11

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
95163071 glenncaezar A Oct. 10, 2020, 11:28 p.m. OK Clang++17 Diagnostics TESTS 21 342 3174400 900
95175360 mayeed A Oct. 11, 2020, 5:44 a.m. OK GNU C11 TESTS 21 187 0 900
95168865 J_H A Oct. 11, 2020, 3:23 a.m. OK GNU C11 TESTS 21 187 0 900
95133300 AayushShah A Oct. 10, 2020, 4:38 p.m. OK GNU C11 TESTS 21 202 0 900
95134381 Tom66 A Oct. 10, 2020, 4:43 p.m. OK GNU C++11 TESTS 21 31 0 900
95167906 kmyiu A Oct. 11, 2020, 2:57 a.m. OK GNU C++11 TESTS 21 31 0 900
95165697 wwl995 A Oct. 11, 2020, 1:36 a.m. OK GNU C++11 TESTS 21 31 0 900
95159853 yao11617 A Oct. 10, 2020, 9:37 p.m. OK GNU C++11 TESTS 21 31 0 900
95144000 sinnerway A Oct. 10, 2020, 5:35 p.m. OK GNU C++11 TESTS 21 31 0 900
95168549 mehzw A Oct. 11, 2020, 3:13 a.m. OK GNU C++11 TESTS 21 31 0 900
95165666 HHHEN A Oct. 11, 2020, 1:35 a.m. OK GNU C++11 TESTS 21 31 3993600 900
95165551 hnie_king_wxl A Oct. 11, 2020, 1:30 a.m. OK GNU C++11 TESTS 21 31 3993600 900
95165121 Zechariah_2001 A Oct. 11, 2020, 1:11 a.m. OK GNU C++11 TESTS 21 31 19251200 900
95174486 TheLoneWolf12 A Oct. 11, 2020, 5:29 a.m. OK GNU C++11 TESTS 21 46 0 900
95170901 dmdivyansh_123 A Oct. 11, 2020, 4:21 a.m. OK GNU C++14 TESTS 21 31 0 900
95170886 kinb_121 A Oct. 11, 2020, 4:20 a.m. OK GNU C++14 TESTS 21 31 0 900
95164669 skilledNoob A Oct. 11, 2020, 12:47 a.m. OK GNU C++14 TESTS 21 31 0 900
95164214 nguot A Oct. 11, 2020, 12:23 a.m. OK GNU C++14 TESTS 21 31 0 900
95172362 AtiaBabaBa A Oct. 11, 2020, 4:52 a.m. OK GNU C++14 TESTS 21 31 0 900
95152454 sollytarek A Oct. 10, 2020, 7:04 p.m. OK GNU C++14 TESTS 21 31 0 900
95152109 Bhj2001 A Oct. 10, 2020, 6:59 p.m. OK GNU C++14 TESTS 21 31 0 900
95151894 devanshi111 A Oct. 10, 2020, 6:56 p.m. OK GNU C++14 TESTS 21 31 0 900
95176053 azazel_joker A Oct. 11, 2020, 5:55 a.m. OK GNU C++14 TESTS 21 31 0 900
95155347 JOYTUN_17 A Oct. 10, 2020, 7:53 p.m. OK GNU C++14 TESTS 21 31 0 900
95159529 AnuragPatra A Oct. 10, 2020, 9:27 p.m. OK GNU C++17 TESTS 21 31 0 900
95175779 ImSoHappySC A Oct. 11, 2020, 5:50 a.m. OK GNU C++17 TESTS 21 31 0 900
95175093 kushagra3010 A Oct. 11, 2020, 5:40 a.m. OK GNU C++17 TESTS 21 31 0 900
95173100 minhquaningenious A Oct. 11, 2020, 5:06 a.m. OK GNU C++17 TESTS 21 31 0 900
95169527 KamruL_Hasan_ A Oct. 11, 2020, 3:43 a.m. OK GNU C++17 TESTS 21 31 0 900
95169182 sksinghal17 A Oct. 11, 2020, 3:33 a.m. OK GNU C++17 TESTS 21 31 0 900
95169131 Maharaja123 A Oct. 11, 2020, 3:31 a.m. OK GNU C++17 TESTS 21 31 0 900
95166353 yession A Oct. 11, 2020, 2:03 a.m. OK GNU C++17 TESTS 21 31 0 900
95163095 swapnil074 A Oct. 10, 2020, 11:29 p.m. OK GNU C++17 TESTS 21 31 0 900
95165159 ppx1024 A Oct. 11, 2020, 1:13 a.m. OK GNU C++17 TESTS 21 31 0 900
95169398 __spam A Oct. 11, 2020, 3:39 a.m. OK GNU C++17 (64) TESTS 21 31 0 900
95166793 marcos_999 A Oct. 11, 2020, 2:18 a.m. OK GNU C++17 (64) TESTS 21 31 0 900
95165751 LethalPuppy A Oct. 11, 2020, 1:38 a.m. OK GNU C++17 (64) TESTS 21 31 0 900
95161922 Clu3l3ss A Oct. 10, 2020, 10:41 p.m. OK GNU C++17 (64) TESTS 21 31 0 900
95159663 ExplodingFreeze A Oct. 10, 2020, 9:31 p.m. OK GNU C++17 (64) TESTS 21 31 0 900
95159237 conquizztador A Oct. 10, 2020, 9:19 p.m. OK GNU C++17 (64) TESTS 21 31 0 900
95158903 madlogic A Oct. 10, 2020, 9:10 p.m. OK GNU C++17 (64) TESTS 21 31 0 900
95172638 triple__a A Oct. 11, 2020, 4:58 a.m. OK GNU C++17 (64) TESTS 21 31 0 900
95174138 alif_cse_ju A Oct. 11, 2020, 5:24 a.m. OK GNU C++17 (64) TESTS 21 31 0 900
95175916 shyam123 A Oct. 11, 2020, 5:52 a.m. OK GNU C++17 (64) TESTS 21 31 0 900
95170579 sf14t A Oct. 11, 2020, 4:12 a.m. OK Java 11 TESTS 21 202 0 900
95168315 srjvastri8 A Oct. 11, 2020, 3:09 a.m. OK Java 11 TESTS 21 202 0 900
95133909 KnightK0der A Oct. 10, 2020, 4:41 p.m. OK Java 11 TESTS 21 217 0 900
95151517 vipin__sharma A Oct. 10, 2020, 6:50 p.m. OK Java 11 TESTS 21 218 0 900
95172783 anshum_it_is A Oct. 11, 2020, 5 a.m. OK Java 11 TESTS 21 233 0 900
95160808 Oussama_1 A Oct. 10, 2020, 10:05 p.m. OK Java 11 TESTS 21 233 0 900
95158389 KadenXu A Oct. 10, 2020, 8:58 p.m. OK Java 11 TESTS 21 233 0 900
95151065 rohanxyzgg A Oct. 10, 2020, 6:44 p.m. OK Java 11 TESTS 21 233 0 900
95148690 sushant-kun A Oct. 10, 2020, 6:20 p.m. OK Java 11 TESTS 21 233 0 900
95176567 gladwin_rojer A Oct. 11, 2020, 6:02 a.m. OK Java 11 TESTS 21 249 0 900
95154157 ujjwalavishek A Oct. 10, 2020, 7:31 p.m. OK Java 8 TESTS 21 109 0 900
95172583 bohot_hard_123 A Oct. 11, 2020, 4:56 a.m. OK Java 8 TESTS 21 124 0 900
95155613 O-infinity A Oct. 10, 2020, 7:58 p.m. OK Java 8 TESTS 21 139 0 900
95150438 kareem3id A Oct. 10, 2020, 6:37 p.m. OK Java 8 TESTS 21 139 0 900
95166695 PersonOfInterest A Oct. 11, 2020, 2:15 a.m. OK Java 8 TESTS 21 140 0 900
95155494 OmarFouad A Oct. 10, 2020, 7:56 p.m. OK Java 8 TESTS 21 140 0 900
95148939 T_Nady A Oct. 10, 2020, 6:22 p.m. OK Java 8 TESTS 21 140 0 900
95148796 Pranay2516 A Oct. 10, 2020, 6:21 p.m. OK Java 8 TESTS 21 140 0 900
95138113 ay_08 A Oct. 10, 2020, 5:02 p.m. OK Java 8 TESTS 21 140 0 900
95151285 VEGITO01 A Oct. 10, 2020, 6:47 p.m. OK Java 8 TESTS 21 202 0 900
95152217 Tlatoani A Oct. 10, 2020, 7 p.m. OK Kotlin TESTS 21 202 1740800 900
95139677 cadenbrinkman A Oct. 10, 2020, 5:11 p.m. OK MS C++ TESTS 21 77 0 900
95156386 kitkat462 A Oct. 10, 2020, 8:13 p.m. OK MS C++ TESTS 21 78 512000 900
95161606 UriAv A Oct. 10, 2020, 10:29 p.m. OK MS C++ 2017 TESTS 21 62 3993600 900
95161603 allFiredUp A Oct. 10, 2020, 10:29 p.m. OK MS C++ 2017 TESTS 21 62 3993600 900
95164118 dingo114514 A Oct. 11, 2020, 12:19 a.m. OK MS C++ 2017 TESTS 21 77 0 900
95133274 oneskovic A Oct. 10, 2020, 4:38 p.m. OK MS C++ 2017 TESTS 21 77 0 900
95150040 FirstStep0 A Oct. 10, 2020, 6:33 p.m. OK MS C++ 2017 TESTS 21 78 204800 900
95156622 Pathlessbark8 A Oct. 10, 2020, 8:18 p.m. OK MS C++ 2017 TESTS 21 93 0 900
95135349 javantlang A Oct. 10, 2020, 4:48 p.m. OK MS C++ 2017 TESTS 21 93 0 900
95158047 kit.shiron A Oct. 10, 2020, 8:50 p.m. OK PyPy 2 TESTS 21 155 2662400 900
95158906 Bovniova A Oct. 10, 2020, 9:10 p.m. OK PyPy 3 TESTS 21 202 3891200 900
95144046 FahimSifnatul A Oct. 10, 2020, 5:35 p.m. OK PyPy 3 TESTS 21 202 3993600 900
95175273 servermonk A Oct. 11, 2020, 5:42 a.m. OK PyPy 3 TESTS 21 202 5529600 900
95170197 moriarty1992 A Oct. 11, 2020, 4:03 a.m. OK PyPy 3 TESTS 21 202 6144000 900
95154819 shantol A Oct. 10, 2020, 7:43 p.m. OK PyPy 3 TESTS 21 218 6553600 900
95149109 Rudresh A Oct. 10, 2020, 6:23 p.m. OK PyPy 3 TESTS 21 233 4300800 900
95152499 EpicChadGamer A Oct. 10, 2020, 7:05 p.m. OK PyPy 3 TESTS 21 233 8806400 900
95169679 jamerrq A Oct. 11, 2020, 3:47 a.m. OK PyPy 3 TESTS 21 234 4403200 900
95153572 thekushalghosh A Oct. 10, 2020, 7:21 p.m. OK PyPy 3 TESTS 21 248 7168000 900
95161871 isym444 A Oct. 10, 2020, 10:39 p.m. OK PyPy 3 TESTS 21 264 5529600 900
95153546 IvanAndreev6B A Oct. 10, 2020, 7:21 p.m. OK Python 3 TESTS 21 139 307200 900
95167528 fengxu20156542 A Oct. 11, 2020, 2:44 a.m. OK Python 3 TESTS 21 140 307200 900
95157248 jcortizrh A Oct. 10, 2020, 8:32 p.m. OK Python 3 TESTS 21 155 307200 900
95143906 kegra A Oct. 10, 2020, 5:34 p.m. OK Python 3 TESTS 21 155 307200 900
95139893 imsk A Oct. 10, 2020, 5:12 p.m. OK Python 3 TESTS 21 155 307200 900
95165337 anish5256 A Oct. 11, 2020, 1:21 a.m. OK Python 3 TESTS 21 156 0 900
95164026 rickya A Oct. 11, 2020, 12:15 a.m. OK Python 3 TESTS 21 156 614400 900
95167641 SinBSinB A Oct. 11, 2020, 2:48 a.m. OK Python 3 TESTS 21 171 0 900
95158184 strivetodeath A Oct. 10, 2020, 8:53 p.m. OK Python 3 TESTS 21 171 0 900
95153465 Amz42 A Oct. 10, 2020, 7:19 p.m. OK Python 3 TESTS 21 171 0 900
95169739 Strorkis A Oct. 11, 2020, 3:49 a.m. OK Rust TESTS 21 46 307200 900

remove filters

Back to search problems