Codeforces Round 924 (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
1928 Codeforces Round 924 (Div. 2) FINISHED False 7200 29535863 Feb. 11, 2024, 9:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8920 ) C Physical Education Lesson PROGRAMMING brute force math number theory

B'In a well-known school, a physical education lesson took place. As usual, everyone was lined up and asked to settle in "the first xe2 x80 x93 k -th" position. As is known, settling in "the first xe2 x80 x93 k -th" position occurs as follows: the first k people have numbers 1, 2, 3, ldots, k , the next k - 2 people have numbers k - 1, k - 2, ldots, 2 , the next k people have numbers 1, 2, 3, ldots, k , and so on. Thus, the settling repeats every 2k - 2 positions. Examples of settling are given in the "Note" section. The boy Vasya constantly forgets everything. For example, he forgot the number k described above. But he remembers the position he occupied in the line, as well as the number he received during the settling. Help Vasya understand how many natural numbers k fit under the given constraints. Note that the settling exists if and only if k > 1 . In particular, this means that the settling does not exist for k = 1 . Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. This is followed by the description of the test cases. The only line of each test case contains two integers n and x ( 1 <= x < n <= 10^9 ) -- Vasya 's position in the line and the number Vasya received during the settling. For each test case, output a single integer -- the number of different k that fit under the given constraints. It can be proven that under the given constraints, the answer is finite. In the first test case, k equals 2, 3, 5, 6 are suitable. An example of settling for these k : In the second test case, k = 2 is suitable. '...

Tutorials

Codeforces Round 924 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
245923704 FatalityNT C Feb. 11, 2024, 10:44 p.m. OK C# 10 TESTS 8 61 2969600
245912066 Anastasiya_Andreevna C Feb. 11, 2024, 7:44 p.m. OK C# 10 TESTS 8 62 2764800
245911932 Anastasiya_Andreevna C Feb. 11, 2024, 7:43 p.m. OK C# 10 TESTS 8 62 2867200
245919484 FatalityNT C Feb. 11, 2024, 9:24 p.m. OK C# 10 TESTS 8 62 3276800
245867976 kingsneverdie1411 C Feb. 11, 2024, 1:54 p.m. OK Clang++17 Diagnostics TESTS 8 358 11571200
245884071 NenadDapic C Feb. 11, 2024, 3:49 p.m. OK FPC TESTS 8 31 409600
245874744 ruban C Feb. 11, 2024, 2:47 p.m. OK FPC TESTS 8 46 43929600
245852727 rhdqor213 C Feb. 11, 2024, 12:01 p.m. OK GNU C11 TESTS 8 31 307200
245851452 rhdqor213 C Feb. 11, 2024, 11:54 a.m. OK GNU C11 TESTS 8 46 307200
245885182 huangyu_1 C Feb. 11, 2024, 3:57 p.m. OK GNU C++17 TESTS 8 15 0
245854606 anitadeshmukh1271976 C Feb. 11, 2024, 12:14 p.m. OK GNU C++17 TESTS 8 15 0
245853887 lukatiger C Feb. 11, 2024, 12:09 p.m. OK GNU C++17 TESTS 8 15 0
245901593 dhairysheel.21910784 C Feb. 11, 2024, 6:03 p.m. OK GNU C++17 TESTS 8 15 0
245938964 Dario22lc C Feb. 12, 2024, 4:58 a.m. OK GNU C++17 TESTS 8 15 0
245908340 BigBadWolf C Feb. 11, 2024, 7:04 p.m. OK GNU C++17 TESTS 8 15 204800
245897212 kvivekcodes C Feb. 11, 2024, 5:27 p.m. OK GNU C++17 TESTS 8 15 204800
245891810 Priyanshu626 C Feb. 11, 2024, 4:44 p.m. OK GNU C++17 TESTS 8 15 204800
245926742 rishavkumar C Feb. 12, 2024, 12:08 a.m. OK GNU C++17 TESTS 8 15 204800
245919260 bulbame C Feb. 11, 2024, 9:20 p.m. OK GNU C++17 TESTS 8 15 204800
245854512 chappy1 C Feb. 11, 2024, 12:14 p.m. OK GNU C++17 (64) TESTS 8 0 307200
245865961 hhhyh C Feb. 11, 2024, 1:41 p.m. OK GNU C++17 (64) TESTS 8 15 0
245853936 KittenCoolUwU C Feb. 11, 2024, 12:09 p.m. OK GNU C++17 (64) TESTS 8 15 0
245853299 Splashing C Feb. 11, 2024, 12:05 p.m. OK GNU C++17 (64) TESTS 8 15 0
245931791 SGColin C Feb. 12, 2024, 2:38 a.m. OK GNU C++17 (64) TESTS 8 15 0
245935300 xingliu C Feb. 12, 2024, 3:51 a.m. OK GNU C++17 (64) TESTS 8 15 102400
245935207 xingliu C Feb. 12, 2024, 3:50 a.m. OK GNU C++17 (64) TESTS 8 15 102400
245920136 yurui111 C Feb. 11, 2024, 9:34 p.m. OK GNU C++17 (64) TESTS 8 15 102400
245893421 Camellia_Tsubaki C Feb. 11, 2024, 4:57 p.m. OK GNU C++17 (64) TESTS 8 15 102400
245871538 Henry602 C Feb. 11, 2024, 2:23 p.m. OK GNU C++17 (64) TESTS 8 15 102400
245930644 Edwin__VanCleef C Feb. 12, 2024, 2:05 a.m. OK GNU C++20 (64) TESTS 8 15 0
245922364 praveenk C Feb. 11, 2024, 10:16 p.m. OK GNU C++20 (64) TESTS 8 15 0
245919604 wiktorlewicki C Feb. 11, 2024, 9:26 p.m. OK GNU C++20 (64) TESTS 8 15 0
245919491 wiktorlewicki C Feb. 11, 2024, 9:24 p.m. OK GNU C++20 (64) TESTS 8 15 0
245917022 sammilleer C Feb. 11, 2024, 8:47 p.m. OK GNU C++20 (64) TESTS 8 15 0
245913458 KhachIn C Feb. 11, 2024, 8 p.m. OK GNU C++20 (64) TESTS 8 15 0
245913091 maomao C Feb. 11, 2024, 7:56 p.m. OK GNU C++20 (64) TESTS 8 15 0
245908933 Golovanov399 C Feb. 11, 2024, 7:10 p.m. OK GNU C++20 (64) TESTS 8 15 0
245936986 shi_logic C Feb. 12, 2024, 4:24 a.m. OK GNU C++20 (64) TESTS 8 15 0
245938724 jiangly C Feb. 12, 2024, 4:54 a.m. OK GNU C++20 (64) TESTS 8 15 0
245884701 21r C Feb. 11, 2024, 3:54 p.m. OK Go TESTS 8 62 4915200
245851097 Skeef79 C Feb. 11, 2024, 11:52 a.m. OK Go TESTS 8 171 2457600
245936457 Ligh0x74 C Feb. 12, 2024, 4:14 a.m. OK Java 21 TESTS 8 249 0
245858133 profchi C Feb. 11, 2024, 12:42 p.m. OK Java 21 TESTS 8 249 0
245895633 AyushVardhan C Feb. 11, 2024, 5:15 p.m. OK Java 21 TESTS 8 280 0
245864846 priyaroy3370 C Feb. 11, 2024, 1:33 p.m. OK Java 21 TESTS 8 295 0
245903605 mohit458 C Feb. 11, 2024, 6:20 p.m. OK Java 21 TESTS 8 296 0
245853564 saptarshi1729 C Feb. 11, 2024, 12:07 p.m. OK Java 21 TESTS 8 296 19968000
245855725 vijay_panwar12 C Feb. 11, 2024, 12:22 p.m. OK Java 21 TESTS 8 311 0
245887236 santanu021 C Feb. 11, 2024, 4:12 p.m. OK Java 21 TESTS 8 311 102400
245877150 AKhacks C Feb. 11, 2024, 3:02 p.m. OK Java 21 TESTS 8 311 102400
245893650 CutSandstone C Feb. 11, 2024, 4:59 p.m. OK Java 21 TESTS 8 311 4198400
245855213 wat2 C Feb. 11, 2024, 12:18 p.m. OK Java 8 TESTS 8 109 0
245879531 huhansan C Feb. 11, 2024, 3:18 p.m. OK Java 8 TESTS 8 124 0
245936965 Harwinvanak C Feb. 12, 2024, 4:23 a.m. OK Java 8 TESTS 8 139 0
245931858 MintCat C Feb. 12, 2024, 2:39 a.m. OK Java 8 TESTS 8 140 0
245882864 kasiru_69 C Feb. 11, 2024, 3:41 p.m. OK Java 8 TESTS 8 140 0
245939691 ilasiawo C Feb. 12, 2024, 5:10 a.m. OK Java 8 TESTS 8 170 0
245939382 amit_roy C Feb. 12, 2024, 5:05 a.m. OK Java 8 TESTS 8 171 0
245892399 AgniWarrior C Feb. 11, 2024, 4:49 p.m. OK Java 8 TESTS 8 171 0
245892145 PlayDate C Feb. 11, 2024, 4:47 p.m. OK Java 8 TESTS 8 171 0
245858661 Sumitsingh7 C Feb. 11, 2024, 12:46 p.m. OK Java 8 TESTS 8 171 5734400
245850811 serg_alb C Feb. 11, 2024, 11:52 a.m. OK Kotlin 1.7 TESTS 8 295 4505600
245878794 alchemyst C Feb. 11, 2024, 3:12 p.m. OK MS C++ 2017 TESTS 8 31 0
245939431 aluckyboy C Feb. 12, 2024, 5:06 a.m. OK MS C++ 2017 TESTS 8 62 0
245851479 OLOGY C Feb. 11, 2024, 11:54 a.m. OK PyPy 2 TESTS 8 108 409600
245848513 vijay07 C Feb. 11, 2024, 11:32 a.m. OK PyPy 3 TESTS 8 124 1843200
245867643 ErikUs C Feb. 11, 2024, 1:52 p.m. OK PyPy 3 TESTS 8 155 1945600
245857771 Adeer_Bakht C Feb. 11, 2024, 12:39 p.m. OK PyPy 3-64 TESTS 8 108 2048000
245859194 Shubham_2003 C Feb. 11, 2024, 12:51 p.m. OK PyPy 3-64 TESTS 8 108 2150400
245929572 abhay_30281125 C Feb. 12, 2024, 1:38 a.m. OK PyPy 3-64 TESTS 8 108 2457600
245858271 eunsoo0607 C Feb. 11, 2024, 12:43 p.m. OK PyPy 3-64 TESTS 8 108 2662400
245851508 gardengnome C Feb. 11, 2024, 11:54 a.m. OK PyPy 3-64 TESTS 8 108 9830400
245910636 Kjust C Feb. 11, 2024, 7:28 p.m. OK PyPy 3-64 TESTS 8 109 1945600
245850919 HliasBoss C Feb. 11, 2024, 11:52 a.m. OK PyPy 3-64 TESTS 8 109 1945600
245893761 keeyann C Feb. 11, 2024, 5 p.m. OK PyPy 3-64 TESTS 8 109 2150400
245896979 sdt4936 C Feb. 11, 2024, 5:26 p.m. OK PyPy 3-64 TESTS 8 109 2560000
245873721 Surajk21 C Feb. 11, 2024, 2:41 p.m. OK PyPy 3-64 TESTS 8 109 6246400
245877493 OLOGY C Feb. 11, 2024, 3:04 p.m. OK Python 2 TESTS 8 498 102400
245877338 OLOGY C Feb. 11, 2024, 3:03 p.m. OK Python 2 TESTS 8 514 0
245853113 OLOGY C Feb. 11, 2024, 12:04 p.m. OK Python 2 TESTS 8 514 102400
245851521 OLOGY C Feb. 11, 2024, 11:55 a.m. OK Python 2 TESTS 8 514 102400
245848551 agjignesh2003 C Feb. 11, 2024, 11:32 a.m. OK Python 3 TESTS 8 217 0
245860664 V3k0r C Feb. 11, 2024, 1:03 p.m. OK Python 3 TESTS 8 451 0
245941199 Hossam_Hassan_Taher C Feb. 12, 2024, 5:33 a.m. OK Python 3 TESTS 8 452 0
245850804 AdityaVegad C Feb. 11, 2024, 11:52 a.m. OK Python 3 TESTS 8 467 1536000
245849259 sibisakthi744 C Feb. 11, 2024, 11:34 a.m. OK Python 3 TESTS 8 483 102400
245910696 wyzkeyy C Feb. 11, 2024, 7:29 p.m. OK Python 3 TESTS 8 638 0
245878774 JasonMendoza2008 C Feb. 11, 2024, 3:12 p.m. OK Python 3 TESTS 8 670 1638400
245867074 rishabhxchoudhary C Feb. 11, 2024, 1:50 p.m. OK Python 3 TESTS 8 685 0
245856963 rishabhxchoudhary C Feb. 11, 2024, 12:32 p.m. OK Python 3 TESTS 8 717 0
245878704 JasonMendoza2008 C Feb. 11, 2024, 3:12 p.m. OK Python 3 TESTS 8 732 1740800

remove filters

Back to search problems