Codeforces Global Round 24

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
1764 Codeforces Global Round 24 FINISHED False 9000 67708463 Nov. 26, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16235 ) B Doremy's Perfect Math Class PROGRAMMING number theory

B'"Everybody! Doremy 's Perfect Math Class is about to start! Come and do your best if you want to have as much IQ as me!" In today 's math class, Doremy is teaching everyone subtraction. Now she gives you a quiz to prove that you are paying attention in class. You are given a set S containing positive integers. You may perform the following operation some (possibly zero) number of times: You need to tell Doremy the maximum possible number of integers in S if the operations are performed optimally. It can be proven that this number is finite. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line contains an integer n ( 2 <= n <= 10^5 ) -- the size of the set S . The second line contains n integers a_1,a_2, ... ,a_n ( 1 <= a_1 < a_2 < cdots < a_n <= 10^9 ) -- the positive integers in S . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, you need to output the maximum possible number of integers in S . It can be proven that this value is finite. In the first test case, no such x and y exist. The maximum possible number of integers in S is 2 . In the second test case, After performing all operations, the number of integers in S is 5 . It can be proven that no other sequence of operations allows S to contain more than 5 integers. '...

Tutorials

Codeforces Global Round 24 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
182681820 WAAAAAAAAAAAAAAAAAAAAA B Nov. 26, 2022, 3:16 p.m. OK C# 10 TESTS 6 108 11980800
182687847 matomakuch B Nov. 26, 2022, 3:40 p.m. OK C# 10 TESTS 6 140 14950400
182693984 doublethinker B Nov. 26, 2022, 4:09 p.m. OK C# 10 TESTS 6 421 15974400
182688547 ansergeyg B Nov. 26, 2022, 3:43 p.m. OK C# 8 TESTS 6 171 14950400
182681956 ssvb B Nov. 26, 2022, 3:16 p.m. OK D TESTS 6 77 6348800
182689083 TahmidMuntaser B Nov. 26, 2022, 3:46 p.m. OK GNU C11 TESTS 6 78 409600
182710788 NafiulHasan041 B Nov. 26, 2022, 6:19 p.m. OK GNU C11 TESTS 6 78 409600
182687542 lioeva_niuma B Nov. 26, 2022, 3:39 p.m. OK GNU C11 TESTS 6 78 409600
182692734 AngryLeaf B Nov. 26, 2022, 4:03 p.m. OK GNU C11 TESTS 6 93 409600
182704096 Interested B Nov. 26, 2022, 5:17 p.m. OK GNU C11 TESTS 6 93 409600
182691383 cheeems B Nov. 26, 2022, 3:56 p.m. OK GNU C11 TESTS 6 109 0
182682457 1435730 B Nov. 26, 2022, 3:18 p.m. OK GNU C11 TESTS 6 109 409600
182704346 nestor_makhno B Nov. 26, 2022, 5:19 p.m. OK GNU C11 TESTS 6 702 409600
182698456 SAFIN07 B Nov. 26, 2022, 4:30 p.m. OK GNU C11 TESTS 6 702 409600
182706739 Ifugao B Nov. 26, 2022, 5:41 p.m. OK GNU C++14 TESTS 6 31 0
182685728 HusseinWageeh B Nov. 26, 2022, 3:31 p.m. OK GNU C++14 TESTS 6 31 409600
182701972 AbdAlhadi_AbuAlshamat B Nov. 26, 2022, 5:02 p.m. OK GNU C++14 TESTS 6 46 0
182692575 Prometeus B Nov. 26, 2022, 4:02 p.m. OK GNU C++14 TESTS 6 46 0
182678637 leijinpeng B Nov. 26, 2022, 3:04 p.m. OK GNU C++14 TESTS 6 46 0
182734981 Fiatiustitia B Nov. 27, 2022, 2:50 a.m. OK GNU C++14 TESTS 7 46 0
182735012 cubill B Nov. 27, 2022, 2:50 a.m. OK GNU C++14 TESTS 7 46 409600
182730454 _chroneZ B Nov. 27, 2022, 12:18 a.m. OK GNU C++14 TESTS 6 46 409600
182742420 daniel14311531 B Nov. 27, 2022, 5:38 a.m. OK GNU C++14 TESTS 7 46 409600
182740479 Mikey1434 B Nov. 27, 2022, 5:04 a.m. OK GNU C++14 TESTS 7 46 409600
182742604 Cxny B Nov. 27, 2022, 5:41 a.m. OK GNU C++17 TESTS 7 31 409600
182683021 naim33208 B Nov. 26, 2022, 3:20 p.m. OK GNU C++17 TESTS 6 31 409600
182733188 Dullbean B Nov. 27, 2022, 1:57 a.m. OK GNU C++17 TESTS 7 46 0
182696327 YatharthDhingra B Nov. 26, 2022, 4:20 p.m. OK GNU C++17 TESTS 6 46 0
182680939 AmirMoris B Nov. 26, 2022, 3:12 p.m. OK GNU C++17 TESTS 6 46 0
182680147 FieryRMS B Nov. 26, 2022, 3:09 p.m. OK GNU C++17 TESTS 6 46 0
182680142 utkarsh1236 B Nov. 26, 2022, 3:09 p.m. OK GNU C++17 TESTS 6 46 0
182679693 iamgoingtodie B Nov. 26, 2022, 3:08 p.m. OK GNU C++17 TESTS 6 46 0
182712182 R0L3eX B Nov. 26, 2022, 6:34 p.m. OK GNU C++17 TESTS 6 46 0
182703296 emoreira B Nov. 26, 2022, 5:10 p.m. OK GNU C++17 TESTS 6 46 0
182692799 YeYeYe B Nov. 26, 2022, 4:03 p.m. OK GNU C++17 (64) TESTS 6 30 409600
182695989 bilasislam5643 B Nov. 26, 2022, 4:18 p.m. OK GNU C++17 (64) TESTS 6 30 409600
182708543 aymanriadsolh B Nov. 26, 2022, 6 p.m. OK GNU C++17 (64) TESTS 6 30 409600
182710323 neal B Nov. 26, 2022, 6:14 p.m. OK GNU C++17 (64) TESTS 6 30 409600
182712835 AkramElOmrani B Nov. 26, 2022, 6:42 p.m. OK GNU C++17 (64) TESTS 6 30 409600
182686303 FourthHokage B Nov. 26, 2022, 3:33 p.m. OK GNU C++17 (64) TESTS 6 30 409600
182679378 serialcomder B Nov. 26, 2022, 3:07 p.m. OK GNU C++17 (64) TESTS 6 30 819200
182687905 sameh_tarek1 B Nov. 26, 2022, 3:40 p.m. OK GNU C++17 (64) TESTS 6 30 819200
182736813 ReSakura B Nov. 27, 2022, 3:41 a.m. OK GNU C++17 (64) TESTS 7 31 0
182726256 over_flow B Nov. 26, 2022, 10:18 p.m. OK GNU C++17 (64) TESTS 6 31 0
182701973 SSerxhs B Nov. 26, 2022, 5:02 p.m. OK GNU C++20 (64) TESTS 6 15 409600
182687894 JooQatry B Nov. 26, 2022, 3:40 p.m. OK GNU C++20 (64) TESTS 6 15 409600
182686563 _Neel_ B Nov. 26, 2022, 3:34 p.m. OK GNU C++20 (64) TESTS 6 15 409600
182686225 Deeplearning- B Nov. 26, 2022, 3:33 p.m. OK GNU C++20 (64) TESTS 6 15 409600
182698951 Yelarys B Nov. 26, 2022, 4:32 p.m. OK GNU C++20 (64) TESTS 6 15 409600
182723426 nadaAtef B Nov. 26, 2022, 9:23 p.m. OK GNU C++20 (64) TESTS 6 15 819200
182705537 bashem B Nov. 26, 2022, 5:29 p.m. OK GNU C++20 (64) TESTS 6 15 819200
182702958 M-29 B Nov. 26, 2022, 5:08 p.m. OK GNU C++20 (64) TESTS 6 15 819200
182686804 sajin10 B Nov. 26, 2022, 3:35 p.m. OK GNU C++20 (64) TESTS 6 15 819200
182732741 ifeng B Nov. 27, 2022, 1:41 a.m. OK GNU C++20 (64) TESTS 7 15 819200
182685497 _shrish_ B Nov. 26, 2022, 3:30 p.m. OK Go TESTS 6 92 3379200
182694536 guguguyoo B Nov. 26, 2022, 4:11 p.m. OK Go TESTS 6 139 4300800
182716671 TomazGomes B Nov. 26, 2022, 7:31 p.m. OK Haskell TESTS 6 998 67276800
182681967 pushkar.lonkar21 B Nov. 26, 2022, 3:16 p.m. OK Java 11 TESTS 6 202 0
182740864 sf14t B Nov. 27, 2022, 5:12 a.m. OK Java 11 TESTS 7 202 0
182684738 the_unseen_jr B Nov. 26, 2022, 3:27 p.m. OK Java 11 TESTS 6 202 0
182681574 shcal B Nov. 26, 2022, 3:15 p.m. OK Java 11 TESTS 6 233 0
182688549 shahvraj1500 B Nov. 26, 2022, 3:43 p.m. OK Java 11 TESTS 6 248 0
182719936 Amandubey007 B Nov. 26, 2022, 8:23 p.m. OK Java 11 TESTS 6 249 0
182708611 bajpaisharanya B Nov. 26, 2022, 6 p.m. OK Java 11 TESTS 6 249 0
182709958 mcrash12 B Nov. 26, 2022, 6:11 p.m. OK Java 11 TESTS 6 280 0
182718979 djrfrn B Nov. 26, 2022, 8:07 p.m. OK Java 11 TESTS 6 280 0
182681324 DOOMJUICE B Nov. 26, 2022, 3:14 p.m. OK Java 11 TESTS 6 280 1843200
182730092 kkz666 B Nov. 27, 2022, 12:04 a.m. OK Java 17 TESTS 6 264 614400
182678911 akarshanand2810 B Nov. 26, 2022, 3:05 p.m. OK Java 17 TESTS 6 280 409600
182678493 Grizler B Nov. 26, 2022, 3:04 p.m. OK Java 17 TESTS 6 327 0
182694074 ghost24601 B Nov. 26, 2022, 4:09 p.m. OK Java 17 TESTS 6 343 3481600
182683200 Deepak95 B Nov. 26, 2022, 3:21 p.m. OK Java 17 TESTS 6 483 307200
182680542 Mr.BlackHole B Nov. 26, 2022, 3:11 p.m. OK Java 17 TESTS 6 499 204800
182685785 amit_kumar_90 B Nov. 26, 2022, 3:31 p.m. OK Java 17 TESTS 6 514 307200
182706965 rajashish914 B Nov. 26, 2022, 5:43 p.m. OK Java 17 TESTS 6 514 921600
182685251 HusanRich B Nov. 26, 2022, 3:29 p.m. OK Java 17 TESTS 6 514 921600
182678513 Saadblaze456 B Nov. 26, 2022, 3:04 p.m. OK Java 17 TESTS 6 530 614400
182708476 Sussykin B Nov. 26, 2022, 5:59 p.m. OK Java 8 TESTS 6 93 0
182737574 prakhar_30 B Nov. 27, 2022, 4 a.m. OK Java 8 TESTS 7 108 0
182702076 Rayhan_07 B Nov. 26, 2022, 5:02 p.m. OK Java 8 TESTS 6 108 0
182702371 Koka B Nov. 26, 2022, 5:04 p.m. OK Java 8 TESTS 6 124 0
182678500 Mohamed_A7med B Nov. 26, 2022, 3:04 p.m. OK Java 8 TESTS 6 124 0
182678494 RahulAhuja2901 B Nov. 26, 2022, 3:04 p.m. OK Java 8 TESTS 6 124 0
182705081 Eslam_Ahmed B Nov. 26, 2022, 5:25 p.m. OK Java 8 TESTS 6 139 0
182726008 UniversalAdmin B Nov. 26, 2022, 10:13 p.m. OK Java 8 TESTS 6 140 0
182687406 MarbikTest B Nov. 26, 2022, 3:38 p.m. OK Java 8 TESTS 6 140 0
182679148 Imran435 B Nov. 26, 2022, 3:06 p.m. OK Java 8 TESTS 6 140 0
182727961 Kay0 B Nov. 26, 2022, 10:58 p.m. OK Kotlin 1.6 TESTS 6 373 3788800
182698943 LLIEPJIOK B Nov. 26, 2022, 4:32 p.m. OK MS C++ 2017 TESTS 6 62 409600
182685697 Tor_250 B Nov. 26, 2022, 3:31 p.m. OK MS C++ 2017 TESTS 6 93 409600
182688744 Mikhail1928 B Nov. 26, 2022, 3:44 p.m. OK MS C++ 2017 TESTS 6 171 409600
182681505 yyytf__ B Nov. 26, 2022, 3:14 p.m. OK MS C++ 2017 TESTS 6 186 409600
182702842 LLIEPJIOK B Nov. 26, 2022, 5:07 p.m. OK MS C++ 2017 TESTS 6 217 409600
182702559 LLIEPJIOK B Nov. 26, 2022, 5:05 p.m. OK MS C++ 2017 TESTS 6 233 409600
182740157 tjdvyzl12345 B Nov. 27, 2022, 4:58 a.m. OK MS C++ 2017 TESTS 7 233 1433600
182732379 hua_yi_jiu B Nov. 27, 2022, 1:28 a.m. OK MS C++ 2017 TESTS 6 233 3993600
182679146 McLetchik B Nov. 26, 2022, 3:06 p.m. OK MS C++ 2017 TESTS 6 248 819200
182689888 Shraddha_16 B Nov. 26, 2022, 3:49 p.m. OK MS C++ 2017 TESTS 6 249 409600
182696903 kunhart B Nov. 26, 2022, 4:23 p.m. OK PyPy 3 TESTS 6 295 10444800
182687530 Fasih.sundar B Nov. 26, 2022, 3:39 p.m. OK PyPy 3 TESTS 6 311 11161600
182692853 Gauss96 B Nov. 26, 2022, 4:03 p.m. OK PyPy 3 TESTS 6 327 12390400
182686246 NicholasTing B Nov. 26, 2022, 3:33 p.m. OK PyPy 3 TESTS 6 420 10649600
182730242 INAUTUM B Nov. 27, 2022, 12:11 a.m. OK PyPy 3 TESTS 6 452 11366400
182730140 INAUTUM B Nov. 27, 2022, 12:07 a.m. OK PyPy 3 TESTS 6 514 11468800
182685314 _gajera__28_0 B Nov. 26, 2022, 3:29 p.m. OK PyPy 3 TESTS 6 514 11776000
182737881 bpdolson B Nov. 27, 2022, 4:08 a.m. OK PyPy 3 TESTS 7 529 12083200
182690322 KorotkovF B Nov. 26, 2022, 3:51 p.m. OK PyPy 3 TESTS 6 530 12185600
182680376 tezt B Nov. 26, 2022, 3:10 p.m. OK PyPy 3 TESTS 6 561 11468800
182718111 Nabeel_Ismaeel B Nov. 26, 2022, 7:53 p.m. OK PyPy 3-64 TESTS 6 124 13312000
182715364 Trem0r B Nov. 26, 2022, 7:12 p.m. OK PyPy 3-64 TESTS 6 124 13312000
182727941 biglunchdude B Nov. 26, 2022, 10:58 p.m. OK PyPy 3-64 TESTS 6 124 13824000
182723070 unknownSolver B Nov. 26, 2022, 9:17 p.m. OK PyPy 3-64 TESTS 6 124 14643200
182728553 crapcode B Nov. 26, 2022, 11:15 p.m. OK PyPy 3-64 TESTS 6 124 15155200
182680334 InariInDream B Nov. 26, 2022, 3:10 p.m. OK PyPy 3-64 TESTS 6 124 18329600
182706584 mintplz B Nov. 26, 2022, 5:39 p.m. OK PyPy 3-64 TESTS 6 140 13619200
182682641 Soumen_Sarkar B Nov. 26, 2022, 3:18 p.m. OK PyPy 3-64 TESTS 6 140 13824000
182681090 Turtleeee B Nov. 26, 2022, 3:13 p.m. OK PyPy 3-64 TESTS 6 140 13824000
182682152 dipuk656wx B Nov. 26, 2022, 3:17 p.m. OK PyPy 3-64 TESTS 6 155 13312000
182688197 xph_4n B Nov. 26, 2022, 3:42 p.m. OK Python 2 TESTS 6 233 6041600
182689733 M-ANEEQ B Nov. 26, 2022, 3:49 p.m. OK Python 3 TESTS 6 124 10342400
182719370 eugalt B Nov. 26, 2022, 8:13 p.m. OK Python 3 TESTS 6 140 8499200
182686901 Musmo B Nov. 26, 2022, 3:36 p.m. OK Python 3 TESTS 6 155 7680000
182681949 eugalt B Nov. 26, 2022, 3:16 p.m. OK Python 3 TESTS 6 170 10342400
182686122 Fur_Philosophy B Nov. 26, 2022, 3:33 p.m. OK Python 3 TESTS 6 186 7884800
182690412 M_MUEED_AWAIS B Nov. 26, 2022, 3:52 p.m. OK Python 3 TESTS 6 186 8089600
182690555 Har.Preet.Singh B Nov. 26, 2022, 3:52 p.m. OK Python 3 TESTS 6 202 7884800
182732946 Muhammad.Junaid.Faheem B Nov. 27, 2022, 1:49 a.m. OK Python 3 TESTS 7 202 8089600
182704817 thewrongmystery B Nov. 26, 2022, 5:23 p.m. OK Python 3 TESTS 6 202 8089600
182683023 Pawan_Lahoti B Nov. 26, 2022, 3:20 p.m. OK Python 3 TESTS 6 202 8089600
182688135 celestialidiot B Nov. 26, 2022, 3:41 p.m. OK Rust 2021 TESTS 6 15 3584000
182732022 Spheniscine B Nov. 27, 2022, 1:16 a.m. OK Rust 2021 TESTS 6 31 512000

remove filters

Back to search problems