Codeforces Round 814 (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
1719 Codeforces Round 814 (Div. 2) FINISHED False 7200 76605863 Aug. 16, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18645 ) B Mathematical Circus PROGRAMMING constructive algorithms math

B'A new entertainment has appeared in Buryatia -- a mathematical circus! The magician shows two numbers to the audience -- n and k , where n is even. Next, he takes all the integers from 1 to n , and splits them all into pairs (a, b) (each integer must be in exactly one pair) so that for each pair the integer (a + k) cdot b is divisible by 4 (note that the order of the numbers in the pair matters), or reports that, unfortunately for viewers, such a split is impossible. Burenka really likes such performances, so she asked her friend Tonya to be a magician, and also gave him the numbers n and k . Tonya is a wolf, and as you know, wolves do not perform in the circus, even in a mathematical one. Therefore, he asks you to help him. Let him know if a suitable splitting into pairs is possible, and if possible, then tell it. The first line contains one integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The following is a description of the input data sets. The single line of each test case contains two integers n and k ( 2 <= q n <= q 2 cdot 10^5 , 0 <= q k <= q 10^9 , n is even) -- the number of integers and the number being added k . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, first output the string "YES" if there is a split into pairs, and "NO" if there is none. If there is a split, then in the following frac{n}{2} lines output pairs of the split, in each line print 2 numbers -- first the integer a , then the integer b . In the first test case, splitting into pairs (1, 2) and (3, 4) is suitable, same as splitting into (1, 4) and (3, 2) . In the second test case, (1 + 0) cdot 2 = 1 cdot (2 + 0) = 2 is not divisible by 4 , so there is no partition. '...

Tutorials

Codeforces Round #814 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
168654034 charan_velaga B Aug. 17, 2022, 5:46 a.m. OK Clang++17 Diagnostics TESTS 15 686 819200
168652959 MSChandra28 B Aug. 17, 2022, 5:33 a.m. OK Clang++17 Diagnostics TESTS 15 686 819200
168639971 Reisen_ B Aug. 17, 2022, 2:15 a.m. OK Clang++20 Diagnostics TESTS 15 93 0
168611816 ruban B Aug. 16, 2022, 6:15 p.m. OK Delphi TESTS 15 61 0
168597064 SAFIN07 B Aug. 16, 2022, 4:29 p.m. OK GNU C11 TESTS 15 451 0
168646555 Dios314 B Aug. 17, 2022, 3:58 a.m. OK GNU C11 TESTS 15 452 0
168601374 samifarhan89 B Aug. 16, 2022, 4:34 p.m. OK GNU C11 TESTS 15 452 819200
168605605 _Paradox_ B Aug. 16, 2022, 5:38 p.m. OK GNU C11 TESTS 15 467 0
168595888 sanjay77 B Aug. 16, 2022, 4:27 p.m. OK GNU C11 TESTS 15 467 0
168600788 swati21568 B Aug. 16, 2022, 4:34 p.m. OK GNU C11 TESTS 15 468 0
168596573 cs21btech11020 B Aug. 16, 2022, 4:28 p.m. OK GNU C11 TESTS 15 498 819200
168598012 Abhishek_Tewatia B Aug. 16, 2022, 4:30 p.m. OK GNU C11 TESTS 15 857 0
168643988 siddhid2003 B Aug. 17, 2022, 3:18 a.m. OK GNU C++14 TESTS 15 31 0
168642876 hewanying B Aug. 17, 2022, 3:01 a.m. OK GNU C++14 TESTS 15 31 0
168644135 Skywind_1037 B Aug. 17, 2022, 3:20 a.m. OK GNU C++14 TESTS 15 31 0
168644198 Contna B Aug. 17, 2022, 3:21 a.m. OK GNU C++14 TESTS 15 31 0
168645162 HaPpY1213 B Aug. 17, 2022, 3:37 a.m. OK GNU C++14 TESTS 15 31 0
168645395 wenruxiaogou B Aug. 17, 2022, 3:40 a.m. OK GNU C++14 TESTS 15 31 0
168651755 TimmyL B Aug. 17, 2022, 5:16 a.m. OK GNU C++14 TESTS 15 31 0
168649646 apple_tyr B Aug. 17, 2022, 4:47 a.m. OK GNU C++14 TESTS 15 31 0
168649368 Dread.t B Aug. 17, 2022, 4:43 a.m. OK GNU C++14 TESTS 15 31 0
168648618 C2024XSC249 B Aug. 17, 2022, 4:31 a.m. OK GNU C++14 TESTS 15 31 0
168644384 FzArK B Aug. 17, 2022, 3:24 a.m. OK GNU C++17 TESTS 15 31 0
168643428 a_ban_don B Aug. 17, 2022, 3:10 a.m. OK GNU C++17 TESTS 15 31 0
168645639 Aging1986 B Aug. 17, 2022, 3:44 a.m. OK GNU C++17 TESTS 15 31 0
168644744 yngxwu B Aug. 17, 2022, 3:30 a.m. OK GNU C++17 TESTS 15 31 0
168643660 yngxwu B Aug. 17, 2022, 3:13 a.m. OK GNU C++17 TESTS 15 31 0
168655026 tutturushi B Aug. 17, 2022, 5:57 a.m. OK GNU C++17 TESTS 15 31 0
168654697 AJIT_KUMAR_ B Aug. 17, 2022, 5:54 a.m. OK GNU C++17 TESTS 15 31 0
168653713 uchikhaaa B Aug. 17, 2022, 5:42 a.m. OK GNU C++17 TESTS 15 31 0
168651682 Sfurvdio B Aug. 17, 2022, 5:15 a.m. OK GNU C++17 TESTS 15 31 0
168651214 bkifhr10 B Aug. 17, 2022, 5:09 a.m. OK GNU C++17 TESTS 15 31 0
168648042 komeiji_koishi514 B Aug. 17, 2022, 4:22 a.m. OK GNU C++17 (64) TESTS 15 30 0
168640695 MarkBcc168 B Aug. 17, 2022, 2:26 a.m. OK GNU C++17 (64) TESTS 15 30 0
168615034 Amank2854 B Aug. 16, 2022, 6:42 p.m. OK GNU C++17 (64) TESTS 15 30 0
168644527 Double_pipe_dream B Aug. 17, 2022, 3:26 a.m. OK GNU C++17 (64) TESTS 15 31 0
168651574 OTTFF B Aug. 17, 2022, 5:13 a.m. OK GNU C++17 (64) TESTS 15 31 0
168650337 iamone B Aug. 17, 2022, 4:56 a.m. OK GNU C++17 (64) TESTS 15 31 0
168649537 Chime B Aug. 17, 2022, 4:45 a.m. OK GNU C++17 (64) TESTS 15 31 0
168642535 xhgua B Aug. 17, 2022, 2:56 a.m. OK GNU C++17 (64) TESTS 15 31 0
168638356 baoduong2342007 B Aug. 17, 2022, 1:53 a.m. OK GNU C++17 (64) TESTS 15 31 0
168637699 Kenshin2438 B Aug. 17, 2022, 1:41 a.m. OK GNU C++17 (64) TESTS 15 31 0
168609220 AnonymousGuy12 B Aug. 16, 2022, 5:57 p.m. OK GNU C++20 (64) TESTS 15 15 0
168609256 Siddharth2EEE B Aug. 16, 2022, 5:57 p.m. OK GNU C++20 (64) TESTS 15 15 0
168610773 despair_101 B Aug. 16, 2022, 6:07 p.m. OK GNU C++20 (64) TESTS 15 15 0
168614453 amandeoli B Aug. 16, 2022, 6:36 p.m. OK GNU C++20 (64) TESTS 15 15 0
168627107 Lazy1402 B Aug. 16, 2022, 9:20 p.m. OK GNU C++20 (64) TESTS 15 15 0
168645944 chains_229 B Aug. 17, 2022, 3:49 a.m. OK GNU C++20 (64) TESTS 15 30 0
168640549 A_king B Aug. 17, 2022, 2:24 a.m. OK GNU C++20 (64) TESTS 15 30 0
168650450 smgr B Aug. 17, 2022, 4:58 a.m. OK GNU C++20 (64) TESTS 15 30 0
168651206 bhdtr B Aug. 17, 2022, 5:08 a.m. OK GNU C++20 (64) TESTS 15 30 0
168652015 shrey120 B Aug. 17, 2022, 5:20 a.m. OK GNU C++20 (64) TESTS 15 30 0
168609255 asdfghjkl_12345 B Aug. 16, 2022, 5:57 p.m. OK Java 11 TESTS 15 202 0
168610154 goyalronak3 B Aug. 16, 2022, 6:03 p.m. OK Java 11 TESTS 15 217 0
168650798 jyoti360 B Aug. 17, 2022, 5:03 a.m. OK Java 11 TESTS 15 218 0
168607186 vamshisamineni3 B Aug. 16, 2022, 5:45 p.m. OK Java 11 TESTS 15 218 0
168605052 x21svage B Aug. 16, 2022, 5:36 p.m. OK Java 11 TESTS 15 218 0
168637252 jhariharan99official B Aug. 17, 2022, 1:32 a.m. OK Java 11 TESTS 15 234 716800
168633625 aditya2024 B Aug. 17, 2022, 12:09 a.m. OK Java 11 TESTS 15 249 0
168598036 fervent_45 B Aug. 16, 2022, 4:30 p.m. OK Java 11 TESTS 15 280 0
168600629 gaju321 B Aug. 16, 2022, 4:34 p.m. OK Java 11 TESTS 15 280 6963200
168619903 satyaa_78 B Aug. 16, 2022, 7:34 p.m. OK Java 11 TESTS 15 295 15052800
168607401 harman1148 B Aug. 16, 2022, 5:46 p.m. OK Java 17 TESTS 15 326 716800
168648333 DeepSpace_85 B Aug. 17, 2022, 4:26 a.m. OK Java 17 TESTS 15 561 512000
168596104 chaosdevil B Aug. 16, 2022, 4:27 p.m. OK Java 17 TESTS 15 608 716800
168605066 apurvraj B Aug. 16, 2022, 5:36 p.m. OK Java 17 TESTS 15 624 716800
168651539 rbaliwal00 B Aug. 17, 2022, 5:13 a.m. OK Java 17 TESTS 15 638 921600
168595147 destroyer11 B Aug. 16, 2022, 4:25 p.m. OK Java 17 TESTS 15 654 716800
168606168 harman1148 B Aug. 16, 2022, 5:40 p.m. OK Java 17 TESTS 15 810 716800
168642713 ASmoon_343 B Aug. 17, 2022, 2:59 a.m. OK Java 17 TESTS 15 919 716800
168611423 sventeen1 B Aug. 16, 2022, 6:12 p.m. OK Java 17 TESTS 15 919 1433600
168642365 Sussykin B Aug. 17, 2022, 2:54 a.m. OK Java 8 TESTS 15 124 0
168598318 abdoad941 B Aug. 16, 2022, 4:31 p.m. OK Java 8 TESTS 15 139 0
168636110 swarup_312 B Aug. 17, 2022, 1:10 a.m. OK Java 8 TESTS 15 140 0
168619217 Youssef1Shawky B Aug. 16, 2022, 7:26 p.m. OK Java 8 TESTS 15 140 0
168616840 ahmedTarek28 B Aug. 16, 2022, 6:59 p.m. OK Java 8 TESTS 15 140 0
168652228 Ariful3671 B Aug. 17, 2022, 5:23 a.m. OK Java 8 TESTS 15 155 0
168644516 chaiku B Aug. 17, 2022, 3:26 a.m. OK Java 8 TESTS 15 156 0
168598016 Yash_2003 B Aug. 16, 2022, 4:30 p.m. OK Java 8 TESTS 15 218 2355200
168605459 Kaldaruly B Aug. 16, 2022, 5:37 p.m. OK Java 8 TESTS 15 218 2457600
168600398 This_is_Rish B Aug. 16, 2022, 4:33 p.m. OK Java 8 TESTS 15 249 2457600
168652281 WildTan B Aug. 17, 2022, 5:24 a.m. OK Kotlin 1.5 TESTS 15 935 0
168644274 wjfsdbd B Aug. 17, 2022, 3:22 a.m. OK MS C++ 2017 TESTS 15 46 0
168643891 yhnoh8623 B Aug. 17, 2022, 3:16 a.m. OK MS C++ 2017 TESTS 15 124 0
168636448 cjh970422 B Aug. 17, 2022, 1:17 a.m. OK MS C++ 2017 TESTS 15 140 0
168605714 PyDi_MEHT B Aug. 16, 2022, 5:38 p.m. OK MS C++ 2017 TESTS 15 140 1843200
168636571 Agateth B Aug. 17, 2022, 1:19 a.m. OK MS C++ 2017 TESTS 15 156 0
168607445 10ne19 B Aug. 16, 2022, 5:46 p.m. OK MS C++ 2017 TESTS 15 187 3686400
168655295 tjdvyzl12345 B Aug. 17, 2022, 6 a.m. OK MS C++ 2017 TESTS 15 202 2048000
168654701 Altaires B Aug. 17, 2022, 5:54 a.m. OK MS C++ 2017 TESTS 15 452 0
168614696 Nosov_Vovanus2022 B Aug. 16, 2022, 6:38 p.m. OK MS C++ 2017 TESTS 15 452 2457600
168594812 burrito1510 B Aug. 16, 2022, 4:25 p.m. OK MS C++ 2017 TESTS 15 482 0
168630898 XYShaoKang B Aug. 16, 2022, 10:42 p.m. OK Node.js TESTS 15 109 19251200
168631587 WalrusRamen21 B Aug. 16, 2022, 11:04 p.m. OK PHP TESTS 15 342 16793600
168605324 1_2_3_4_5_9 B Aug. 16, 2022, 5:37 p.m. OK PyPy 2 TESTS 15 186 9420800
168617490 YashNandwana B Aug. 16, 2022, 7:06 p.m. OK PyPy 3 TESTS 15 280 9420800
168617191 grawlixes B Aug. 16, 2022, 7:03 p.m. OK PyPy 3 TESTS 15 358 17408000
168614649 shehebe B Aug. 16, 2022, 6:38 p.m. OK PyPy 3 TESTS 15 358 19763200
168628665 Homeo B Aug. 16, 2022, 9:49 p.m. OK PyPy 3 TESTS 15 374 18636800
168640404 devveZE B Aug. 17, 2022, 2:21 a.m. OK PyPy 3 TESTS 15 483 10035200
168605427 aayush_chhabra B Aug. 16, 2022, 5:37 p.m. OK PyPy 3 TESTS 15 545 9728000
168619184 riroan B Aug. 16, 2022, 7:25 p.m. OK PyPy 3-64 TESTS 15 155 19046400
168618361 Pandeyjiii8250 B Aug. 16, 2022, 7:16 p.m. OK PyPy 3-64 TESTS 15 171 9625600
168649233 zhenfisher B Aug. 17, 2022, 4:40 a.m. OK PyPy 3-64 TESTS 15 186 11468800
168652633 hsh8086 B Aug. 17, 2022, 5:29 a.m. OK PyPy 3-64 TESTS 15 186 21401600
168606445 hash1023 B Aug. 16, 2022, 5:42 p.m. OK PyPy 3-64 TESTS 15 187 10547200
168644951 Youarenotgood B Aug. 17, 2022, 3:33 a.m. OK PyPy 3-64 TESTS 15 187 22835200
168641796 CRY_ B Aug. 17, 2022, 2:44 a.m. OK PyPy 3-64 TESTS 15 217 23449600
168654015 shubh1815 B Aug. 17, 2022, 5:46 a.m. OK PyPy 3-64 TESTS 15 218 11878400
168613402 mayank35 B Aug. 16, 2022, 6:27 p.m. OK PyPy 3-64 TESTS 15 233 9523200
168606811 biglunchdude B Aug. 16, 2022, 5:43 p.m. OK PyPy 3-64 TESTS 15 248 12083200
168620091 multi21 B Aug. 16, 2022, 7:36 p.m. OK Python 3 TESTS 15 296 5632000
168607669 eugalt B Aug. 16, 2022, 5:48 p.m. OK Python 3 TESTS 15 296 5632000
168596340 eugalt B Aug. 16, 2022, 4:27 p.m. OK Python 3 TESTS 15 312 5632000
168615662 Rajesh_Kaipa B Aug. 16, 2022, 6:47 p.m. OK Python 3 TESTS 15 358 102400
168632126 Jvaeyhcd B Aug. 16, 2022, 11:27 p.m. OK Python 3 TESTS 15 358 8908800
168641181 chemistry_guy B Aug. 17, 2022, 2:34 a.m. OK Python 3 TESTS 15 374 102400
168626475 prathamnagaria B Aug. 16, 2022, 9:08 p.m. OK Python 3 TESTS 15 374 102400
168614334 ksvd1234 B Aug. 16, 2022, 6:35 p.m. OK Python 3 TESTS 15 374 102400
168614044 207r1a1216 B Aug. 16, 2022, 6:33 p.m. OK Python 3 TESTS 15 374 102400
168598607 amitchaurasiya10279 B Aug. 16, 2022, 4:31 p.m. OK Python 3 TESTS 15 374 102400
168596867 Hyrulia B Aug. 16, 2022, 4:28 p.m. OK Rust 2021 TESTS 15 30 3174400

remove filters

Back to search problems