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 |
---|---|---|---|---|---|---|
1904 | Codeforces Round 914 (Div. 2) | FINISHED | False | 7200 | 35042063 | Dec. 9, 2023, 4:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 22135 ) | A | Forked! | PROGRAMMING | brute force |
B"Lunchbox is done with playing chess! His queen and king just got forked again! In chess, a fork is when a knight attacks two pieces of higher value, commonly the king and the queen. Lunchbox knows that knights can be tricky, and in the version of chess that he is playing, knights are even trickier: instead of moving 1 tile in one direction and 2 tiles in the other, knights in Lunchbox's modified game move a tiles in one direction and b tiles in the other. Lunchbox is playing chess on an infinite chessboard which contains all cells (x,y) where x and y are (possibly negative) integers. Lunchbox's king and queen are placed on cells (x_K,y_K) and (x_Q,y_Q) respectively. Find the number of positions such that if a knight was placed on that cell, it would attack both the king and queen. Each test contains multiple test cases. The first line contains an integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers a and b ( 1 <= a, b <= 10^8 ) -- describing the possible moves of the knight. The second line of each test case contains two integers x_K and y_K ( 0 <= x_K, y_K <= 10^8 ) -- the position of Lunchbox's king. The third line in a test case contains x_Q and y_Q ( 0 <= x_Q, y_Q <= 10^8 ) -- the position of Lunchbox's queen. It is guaranteed that Lunchbox's queen and king will occupy different cells. That is, (x_K,y_K) neq (x_Q,y_Q) . For each test case, output the number of positions on an infinite chessboard such that a knight can attack both the king and the queen. In the first test case, the knight can move 2 squares in one direction and 1 square in the other (it is essentially the same as the knight in standard chess). A knight placed on (2, 1) or (1, 2) would attack both the king and queen. In the second test ca"... |
Codeforces Round 914 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
236565804 | ungerfall | A | Dec. 9, 2023, 5:50 p.m. | OK | C# 10 | TESTS | 6 | 109 | 1536000 | ||
236596642 | bluemegane | A | Dec. 9, 2023, 10:37 p.m. | OK | C# 8 | TESTS | 6 | 92 | 2150400 | ||
236595204 | Aditya_Dolui | A | Dec. 9, 2023, 10:04 p.m. | OK | Clang++20 Diagnostics | TESTS | 6 | 77 | 102400 | ||
236563826 | zartaf.raza | A | Dec. 9, 2023, 5:45 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
236570408 | Parth_113 | A | Dec. 9, 2023, 6:02 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
236566017 | Zen-Nightshade | A | Dec. 9, 2023, 5:51 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
236607461 | Bhaumik_Luhar2005 | A | Dec. 10, 2023, 3:41 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
236562852 | i-AM-DEVIL | A | Dec. 9, 2023, 5:42 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | ||
236563719 | PhoenixJ | A | Dec. 9, 2023, 5:45 p.m. | OK | GNU C11 | TESTS | 6 | 31 | 0 | ||
236607858 | Humaira228 | A | Dec. 10, 2023, 3:49 a.m. | OK | GNU C11 | TESTS | 6 | 31 | 0 | ||
236578719 | pravintanpure1233 | A | Dec. 9, 2023, 6:54 p.m. | OK | GNU C11 | TESTS | 6 | 31 | 0 | ||
236577244 | EasonLiang | A | Dec. 9, 2023, 6:42 p.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236573808 | Parallel_Retrogression | A | Dec. 9, 2023, 6:21 p.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236567172 | se4weed | A | Dec. 9, 2023, 5:54 p.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236565395 | TheMob | A | Dec. 9, 2023, 5:49 p.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236615623 | quanw267 | A | Dec. 10, 2023, 5:55 a.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236606444 | hehe012 | A | Dec. 10, 2023, 3:21 a.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236605311 | what_the_fox_say | A | Dec. 10, 2023, 2:55 a.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236601804 | GSRgsrgsr | A | Dec. 10, 2023, 1:24 a.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236597204 | Parallel_Retrogression | A | Dec. 9, 2023, 10:52 p.m. | OK | GNU C++14 | TESTS | 6 | 0 | 0 | ||
236602401 | yeminghan | A | Dec. 10, 2023, 1:42 a.m. | OK | GNU C++14 | TESTS | 6 | 0 | 102400 | ||
236605110 | Tunggg | A | Dec. 10, 2023, 2:51 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236604613 | wzhjk | A | Dec. 10, 2023, 2:39 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236613337 | 2001ASpaceOdyssey | A | Dec. 10, 2023, 5:24 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236615634 | __aryan_rajj | A | Dec. 10, 2023, 5:55 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236609804 | Tunggg | A | Dec. 10, 2023, 4:25 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236609515 | milan_s1 | A | Dec. 10, 2023, 4:20 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236609031 | shobyy | A | Dec. 10, 2023, 4:11 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236607230 | sussy__baka | A | Dec. 10, 2023, 3:36 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236606292 | dzz22012007 | A | Dec. 10, 2023, 3:17 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236607166 | JoseJovian | A | Dec. 10, 2023, 3:35 a.m. | OK | GNU C++17 | TESTS | 6 | 0 | 0 | ||
236610855 | practice13 | A | Dec. 10, 2023, 4:44 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236615880 | Binary_AJ | A | Dec. 10, 2023, 5:57 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236614312 | .qiti | A | Dec. 10, 2023, 5:38 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236613415 | Bing.zx | A | Dec. 10, 2023, 5:25 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236613068 | Aurora101 | A | Dec. 10, 2023, 5:20 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236609824 | Lyhhhh | A | Dec. 10, 2023, 4:26 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236609133 | Rikkual | A | Dec. 10, 2023, 4:13 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236608619 | fzyz2020 | A | Dec. 10, 2023, 4:03 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236608581 | wlh666 | A | Dec. 10, 2023, 4:02 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236604861 | Yn_ns | A | Dec. 10, 2023, 2:45 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 0 | 0 | ||
236614391 | iliyian | A | Dec. 10, 2023, 5:39 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236614340 | NanYangNanChui | A | Dec. 10, 2023, 5:38 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236614460 | luogu_bot3 | A | Dec. 10, 2023, 5:40 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236614531 | akarsh_77 | A | Dec. 10, 2023, 5:41 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236614546 | T-mas | A | Dec. 10, 2023, 5:41 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236614826 | code_with_atif | A | Dec. 10, 2023, 5:45 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236615269 | sleepyboi | A | Dec. 10, 2023, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236615304 | TechSavvyAmit | A | Dec. 10, 2023, 5:51 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236615788 | XeNAf_I | A | Dec. 10, 2023, 5:56 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236616042 | Khalwsh | A | Dec. 10, 2023, 6 a.m. | OK | GNU C++20 (64) | TESTS | 6 | 0 | 0 | ||
236582222 | GR1ZLER | A | Dec. 9, 2023, 7:30 p.m. | OK | Java 11 | TESTS | 6 | 155 | 0 | ||
236561255 | ....----.... | A | Dec. 9, 2023, 5:38 p.m. | OK | Java 11 | TESTS | 6 | 202 | 0 | ||
236609312 | aditya3624singh | A | Dec. 10, 2023, 4:16 a.m. | OK | Java 11 | TESTS | 6 | 217 | 0 | ||
236577140 | vedjaiswal | A | Dec. 9, 2023, 6:41 p.m. | OK | Java 11 | TESTS | 6 | 217 | 0 | ||
236585691 | G8L18M | A | Dec. 9, 2023, 8:10 p.m. | OK | Java 17 | TESTS | 6 | 124 | 307200 | ||
236577234 | mmayukh1810 | A | Dec. 9, 2023, 6:42 p.m. | OK | Java 17 | TESTS | 6 | 171 | 307200 | ||
236573077 | abhishekP01 | A | Dec. 9, 2023, 6:18 p.m. | OK | Java 17 | TESTS | 6 | 186 | 0 | ||
236610644 | nazzy_ | A | Dec. 10, 2023, 4:41 a.m. | OK | Java 17 | TESTS | 6 | 186 | 204800 | ||
236586836 | CutSandstone | A | Dec. 9, 2023, 8:24 p.m. | OK | Java 17 | TESTS | 6 | 187 | 4608000 | ||
236577062 | BrisS | A | Dec. 9, 2023, 6:40 p.m. | OK | Java 17 | TESTS | 6 | 202 | 102400 | ||
236561519 | dawn_raja | A | Dec. 9, 2023, 5:38 p.m. | OK | Java 17 | TESTS | 6 | 202 | 512000 | ||
236578928 | vibhuti_2201 | A | Dec. 9, 2023, 6:56 p.m. | OK | Java 17 | TESTS | 6 | 217 | 512000 | ||
236563766 | rayushkgp | A | Dec. 9, 2023, 5:45 p.m. | OK | Java 17 | TESTS | 6 | 218 | 409600 | ||
236610160 | nis1234 | A | Dec. 10, 2023, 4:32 a.m. | OK | Java 17 | TESTS | 6 | 233 | 409600 | ||
236589954 | ramitg254 | A | Dec. 9, 2023, 8:53 p.m. | OK | Java 21 | TESTS | 6 | 249 | 0 | ||
236565319 | Om77 | A | Dec. 9, 2023, 5:49 p.m. | OK | Java 21 | TESTS | 6 | 296 | 0 | ||
236582046 | illuminati41257 | A | Dec. 9, 2023, 7:28 p.m. | OK | Java 21 | TESTS | 6 | 311 | 0 | ||
236604112 | mapleKing | A | Dec. 10, 2023, 2:28 a.m. | OK | Java 21 | TESTS | 6 | 358 | 0 | ||
236601513 | mohamedhassan_c | A | Dec. 10, 2023, 1:14 a.m. | OK | Java 8 | TESTS | 6 | 93 | 6246400 | ||
236603269 | Nirvanaa | A | Dec. 10, 2023, 2:07 a.m. | OK | Java 8 | TESTS | 6 | 124 | 0 | ||
236588662 | ShadowBeast_13 | A | Dec. 9, 2023, 8:34 p.m. | OK | Java 8 | TESTS | 6 | 140 | 0 | ||
236567630 | Gadi | A | Dec. 9, 2023, 5:55 p.m. | OK | MS C++ 2017 | TESTS | 6 | 0 | 0 | ||
236612032 | devanshjain1712 | A | Dec. 10, 2023, 5:04 a.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236580873 | skimono | A | Dec. 9, 2023, 7:15 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236576570 | lohit.valavala | A | Dec. 9, 2023, 6:36 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236575387 | Kirill-_- | A | Dec. 9, 2023, 6:29 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236573307 | AvanSingh | A | Dec. 9, 2023, 6:19 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236566016 | codewithyogesh | A | Dec. 9, 2023, 5:51 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236562883 | PhanTom_001 | A | Dec. 9, 2023, 5:42 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | ||
236573313 | jvatsal0709 | A | Dec. 9, 2023, 6:19 p.m. | OK | PyPy 3 | TESTS | 6 | 108 | 3379200 | ||
236574316 | amitjoshi24 | A | Dec. 9, 2023, 6:24 p.m. | OK | PyPy 3 | TESTS | 6 | 124 | 3686400 | ||
236585544 | AnirudhBharatiya | A | Dec. 9, 2023, 8:08 p.m. | OK | PyPy 3 | TESTS | 6 | 171 | 4505600 | ||
236583893 | ErikUsmanov | A | Dec. 9, 2023, 7:49 p.m. | OK | PyPy 3 | TESTS | 6 | 187 | 4710400 | ||
236574131 | Paras2856 | A | Dec. 9, 2023, 6:23 p.m. | OK | PyPy 3 | TESTS | 6 | 202 | 4198400 | ||
236585138 | AS23 | A | Dec. 9, 2023, 8:03 p.m. | OK | PyPy 3 | TESTS | 6 | 218 | 4608000 | ||
236584681 | Akinator007 | A | Dec. 9, 2023, 7:58 p.m. | OK | PyPy 3 | TESTS | 6 | 264 | 5939200 | ||
236569220 | MadrasMacho | A | Dec. 9, 2023, 5:59 p.m. | OK | PyPy 3 | TESTS | 6 | 264 | 6553600 | ||
236592579 | Dert30 | A | Dec. 9, 2023, 9:18 p.m. | OK | PyPy 3-64 | TESTS | 6 | 62 | 4403200 | ||
236596097 | randombernie | A | Dec. 9, 2023, 10:23 p.m. | OK | PyPy 3-64 | TESTS | 6 | 78 | 5529600 | ||
236574556 | abhinav_ratan | A | Dec. 9, 2023, 6:25 p.m. | OK | PyPy 3-64 | TESTS | 6 | 78 | 6348800 | ||
236580316 | biomat | A | Dec. 9, 2023, 7:09 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 2150400 | ||
236593254 | rmr | A | Dec. 9, 2023, 9:29 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 3276800 | ||
236572887 | AyuAnchor | A | Dec. 9, 2023, 6:18 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 3276800 | ||
236593174 | rmr | A | Dec. 9, 2023, 9:27 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 4198400 | ||
236566686 | Honghao_Chu | A | Dec. 9, 2023, 5:53 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 4300800 | ||
236594884 | DaniilKK | A | Dec. 9, 2023, 9:59 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 8908800 | ||
236577992 | sixthcore | A | Dec. 9, 2023, 6:47 p.m. | OK | PyPy 3-64 | TESTS | 6 | 93 | 17408000 | ||
236586021 | Valec3 | A | Dec. 9, 2023, 8:14 p.m. | OK | Python 3 | TESTS | 6 | 31 | 0 | ||
236571643 | anime1_coder | A | Dec. 9, 2023, 6:04 p.m. | OK | Python 3 | TESTS | 6 | 31 | 0 | ||
236570464 | bahailu | A | Dec. 9, 2023, 6:02 p.m. | OK | Python 3 | TESTS | 6 | 31 | 0 | ||
236569150 | CMRIT25_21R01A05H0 | A | Dec. 9, 2023, 5:59 p.m. | OK | Python 3 | TESTS | 6 | 31 | 0 | ||
236566485 | Abhitesh | A | Dec. 9, 2023, 5:52 p.m. | OK | Python 3 | TESTS | 6 | 31 | 0 | ||
236567400 | deepanshuish | A | Dec. 9, 2023, 5:55 p.m. | OK | Python 3 | TESTS | 6 | 31 | 102400 | ||
236610338 | Livfo | A | Dec. 10, 2023, 4:35 a.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
236605856 | MartinHou | A | Dec. 10, 2023, 3:06 a.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
236595961 | letMeThinkPlz | A | Dec. 9, 2023, 10:20 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
236583367 | abel54 | A | Dec. 9, 2023, 7:43 p.m. | OK | Python 3 | TESTS | 6 | 46 | 0 | ||
236594941 | liut | A | Dec. 9, 2023, 10 p.m. | OK | Rust 2021 | TESTS | 6 | 0 | 409600 | ||
236569187 | erudite-. | A | Dec. 9, 2023, 5:59 p.m. | OK | Rust 2021 | TESTS | 6 | 15 | 409600 |
Back to search problems