Codeforces Round 901 (Div. 1)

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
1874 Codeforces Round 901 (Div. 1) FINISHED False 10800 41095463 Sept. 30, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1179 ) B Jellyfish and Math PROGRAMMING bitmasks dp graphs shortest paths

B'Jellyfish is given the non-negative integers a , b , c , d and m . Initially (x,y)=(a,b) . Jellyfish wants to do several operations so that (x,y)=(c,d) . For each operation, she can do one of the following: Here & denotes the bitwise AND operation, | denotes the bitwise OR operation and oplus denotes the bitwise XOR operation. Now Jellyfish asks you for the minimum number of operations such that (x,y)=(c,d) . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 10^5 ). The description of the test cases follows. The only line of each test case contains five integers, a , b , c , d and m ( 0 <= q a, b, c, d, m < 2^{30} ). For each test case, output a single integer -- the minimum number of operations. If this cannot be achieved, output -1 instead. In the first test case, we can do the operation y = x oplus y . In the second test case, it is not possible to change (x,y)=(1,2) using any sequence of operations. In the third test case, we can do the operation x = x , & ,y followed by the operation y = y oplus m . '...

Tutorials

Codeforces Round 901 (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
225960531 hos.lyric B Sept. 30, 2023, 2:59 p.m. OK D TESTS 30 358 6144000
225982876 Gassa B Sept. 30, 2023, 3:30 p.m. OK D TESTS 30 1388 4403200
226111008 WonderMouse B Oct. 1, 2023, 5:31 a.m. OK GNU C++14 TESTS 31 124 1740800
226041940 mwzqwq B Sept. 30, 2023, 4:43 p.m. OK GNU C++14 TESTS 30 139 16793600
226110632 WonderMouse B Oct. 1, 2023, 5:27 a.m. OK GNU C++14 TESTS 31 140 1740800
226071702 al3xstr33t B Sept. 30, 2023, 6:52 p.m. OK GNU C++14 TESTS 30 155 27648000
226097675 dongyc666 B Oct. 1, 2023, 2:24 a.m. OK GNU C++14 TESTS 31 155 67481600
226039413 Imdie B Sept. 30, 2023, 4:37 p.m. OK GNU C++14 TESTS 30 156 5222400
225985158 cfhj B Sept. 30, 2023, 3:33 p.m. OK GNU C++14 TESTS 30 156 67481600
225980868 sbzhangjianjun B Sept. 30, 2023, 3:27 p.m. OK GNU C++14 TESTS 30 171 6246400
225994044 al3xstr33t B Sept. 30, 2023, 3:47 p.m. OK GNU C++14 TESTS 30 171 27852800
226069101 MCPlayer542 B Sept. 30, 2023, 6:34 p.m. OK GNU C++14 TESTS 30 171 67276800
226021276 xioxio B Sept. 30, 2023, 4:19 p.m. OK GNU C++17 TESTS 30 140 3276800
226091220 timreizin B Sept. 30, 2023, 11:54 p.m. OK GNU C++17 TESTS 30 155 1740800
226061373 dahoon46 B Sept. 30, 2023, 5:31 p.m. OK GNU C++17 TESTS 30 156 307200
226037810 EternalAlexander B Sept. 30, 2023, 4:34 p.m. OK GNU C++17 TESTS 30 156 1843200
226096693 hayley17 B Oct. 1, 2023, 2:08 a.m. OK GNU C++17 TESTS 31 156 2048000
226074211 zlc1114_v2 B Sept. 30, 2023, 7:12 p.m. OK GNU C++17 TESTS 30 156 8499200
225998289 gs17005 B Sept. 30, 2023, 3:54 p.m. OK GNU C++17 TESTS 30 171 67276800
225966923 Nachia B Sept. 30, 2023, 3:07 p.m. OK GNU C++17 TESTS 30 186 8908800
226025784 myst-6 B Sept. 30, 2023, 4:28 p.m. OK GNU C++17 TESTS 30 187 1126400
226039966 JeffreyLC B Sept. 30, 2023, 4:39 p.m. OK GNU C++17 TESTS 30 202 1740800
226105385 qq_orange B Oct. 1, 2023, 4:20 a.m. OK GNU C++17 (64) TESTS 31 46 6758400
226105191 ITworker_Z B Oct. 1, 2023, 4:18 a.m. OK GNU C++17 (64) TESTS 31 61 10035200
225979616 torisasami B Sept. 30, 2023, 3:25 p.m. OK GNU C++17 (64) TESTS 30 140 1843200
226084891 wangjunchao B Sept. 30, 2023, 9:23 p.m. OK GNU C++17 (64) TESTS 30 155 67276800
226001761 chinerist B Sept. 30, 2023, 4 p.m. OK GNU C++17 (64) TESTS 30 156 1433600
225990332 YocyCraft B Sept. 30, 2023, 3:41 p.m. OK GNU C++17 (64) TESTS 30 156 68812800
226040039 ooOAM B Sept. 30, 2023, 4:39 p.m. OK GNU C++17 (64) TESTS 30 171 67276800
226040932 Wielomian B Sept. 30, 2023, 4:41 p.m. OK GNU C++17 (64) TESTS 30 171 68915200
225981051 Rubikun B Sept. 30, 2023, 3:27 p.m. OK GNU C++17 (64) TESTS 30 202 512000
226053685 qq_orange B Sept. 30, 2023, 5:12 p.m. OK GNU C++17 (64) TESTS 30 202 2560000
226008093 Sakuyalove B Sept. 30, 2023, 4:11 p.m. OK GNU C++20 (64) TESTS 30 31 9420800
226090257 magnus.hegdahl B Sept. 30, 2023, 11:25 p.m. OK GNU C++20 (64) TESTS 30 77 68198400
226061611 20333333333 B Sept. 30, 2023, 5:32 p.m. OK GNU C++20 (64) TESTS 30 78 5324800
225998867 jiangbowen B Sept. 30, 2023, 3:55 p.m. OK GNU C++20 (64) TESTS 30 78 11059200
226019054 Sulfox B Sept. 30, 2023, 4:14 p.m. OK GNU C++20 (64) TESTS 30 93 5632000
226087428 _akasi B Sept. 30, 2023, 10:12 p.m. OK GNU C++20 (64) TESTS 30 93 8396800
226090151 magnus.hegdahl B Sept. 30, 2023, 11:21 p.m. OK GNU C++20 (64) TESTS 30 93 68198400
225983118 BalintR B Sept. 30, 2023, 3:30 p.m. OK GNU C++20 (64) TESTS 30 108 512000
225965106 ecnerwala B Sept. 30, 2023, 3:05 p.m. OK GNU C++20 (64) TESTS 30 108 2355200
226040015 darkkcyan B Sept. 30, 2023, 4:39 p.m. OK GNU C++20 (64) TESTS 30 109 307200
225994672 FastFreeTask B Sept. 30, 2023, 3:48 p.m. OK Kotlin 1.6 TESTS 30 482 9523200
225993894 bcollet B Sept. 30, 2023, 3:46 p.m. OK PyPy 2 TESTS 30 1591 23552000
226087311 bronze_coder B Sept. 30, 2023, 10:10 p.m. OK PyPy 3-64 TESTS 30 342 13619200
226088524 bronze_coder B Sept. 30, 2023, 10:37 p.m. OK PyPy 3-64 TESTS 30 390 13619200
226001347 misorin B Sept. 30, 2023, 3:59 p.m. OK PyPy 3-64 TESTS 30 561 25702400
226091619 magnus.hegdahl B Oct. 1, 2023, 12:07 a.m. OK PyPy 3-64 TESTS 30 1372 259584000
225977846 sansen B Sept. 30, 2023, 3:22 p.m. OK Rust 2021 TESTS 30 186 14028800
225999131 WaterColor2037 B Sept. 30, 2023, 3:55 p.m. OK Rust 2021 TESTS 30 935 78540800

remove filters

Back to search problems