Codeforces Global Round 10

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
1392 Codeforces Global Round 10 FINISHED False 10800 134234699 Aug. 16, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20790 ) A Omkar and Password PROGRAMMING greedy

B"Lord Omkar has permitted you to enter the Holy Church of Omkar! To test your worthiness, Omkar gives you a password which you must interpret! A password is an array a of n positive integers. You apply the following operation to the array: pick any two adjacent numbers that are not equal to each other and replace them with their sum. Formally, choose an index i such that 1 <= q i < n and a_{i} neq a_{i+1} , delete both a_i and a_{i+1} from the array and put a_{i}+a_{i+1} in their place. For example, for array [7, 4, 3, 7] you can choose i = 2 and the array will become [7, 4+3, 7] = [7, 7, 7] . Note that in this array you can't apply this operation anymore. Notice that one operation will decrease the size of the password by 1 . What is the shortest possible length of the password after some number (possibly 0 ) of operations? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The first line of each test case contains an integer n ( 1 <= q n <= q 2 cdot 10^5 ) -- the length of the password. The second line of each test case contains n integers a_{1},a_{2}, ... ,a_{n} ( 1 <= q a_{i} <= q 10^9 ) -- the initial contents of your password. The sum of n over all test cases will not exceed 2 cdot 10^5 . For each password, print one integer: the shortest possible length of the password after some number of operations. In the first test case, you can do the following to achieve a length of 1 : Pick i=2 to get [2, 4, 1] Pick i=1 to get [6, 1] Pick i=1 to get [7] In the second test case, you can't perform any operations because there is no valid i that satisfies the requirements mentioned above. "...

Tutorials

Codeforces Global Round 10 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
90293023 asgardcodegod A Aug. 18, 2020, 9:10 a.m. OK Clang++17 Diagnostics TESTS 75 1045 1331200
90307332 a.kaushiksai A Aug. 18, 2020, 12:30 p.m. OK GNU C11 TESTS 75 61 0
91115202 dongri A Aug. 27, 2020, 8:12 a.m. OK GNU C11 TESTS 75 61 819200
90293997 rishit19091 A Aug. 18, 2020, 9:23 a.m. OK GNU C11 TESTS 75 61 819200
90312045 Greninja_TMC A Aug. 18, 2020, 1:33 p.m. OK GNU C11 TESTS 75 61 819200
91099298 nitinkumar1729 A Aug. 27, 2020, 3:06 a.m. OK GNU C11 TESTS 75 61 819200
91153245 softslayer A Aug. 27, 2020, 4:46 p.m. OK GNU C11 TESTS 75 61 1638400
90379585 Bakhtiar_Nafis A Aug. 19, 2020, 10:32 a.m. OK GNU C11 TESTS 75 62 0
90424955 XTWLP A Aug. 20, 2020, 12:28 a.m. OK GNU C11 TESTS 75 62 0
90495079 Supahsolrac A Aug. 20, 2020, 8:36 p.m. OK GNU C11 TESTS 75 62 819200
91021187 Somiya_75 A Aug. 26, 2020, 5:55 a.m. OK GNU C11 TESTS 75 62 819200
90444553 JasonLan A Aug. 20, 2020, 8:06 a.m. OK GNU C++11 TESTS 75 31 0
90424854 hyjhyj A Aug. 20, 2020, 12:23 a.m. OK GNU C++11 TESTS 75 31 819200
90453996 kimyon A Aug. 20, 2020, 10:29 a.m. OK GNU C++11 TESTS 75 31 819200
90358508 wanherun A Aug. 19, 2020, 5:10 a.m. OK GNU C++11 TESTS 75 31 921600
90652935 froggyzhang A Aug. 22, 2020, 4:38 a.m. OK GNU C++11 TESTS 75 31 3891200
90399240 luogu_bot4 A Aug. 19, 2020, 2:55 p.m. OK GNU C++11 TESTS 75 31 3993600
90503164 Heartbeat666 A Aug. 21, 2020, 2:55 a.m. OK GNU C++11 TESTS 75 31 4096000
90862926 WaluntOvO A Aug. 25, 2020, 2:33 a.m. OK GNU C++11 TESTS 75 31 4198400
90832280 onglu1 A Aug. 24, 2020, 2:03 p.m. OK GNU C++11 TESTS 75 31 4710400
90726383 mystic15 A Aug. 23, 2020, 4:16 a.m. OK GNU C++11 TESTS 75 31 4915200
90906134 boxnos A Aug. 25, 2020, 2:09 p.m. OK GNU C++14 TESTS 75 31 0
90325801 neckhill007 A Aug. 18, 2020, 4:03 p.m. OK GNU C++14 TESTS 75 46 819200
90694657 q234rty A Aug. 22, 2020, 2:21 p.m. OK GNU C++14 TESTS 75 46 14028800
90320876 neckhill007 A Aug. 18, 2020, 3:11 p.m. OK GNU C++14 TESTS 75 62 819200
90539457 Bob_Alice A Aug. 21, 2020, 2:18 p.m. OK GNU C++14 TESTS 75 62 4812800
91252779 krcdhm A Aug. 29, 2020, 3:17 a.m. OK GNU C++14 TESTS 75 77 0
90413881 4yush933 A Aug. 19, 2020, 6:25 p.m. OK GNU C++14 TESTS 75 77 0
90407596 visitor_himanshu A Aug. 19, 2020, 4:45 p.m. OK GNU C++14 TESTS 75 77 0
90320772 tsaraf A Aug. 18, 2020, 3:10 p.m. OK GNU C++14 TESTS 75 77 0
91693366 ik_e A Sept. 3, 2020, 6:41 a.m. OK GNU C++14 TESTS 75 77 0
90419023 sirearsh A Aug. 19, 2020, 8:18 p.m. OK GNU C++17 TESTS 75 46 204800
91205217 eyesofgod123 A Aug. 28, 2020, noon OK GNU C++17 TESTS 75 46 921600
90384283 bandiaoz A Aug. 19, 2020, 11:38 a.m. OK GNU C++17 TESTS 75 46 921600
90464879 Black__Panther A Aug. 20, 2020, 1:11 p.m. OK GNU C++17 TESTS 75 62 0
91056885 vjudge3 A Aug. 26, 2020, 1:34 p.m. OK GNU C++17 TESTS 75 62 819200
90359997 chen_zexing A Aug. 19, 2020, 5:39 a.m. OK GNU C++17 TESTS 75 62 819200
90395467 sirjoshua A Aug. 19, 2020, 2:10 p.m. OK GNU C++17 TESTS 75 62 819200
90874799 vgarg_220 A Aug. 25, 2020, 6:45 a.m. OK GNU C++17 TESTS 75 62 1024000
90315368 tasja A Aug. 18, 2020, 2:14 p.m. OK GNU C++17 TESTS 75 62 1536000
90734757 Hazyknight A Aug. 23, 2020, 7:22 a.m. OK GNU C++17 TESTS 75 62 4505600
91215398 shajal A Aug. 28, 2020, 2:08 p.m. OK GNU C++17 (64) TESTS 75 46 0
91505749 sharrad99 A Aug. 31, 2020, 3:42 p.m. OK GNU C++17 (64) TESTS 75 46 819200
90521767 vk48962713 A Aug. 21, 2020, 10:06 a.m. OK GNU C++17 (64) TESTS 75 46 5939200
90426484 ALIONG_THE_PANDA A Aug. 20, 2020, 1:39 a.m. OK GNU C++17 (64) TESTS 75 61 716800
91182214 zxcv_1 A Aug. 28, 2020, 5:47 a.m. OK GNU C++17 (64) TESTS 75 61 819200
90493745 mid_night A Aug. 20, 2020, 8:01 p.m. OK GNU C++17 (64) TESTS 75 61 1024000
90423069 MZuenni A Aug. 19, 2020, 10:47 p.m. OK GNU C++17 (64) TESTS 75 61 1638400
90338177 FCUKmodiBhakts A Aug. 18, 2020, 6:47 p.m. OK GNU C++17 (64) TESTS 75 61 1638400
90332524 catismyfav A Aug. 18, 2020, 5:25 p.m. OK GNU C++17 (64) TESTS 75 61 1638400
90814237 rajneeshsharma A Aug. 24, 2020, 9:56 a.m. OK GNU C++17 (64) TESTS 75 61 5120000
90531968 karb A Aug. 21, 2020, 12:40 p.m. OK Go TESTS 75 62 13004800
90480549 Trishan A Aug. 20, 2020, 4:20 p.m. OK Go TESTS 75 78 4505600
90628093 bnurgeldiyev514 A Aug. 21, 2020, 6:19 p.m. OK Go TESTS 75 186 15462400
90531404 karb A Aug. 21, 2020, 12:32 p.m. OK Go TESTS 75 233 10854400
91522241 aquarius_gaurav A Aug. 31, 2020, 8:10 p.m. OK Java 11 TESTS 75 187 0
90323005 Waylesange A Aug. 18, 2020, 3:34 p.m. OK Java 11 TESTS 75 187 0
90322761 Waylesange A Aug. 18, 2020, 3:31 p.m. OK Java 11 TESTS 75 187 0
90321778 Waylesange A Aug. 18, 2020, 3:21 p.m. OK Java 11 TESTS 75 187 0
90531851 bckslsh03 A Aug. 21, 2020, 12:38 p.m. OK Java 11 TESTS 75 187 23756800
90322496 Waylesange A Aug. 18, 2020, 3:28 p.m. OK Java 11 TESTS 75 202 0
90323182 Waylesange A Aug. 18, 2020, 3:36 p.m. OK Java 11 TESTS 75 202 1024000
91349657 Lewin A Aug. 30, 2020, 2:21 p.m. OK Java 11 TESTS 75 202 24064000
90323254 Waylesange A Aug. 18, 2020, 3:36 p.m. OK Java 11 TESTS 75 217 3072000
90660997 nikhilmishra1211 A Aug. 22, 2020, 6:34 a.m. OK Java 11 TESTS 75 217 28057600
90421420 bluesky111 A Aug. 19, 2020, 9:37 p.m. OK Java 8 TESTS 75 124 0
90508176 nandit A Aug. 21, 2020, 6:36 a.m. OK Java 8 TESTS 75 140 20275200
90511391 loyalty A Aug. 21, 2020, 7:41 a.m. OK Java 8 TESTS 75 140 33894400
91292405 aearly A Aug. 29, 2020, 2:39 p.m. OK Java 8 TESTS 75 155 11161600
90365884 wadissimo A Aug. 19, 2020, 7:09 a.m. OK Java 8 TESTS 75 155 11161600
90325086 tony_stark0808 A Aug. 18, 2020, 3:55 p.m. OK Java 8 TESTS 75 155 11161600
91002152 BrayBray123 A Aug. 25, 2020, 8:33 p.m. OK Java 8 TESTS 75 155 11571200
90777380 MetaStash A Aug. 23, 2020, 5:54 p.m. OK Java 8 TESTS 75 155 33894400
90750653 nicoing A Aug. 23, 2020, 11:29 a.m. OK Java 8 TESTS 75 155 33894400
90814749 himmi_221 A Aug. 24, 2020, 10:03 a.m. OK Java 8 TESTS 75 156 33894400
90754308 Rivankata A Aug. 23, 2020, 12:23 p.m. OK Kotlin TESTS 75 264 40140800
91181778 felix412441 A Aug. 28, 2020, 5:39 a.m. OK Kotlin TESTS 75 327 16691200
91024532 Ghasem A Aug. 26, 2020, 6:39 a.m. OK Kotlin TESTS 75 327 16691200
91475582 koper A Aug. 31, 2020, 9:05 a.m. OK Kotlin TESTS 75 327 38400000
90362529 QqqqQ1 A Aug. 19, 2020, 6:21 a.m. OK Kotlin TESTS 75 358 18944000
90368163 ready A Aug. 19, 2020, 7:42 a.m. OK Mono C# TESTS 75 93 9420800
90368410 ready A Aug. 19, 2020, 7:46 a.m. OK Mono C# TESTS 75 108 9420800
90325116 Karamba16 A Aug. 18, 2020, 3:56 p.m. OK Mono C# TESTS 75 140 25600000
90315818 TheSoundOfZero A Aug. 18, 2020, 2:19 p.m. OK MS C++ TESTS 75 61 819200
90367102 HDDC A Aug. 19, 2020, 7:27 a.m. OK MS C++ TESTS 75 186 7782400
90462779 amitrastogi2206 A Aug. 20, 2020, 12:43 p.m. OK MS C++ TESTS 75 187 819200
90388014 sawaizasifch A Aug. 19, 2020, 12:32 p.m. OK MS C++ TESTS 75 202 819200
90815783 Steve1234 A Aug. 24, 2020, 10:19 a.m. OK MS C++ 2017 TESTS 75 78 5529600
91640722 shebao A Sept. 2, 2020, 12:36 p.m. OK MS C++ 2017 TESTS 75 93 307200
90384612 psb2942 A Aug. 19, 2020, 11:43 a.m. OK MS C++ 2017 TESTS 75 93 2764800
90529836 vjudge1 A Aug. 21, 2020, 12:10 p.m. OK MS C++ 2017 TESTS 75 93 4812800
90697160 getN1ght A Aug. 22, 2020, 2:55 p.m. OK MS C++ 2017 TESTS 75 186 4505600
91056482 areo A Aug. 26, 2020, 1:29 p.m. OK MS C++ 2017 TESTS 75 187 0
90461096 ayarayarovich A Aug. 20, 2020, 12:17 p.m. OK MS C++ 2017 TESTS 75 187 0
90460677 ayarayarovich A Aug. 20, 2020, 12:11 p.m. OK MS C++ 2017 TESTS 75 202 819200
90300165 modito A Aug. 18, 2020, 10:52 a.m. OK MS C++ 2017 TESTS 75 202 1126400
90770703 hatemzaghloul A Aug. 23, 2020, 4:02 p.m. OK MS C++ 2017 TESTS 75 202 4608000
90712157 yumtam A Aug. 22, 2020, 6:52 p.m. OK PyPy 2 TESTS 75 187 37376000
90360948 2019ucp1350 A Aug. 19, 2020, 5:55 a.m. OK PyPy 3 TESTS 75 217 19046400
90435806 mridullgarg A Aug. 20, 2020, 5:50 a.m. OK PyPy 3 TESTS 75 311 16588800
90318819 chick_magnet A Aug. 18, 2020, 2:51 p.m. OK PyPy 3 TESTS 75 311 17715200
90361131 chill_house A Aug. 19, 2020, 5:58 a.m. OK PyPy 3 TESTS 75 311 18636800
90402813 yash_0402 A Aug. 19, 2020, 3:37 p.m. OK PyPy 3 TESTS 75 311 18944000
90296690 munir1 A Aug. 18, 2020, 10:03 a.m. OK PyPy 3 TESTS 75 311 18944000
91161469 antooo A Aug. 27, 2020, 6:42 p.m. OK PyPy 3 TESTS 75 311 19046400
91072999 coolsanderslin A Aug. 26, 2020, 4:09 p.m. OK PyPy 3 TESTS 75 311 19046400
91021113 UnGemm A Aug. 26, 2020, 5:54 a.m. OK PyPy 3 TESTS 75 311 19046400
90297090 thisis_aravind A Aug. 18, 2020, 10:09 a.m. OK PyPy 3 TESTS 75 311 19046400
90439011 groupbuilder A Aug. 20, 2020, 6:43 a.m. OK Python 2 TESTS 75 343 14233600
90302959 noisegain A Aug. 18, 2020, 11:31 a.m. OK Python 3 TESTS 75 140 14336000
91644787 Mehrdad_ravenS A Sept. 2, 2020, 1:32 p.m. OK Python 3 TESTS 75 155 16793600
91258201 kalbi A Aug. 29, 2020, 5:36 a.m. OK Python 3 TESTS 75 155 16793600
90905243 vjudge5 A Aug. 25, 2020, 1:57 p.m. OK Python 3 TESTS 75 155 16793600
90295416 Prathyaksh A Aug. 18, 2020, 9:43 a.m. OK Python 3 TESTS 75 155 17715200
90719679 deyanuz A Aug. 22, 2020, 11:22 p.m. OK Python 3 TESTS 75 155 25088000
90465778 saikrishna1681 A Aug. 20, 2020, 1:23 p.m. OK Python 3 TESTS 75 156 16793600
90735098 wir A Aug. 23, 2020, 7:27 a.m. OK Python 3 TESTS 75 156 25088000
90732085 Jodumuntala_Aditya A Aug. 23, 2020, 6:37 a.m. OK Python 3 TESTS 75 156 25088000
90731966 mahtab_zihan A Aug. 23, 2020, 6:35 a.m. OK Python 3 TESTS 75 156 25088000
90441559 ratn41 A Aug. 20, 2020, 7:22 a.m. OK Ruby TESTS 75 748 17203200
90467310 pandrei A Aug. 20, 2020, 1:43 p.m. OK Rust TESTS 75 61 11161600
90506089 n1tz53 A Aug. 21, 2020, 5:18 a.m. OK Rust TESTS 75 61 15769600
90647554 Strorkis A Aug. 22, 2020, 2:41 a.m. OK Rust TESTS 75 62 10854400

remove filters

Back to search problems