Codeforces Round 1016 (Div. 3)

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
2093 Codeforces Round 1016 (Div. 3) FINISHED False 8100 32282723 April 8, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 12229 ) D Skibidi Table PROGRAMMING bitmasks implementation

Vadim loves filling square tables with integers. But today he came up with a way to do it for fun! Let's take, for example, a table of size (2 \times 2), with rows numbered from top to bottom and columns numbered from left to right. We place (1) in the top left cell, (2) in the bottom right, (3) in the bottom left, and (4) in the top right. That's all he needs for fun! Fortunately for Vadim, he has a table of size (2^n \times 2^n). He plans to fill it with integers from (1) to (2^{2n}) in ascending order. To fill such a large table, Vadim will divide it into (4) equal square tables, filling the top left one first, then the bottom right one, followed by the bottom left one, and finally the top right one. Each smaller table will be divided into even smaller ones as he fills them until he reaches tables of size (2 \times 2), which he will fill in the order described above. Now Vadim is eager to start filling the table, but he has (q) questions of two types: what number will be in the cell at the (x)-th row and (y)-th column; in which cell coordinates will the number (d) be located. Each test consists of several sets of input data. The first line contains a single integer (t) ((1 \leq t \leq 10)) — the number of sets of input data. The following lines describe the input data sets. In the first line of each data set, there is an integer (n), describing the size of the table ((1 \le n \le 30)). In the second line of each data set, there is an integer (q) — the number of questions ((1 \le q \le 20\,000)). In the following (q) lines of each data set, the questions are described in the following formats: -> x y — What number will be in the cell ((1 \le x, y \le 2^n)); <- d — In which cell coordinates will the number ((1 \le d \le 2^{2n})) be located. It is guaranteed that the sum of (q) over all test cases does not exceed (20\,000). Output the answers to each questio

Tutorials

Codeforces Round 1016 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
314802005 Anastasiya_Andreevna D April 9, 2025, 7:05 p.m. OK C# 10 TESTS 9 109 3788800
314821073 AliRagab313 D April 10, 2025, 1:38 a.m. OK C# 10 TESTS 9 124 3584000
314824619 54mengxin D April 10, 2025, 3:08 a.m. OK C++17 (GCC 7-32) TESTS 9 61 102400
314833678 killua90264 D April 10, 2025, 5:30 a.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314833619 piyush7873 D April 10, 2025, 5:30 a.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314820317 xf519ffi77 D April 10, 2025, 1:17 a.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314819971 iastvv11k1nb D April 10, 2025, 1:08 a.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314812768 KrustyKrabs D April 9, 2025, 9:35 p.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314810544 bloodfang D April 9, 2025, 8:51 p.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314803938 siddiqui_Rashid D April 9, 2025, 7:28 p.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314801475 maximaxi245 D April 9, 2025, 7 p.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314792656 amber69 D April 9, 2025, 5:37 p.m. OK C++17 (GCC 7-32) TESTS 9 62 0
314822722 Prady D April 10, 2025, 2:22 a.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314817716 shuoxuanli D April 9, 2025, 11:56 p.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314817290 HeReWeGoAgAiN123 D April 9, 2025, 11:40 p.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314814650 kENN3N D April 9, 2025, 10:20 p.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314802010 limif D April 9, 2025, 7:06 p.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314761765 nob_lz D April 9, 2025, 1:37 p.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314749610 BLUEJOKE D April 9, 2025, 12:13 p.m. OK C++20 (GCC 13-64) TESTS 9 46 0
314802476 InvisibleOne D April 9, 2025, 7:11 p.m. OK C++20 (GCC 13-64) TESTS 9 46 102400
314775154 DarkSun D April 9, 2025, 3:16 p.m. OK C++20 (GCC 13-64) TESTS 9 46 102400
314770060 SysTaker D April 9, 2025, 2:36 p.m. OK C++20 (GCC 13-64) TESTS 9 46 102400
314817156 Helpvasia D April 9, 2025, 11:35 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
314789489 aymenbenammar890 D April 9, 2025, 5:11 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
314787913 wlwhonest D April 9, 2025, 4:58 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
314757601 vishwas_37 D April 9, 2025, 1:07 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 0
314798621 whoisYASH D April 9, 2025, 6:30 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 102400
314790987 mahfuzswe D April 9, 2025, 5:24 p.m. OK C++23 (GCC 14-64, msys2) TESTS 9 46 102400
314833091 Kris_24 D April 10, 2025, 5:23 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 61 0
314829781 iLna D April 10, 2025, 4:41 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 61 0
314827494 OTTFF D April 10, 2025, 4:05 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 61 0
314819561 lfx-9877 D April 10, 2025, 12:56 a.m. OK C++23 (GCC 14-64, msys2) TESTS 9 61 0
314836538 ahmedafeef D April 10, 2025, 6:03 a.m. OK GNU C11 TESTS 9 155 102400
314835233 ahmedafeef D April 10, 2025, 5:49 a.m. OK GNU C11 TESTS 9 155 102400
314805271 Light-L D April 9, 2025, 7:44 p.m. OK GNU C11 TESTS 9 155 102400
314782662 Anninda D April 9, 2025, 4:22 p.m. OK GNU C11 TESTS 9 156 102400
314824744 cpp10 D April 10, 2025, 3:11 a.m. OK Java 21 TESTS 9 280 921600
314786402 harshnshah123 D April 9, 2025, 4:46 p.m. OK Java 21 TESTS 9 296 921600
314828651 naveencf25 D April 10, 2025, 4:25 a.m. OK Java 21 TESTS 9 312 1024000
314804179 t_112233 D April 9, 2025, 7:31 p.m. OK Java 21 TESTS 9 327 921600
314824790 cpp10 D April 10, 2025, 3:13 a.m. OK Java 21 TESTS 9 327 1638400
314802521 Shashwat135 D April 9, 2025, 7:12 p.m. OK Java 21 TESTS 9 405 1536000
314822674 mlinear D April 10, 2025, 2:21 a.m. OK Java 21 TESTS 9 405 1638400
314762011 ankitraj_129 D April 9, 2025, 1:39 p.m. OK Java 21 TESTS 9 421 921600
314794229 PlayDate D April 9, 2025, 5:51 p.m. OK Java 21 TESTS 9 421 1433600
314788859 chay10ya D April 9, 2025, 5:06 p.m. OK Java 21 TESTS 9 436 1433600
314798750 WrongAnswerOnTestCase2 D April 9, 2025, 6:31 p.m. OK Java 8 TESTS 9 171 0
314773611 venisha_kalola D April 9, 2025, 3:04 p.m. OK Java 8 TESTS 9 328 0
314809477 abhayrajnegi0416 D April 9, 2025, 8:33 p.m. OK Java 8 TESTS 9 343 0
314815724 kingcabrams D April 9, 2025, 10:50 p.m. OK Kotlin 1.9 TESTS 9 249 0
314799360 Smrn D April 9, 2025, 6:37 p.m. OK PyPy 3 TESTS 9 343 10444800
314802975 gardengnome D April 9, 2025, 7:18 p.m. OK PyPy 3-64 TESTS 9 155 7065600
314770879 hiit146 D April 9, 2025, 2:43 p.m. OK PyPy 3-64 TESTS 9 234 8806400
314817232 DesperadoX D April 9, 2025, 11:38 p.m. OK PyPy 3-64 TESTS 9 264 7577600
314834995 minuki646 D April 10, 2025, 5:46 a.m. OK PyPy 3-64 TESTS 9 280 8499200
314809472 porkBarrel D April 9, 2025, 8:33 p.m. OK PyPy 3-64 TESTS 9 311 8396800
314742872 Aryanwastaken D April 9, 2025, 11:27 a.m. OK PyPy 3-64 TESTS 9 311 8499200
314736444 gumeng0314 D April 9, 2025, 10:41 a.m. OK PyPy 3-64 TESTS 9 311 8806400
314742524 txy001 D April 9, 2025, 11:24 a.m. OK PyPy 3-64 TESTS 9 312 8601600
314756433 hirose2020 D April 9, 2025, 12:59 p.m. OK PyPy 3-64 TESTS 9 328 8294400
314813877 Koschei D April 9, 2025, 9:59 p.m. OK PyPy 3-64 TESTS 9 436 8908800
314810513 KarrQwq239 D April 9, 2025, 8:50 p.m. OK Python 3 TESTS 9 327 614400
314790623 shaomai D April 9, 2025, 5:21 p.m. OK Python 3 TESTS 9 359 614400
314755325 kon27 D April 9, 2025, 12:52 p.m. OK Python 3 TESTS 9 374 512000
314772538 El-Qadi D April 9, 2025, 2:55 p.m. OK Python 3 TESTS 9 453 307200
314813239 lxflk D April 9, 2025, 9:45 p.m. OK Python 3 TESTS 9 484 409600
314825454 vietz22 D April 10, 2025, 3:27 a.m. OK Python 3 TESTS 9 515 614400
314742907 Bhavya_24 D April 9, 2025, 11:27 a.m. OK Python 3 TESTS 9 796 819200
314763384 AmiyaBot D April 9, 2025, 1:48 p.m. OK Rust 2021 TESTS 9 46 102400
314821883 garuda0 D April 10, 2025, 2:01 a.m. OK Rust 2021 TESTS 9 93 102400
314755127 AmiyaBot D April 9, 2025, 12:51 p.m. OK Rust 2021 TESTS 9 109 102400
314825293 silicalet D April 10, 2025, 3:23 a.m. OK Rust 2021 TESTS 9 202 102400

remove filters

Back to search problems