Codeforces Round 949 (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
1981 Codeforces Round 949 (Div. 2) FINISHED False 7200 20030063 May 31, 2024, 10:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22773 ) A Turtle and Piggy Are Playing a Game PROGRAMMING brute force greedy math

B"Turtle and Piggy are playing a number game. First, Turtle will choose an integer x , such that l <= x <= r , where l, r are given. It's also guaranteed that 2l <= r . Then, Piggy will keep doing the following operation until x becomes 1 : The score is initially 0 . Both Turtle and Piggy want to maximize the score. Please help them to calculate the maximum score. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. The first line of each test case contains two integers l, r ( 1 <= l <= r <= 10^9, 2l <= r ) -- The range where Turtle can choose the integer from. For each test case, output a single integer -- the maximum score. In the first test case, Turtle can choose an integer x , such that 2 <= x <= 4 . He can choose x = 4 . Then Piggy can choose p = 2 for 2 times. After that, x will become 1 , and the score will be 2 , which is maximized. In the second test case, Turtle can choose an integer 3 <= x <= 6 . He can choose x = 6 . Then Piggy can choose p = 2 , then choose p = 3 . After that, x will become 1 , and the score will be 2 , which is maximum. In the third test case, Turtle can choose x = 12 . In the fourth test case, Turtle can choose x = 16 . "...

Tutorials

Simplified Chinese Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
263556757 A1ternate A May 31, 2024, 11:32 p.m. OK C# 10 TESTS 4 93 2969600
263679179 PETA123456 A June 1, 2024, 8:28 p.m. OK C# 10 TESTS 4 108 1945600
263678976 PETA123456 A June 1, 2024, 8:25 p.m. OK C# 10 TESTS 4 108 1945600
263663681 napgod_pk A June 1, 2024, 5:28 p.m. OK C++14 (GCC 6-32) TESTS 4 31 0
263615599 202305960829 A June 1, 2024, 10:47 a.m. OK C++14 (GCC 6-32) TESTS 4 31 0
263648443 Ashar2301 A June 1, 2024, 3:20 p.m. OK C++14 (GCC 6-32) TESTS 4 31 1024000
263688294 koreafriedchips A June 2, 2024, 12:42 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263675989 rolex009 A June 1, 2024, 7:38 p.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263703324 sz_jinzikai01 A June 2, 2024, 5:37 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263702961 vijay_mali A June 2, 2024, 5:32 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263695433 bryceShakeair A June 2, 2024, 3:34 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263690526 _kimi_ A June 2, 2024, 1:45 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263689178 5k_sync_closer A June 2, 2024, 1:09 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
263586658 kshitizj A June 1, 2024, 6:47 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
263538633 Kener_Castillo A May 31, 2024, 6:19 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263701523 Manzood A June 2, 2024, 5:14 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263666275 MEUE A June 1, 2024, 5:53 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263660964 kanshuman6484 A June 1, 2024, 5:04 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263650460 surajiyer A June 1, 2024, 3:38 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263598477 priyanshukumar0987 A June 1, 2024, 8:24 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263585904 kishan27 A June 1, 2024, 6:41 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263558327 zacsn A June 1, 2024, 12:19 a.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263542190 Emil_Aliyevv A May 31, 2024, 6:58 p.m. OK C++17 (GCC 7-32) TESTS 4 31 0
263508158 3bd_allah_alali A May 31, 2024, 1:56 p.m. OK C++20 (GCC 13-64) TESTS 4 15 102400
263596635 Mhn_Neek A June 1, 2024, 8:09 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
263612641 qrq4 A June 1, 2024, 10:23 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
263519364 wibulord A May 31, 2024, 3:29 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
263697253 Sunnynotsan1 A June 2, 2024, 4:05 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
263683873 YuukiS A June 1, 2024, 10:12 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
263679367 izhang A June 1, 2024, 8:31 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
263651351 User_Kei A June 1, 2024, 3:46 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
263640043 HyPraT_ A June 1, 2024, 2:08 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
263639450 JakobZ A June 1, 2024, 2:02 p.m. OK C++20 (GCC 13-64) TESTS 4 31 0
263553825 bluemegane A May 31, 2024, 10:12 p.m. OK C# 8 TESTS 4 108 1945600
263611204 jxtiii A June 1, 2024, 10:10 a.m. OK GNU C11 TESTS 4 62 0
263532339 Willump1 A May 31, 2024, 5:22 p.m. OK GNU C11 TESTS 4 62 0
263497925 Oberlin A May 31, 2024, 12:34 p.m. OK GNU C11 TESTS 4 62 0
263531885 TheFOOL17 A May 31, 2024, 5:18 p.m. OK GNU C11 TESTS 4 62 102400
263633879 ponilingusss A June 1, 2024, 1:14 p.m. OK GNU C11 TESTS 4 77 0
263515346 shiv25 A May 31, 2024, 2:54 p.m. OK GNU C11 TESTS 4 77 0
263659796 mehedi.enf A June 1, 2024, 4:53 p.m. OK GNU C11 TESTS 4 77 102400
263704084 junwon12 A June 2, 2024, 5:46 a.m. OK GNU C11 TESTS 4 92 0
263702189 lonely_shore A June 2, 2024, 5:22 a.m. OK GNU C11 TESTS 4 92 102400
263661048 niaj_19 A June 1, 2024, 5:05 p.m. OK GNU C11 TESTS 4 93 0
263658311 nguyenquocthao00 A June 1, 2024, 4:42 p.m. OK Go TESTS 4 62 614400
263552359 crapcode A May 31, 2024, 9:38 p.m. OK Go TESTS 4 77 409600
263610013 Dalione A June 1, 2024, 10 a.m. OK Go TESTS 4 186 921600
263609369 Dalione A June 1, 2024, 9:55 a.m. OK Go TESTS 4 203 1740800
263597853 surajmishra-35_199 A June 1, 2024, 8:19 a.m. OK Go TESTS 4 217 921600
263588085 BishtCoder A June 1, 2024, 6:58 a.m. OK Java 21 TESTS 4 187 307200
263551563 powervic08 A May 31, 2024, 9:21 p.m. OK Java 21 TESTS 4 218 614400
263615369 krish0596 A June 1, 2024, 10:46 a.m. OK Java 21 TESTS 4 233 614400
263625282 Althaf_Hussain A June 1, 2024, 11:58 a.m. OK Java 21 TESTS 4 233 614400
263581630 Nagendravarma A June 1, 2024, 6:03 a.m. OK Java 21 TESTS 4 234 204800
263579479 makanuchi_ippo A June 1, 2024, 5:42 a.m. OK Java 21 TESTS 4 234 614400
263508665 Multi-Thread A May 31, 2024, 2:01 p.m. OK Java 21 TESTS 4 249 0
263505847 bhavya_boda A May 31, 2024, 1:36 p.m. OK Java 21 TESTS 4 249 102400
263505629 swatishivam23 A May 31, 2024, 1:34 p.m. OK Java 21 TESTS 4 249 102400
263572968 rishirajsingh A June 1, 2024, 4:25 a.m. OK Java 21 TESTS 4 249 307200
263533550 Noureldin_Khaled A May 31, 2024, 5:33 p.m. OK Java 8 TESTS 4 124 0
263516180 dark_knight_5656 A May 31, 2024, 3:01 p.m. OK Java 8 TESTS 4 140 0
263647289 _habibur_rahman A June 1, 2024, 3:10 p.m. OK Java 8 TESTS 4 155 0
263635412 tutjae A June 1, 2024, 1:27 p.m. OK Java 8 TESTS 4 155 0
263540287 yashvardhan3 A May 31, 2024, 6:36 p.m. OK Java 8 TESTS 4 155 0
263539066 gagan_6730 A May 31, 2024, 6:23 p.m. OK Java 8 TESTS 4 156 0
263499847 safarisoul A May 31, 2024, 12:47 p.m. OK Java 8 TESTS 4 156 0
263579667 danielaggarwal A June 1, 2024, 5:44 a.m. OK Java 8 TESTS 4 171 0
263574745 NayanVerma14 A June 1, 2024, 4:47 a.m. OK Java 8 TESTS 4 171 0
263510670 Yousef_Badr A May 31, 2024, 2:16 p.m. OK Java 8 TESTS 4 171 0
263568549 y4n9b0 A June 1, 2024, 3:32 a.m. OK Kotlin 1.9 TESTS 4 186 102400
263703794 SecondThread A June 2, 2024, 5:43 a.m. OK Kotlin 1.9 TESTS 4 218 102400
263639855 restart__ A June 1, 2024, 2:06 p.m. OK Kotlin 1.9 TESTS 4 218 102400
263613559 Hanasa A June 1, 2024, 10:30 a.m. OK Kotlin 1.9 TESTS 4 218 102400
263569772 y4n9b0 A June 1, 2024, 3:46 a.m. OK Kotlin 1.9 TESTS 4 233 102400
263569527 y4n9b0 A June 1, 2024, 3:44 a.m. OK Kotlin 1.9 TESTS 4 234 204800
263499105 alberbshara473 A May 31, 2024, 12:42 p.m. OK Kotlin 1.9 TESTS 4 249 102400
263608373 habibulka A June 1, 2024, 9:46 a.m. OK Kotlin 1.9 TESTS 4 264 1433600
263499663 y3sinsamy A May 31, 2024, 12:46 p.m. OK Mono C# TESTS 4 108 2560000
263499963 y3sinsamy A May 31, 2024, 12:48 p.m. OK Mono C# TESTS 4 124 2560000
263605391 N1664 A June 1, 2024, 9:21 a.m. OK PyPy 3 TESTS 4 140 4096000
263677345 _Filya_ A June 1, 2024, 8 p.m. OK PyPy 3 TESTS 4 202 6144000
263630970 codsila A June 1, 2024, 12:48 p.m. OK PyPy 3 TESTS 4 218 5324800
263670367 arnav_satwik A June 1, 2024, 6:30 p.m. OK PyPy 3 TESTS 4 233 5529600
263595959 Tomy_Aman A June 1, 2024, 8:04 a.m. OK PyPy 3 TESTS 4 234 5632000
263664495 _pk_ A June 1, 2024, 5:36 p.m. OK PyPy 3 TESTS 4 249 5529600
263521852 albfr A May 31, 2024, 3:50 p.m. OK PyPy 3 TESTS 4 249 5529600
263502979 rashadalsharpini A May 31, 2024, 1:11 p.m. OK PyPy 3 TESTS 4 265 5529600
263653096 yuki_keshiki A June 1, 2024, 3:59 p.m. OK PyPy 3-64 TESTS 4 77 3788800
263546616 strashila A May 31, 2024, 7:58 p.m. OK PyPy 3-64 TESTS 4 93 2969600
263515731 singh.eureka A May 31, 2024, 2:57 p.m. OK PyPy 3-64 TESTS 4 93 2969600
263505825 rmr A May 31, 2024, 1:36 p.m. OK PyPy 3-64 TESTS 4 93 3276800
263571478 alright4869 A June 1, 2024, 4:06 a.m. OK PyPy 3-64 TESTS 4 93 3788800
263520171 accelerate_nju A May 31, 2024, 3:36 p.m. OK PyPy 3-64 TESTS 4 93 4608000
263526353 elnazar A May 31, 2024, 4:29 p.m. OK PyPy 3-64 TESTS 4 108 2150400
263509964 devjain1028 A May 31, 2024, 2:11 p.m. OK PyPy 3-64 TESTS 4 108 2969600
263671036 NicoLadendorf A June 1, 2024, 6:37 p.m. OK PyPy 3-64 TESTS 4 108 3072000
263622724 bergus A June 1, 2024, 11:38 a.m. OK PyPy 3-64 TESTS 4 108 3276800
263553544 Poricf A May 31, 2024, 10:06 p.m. OK Python 3 TESTS 4 77 102400
263637854 kavinderrana121 A June 1, 2024, 1:48 p.m. OK Python 3 TESTS 4 77 409600
263587460 sudarshan9975__satya A June 1, 2024, 6:53 a.m. OK Python 3 TESTS 4 77 409600
263533029 CodeArmy A May 31, 2024, 5:28 p.m. OK Python 3 TESTS 4 77 409600
263523620 yasseinhamdy15 A May 31, 2024, 4:05 p.m. OK Python 3 TESTS 4 77 409600
263497976 mukhashnurislam A May 31, 2024, 12:35 p.m. OK Python 3 TESTS 4 77 409600
263681530 ssalvi A June 1, 2024, 9:15 p.m. OK Python 3 TESTS 4 78 204800
263684647 AYMEN.N.C A June 1, 2024, 10:35 p.m. OK Python 3 TESTS 4 93 0
263597105 ZahraAhad_SundarSTEM A June 1, 2024, 8:13 a.m. OK Python 3 TESTS 4 93 0
263589067 BetaForce A June 1, 2024, 7:06 a.m. OK Python 3 TESTS 4 93 0
263548819 0x81 A May 31, 2024, 8:32 p.m. OK Ruby 3 TESTS 4 296 1433600
263559181 fieubat2x A June 1, 2024, 12:41 a.m. OK Rust 2021 TESTS 4 31 0
263548725 kshitij A May 31, 2024, 8:30 p.m. OK Rust 2021 TESTS 4 46 0
263512084 vstiff A May 31, 2024, 2:27 p.m. OK Rust 2021 TESTS 4 77 0
263684084 julianferres A June 1, 2024, 10:18 p.m. OK Scala TESTS 4 546 102400

remove filters

Back to search problems