Codeforces Round 921 (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
1924 Codeforces Round 921 (Div. 1) FINISHED False 7200 30813263 Jan. 27, 2024, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1191 ) C Fractal Origami PROGRAMMING combinatorics geometry math matrices

B'You have a square piece of paper with a side length equal to 1 unit. In one operation, you fold each corner of the square to the center of the paper, thus forming another square with a side length equal to dfrac{1}{ sqrt{2}} units. By taking this square as a new square, you do the operation again and repeat this process a total of N times. After performing the set of operations, you open the paper with the same side up you started with and see some crease lines on it. Every crease line is one of two types: a mountain or a valley. A mountain is when the paper folds outward, and a valley is when the paper folds inward. You calculate the sum of the length of all mountain crease lines on the paper and call it M . Similarly, you calculate for valley crease lines and call it V . You want to find the value of dfrac{M}{V} . It can be proved that this value can be represented in the form of A + B sqrt{2} , where A and B are rational numbers. Let this B be represented as an irreducible fraction dfrac{p}{q} , your task is to print p*inv(q) modulo 999 ,999 ,893 (note the unusual modulo), where inv(q) is the modular inverse of q . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 10^4 ). Description of the test cases follows. The only line of each test case contains an integer N ( 1 <= q N <= q 10^9 ), the number of operations you perform on the square paper. For each test case, print on a new line the required answer. The blue lines in the given figures represent mountain crease lines, and the green lines represent valley crease lines. '...

Tutorials

Codeforces Round 921 (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
243593163 hos.lyric C Jan. 27, 2024, 3:16 p.m. OK D TESTS 21 46 1945600
243688162 chro4896 C Jan. 27, 2024, 10:53 p.m. OK GNU C11 TESTS 21 93 307200
243651259 Potassium C Jan. 27, 2024, 4:36 p.m. OK GNU C++17 TESTS 21 30 0
243687809 nishkarsh C Jan. 27, 2024, 10:45 p.m. OK GNU C++17 TESTS 21 31 0
243675154 AHappyPotato C Jan. 27, 2024, 7:56 p.m. OK GNU C++17 TESTS 21 31 0
243668839 FzArK C Jan. 27, 2024, 7:07 p.m. OK GNU C++17 TESTS 21 31 0
243667433 MCPlayer542 C Jan. 27, 2024, 6:57 p.m. OK GNU C++17 TESTS 21 31 0
243650450 Mtaylor C Jan. 27, 2024, 4:35 p.m. OK GNU C++17 TESTS 21 31 0
243650171 cfhj C Jan. 27, 2024, 4:34 p.m. OK GNU C++17 TESTS 21 31 0
243699671 hht2005 C Jan. 28, 2024, 3:04 a.m. OK GNU C++17 TESTS 21 31 0
243697217 llzer C Jan. 28, 2024, 2:24 a.m. OK GNU C++17 TESTS 21 31 0
243693570 dancho C Jan. 28, 2024, 1:16 a.m. OK GNU C++17 TESTS 21 31 0
243625321 Rubikun C Jan. 27, 2024, 3:54 p.m. OK GNU C++17 (64) TESTS 21 15 0
243614897 Rebelz C Jan. 27, 2024, 3:39 p.m. OK GNU C++17 (64) TESTS 21 15 0
243607146 Geothermal C Jan. 27, 2024, 3:30 p.m. OK GNU C++17 (64) TESTS 21 15 0
243647937 tabr C Jan. 27, 2024, 4:30 p.m. OK GNU C++17 (64) TESTS 21 15 0
243612412 KaguyaH C Jan. 27, 2024, 3:36 p.m. OK GNU C++17 (64) TESTS 21 30 0
243669735 MentalAbility C Jan. 27, 2024, 7:15 p.m. OK GNU C++17 (64) TESTS 21 30 0
243712914 maomao90 C Jan. 28, 2024, 5:50 a.m. OK GNU C++17 (64) TESTS 21 31 0
243705531 zjy2008 C Jan. 28, 2024, 4:25 a.m. OK GNU C++17 (64) TESTS 21 31 0
243705250 ztlh C Jan. 28, 2024, 4:21 a.m. OK GNU C++17 (64) TESTS 21 31 0
243698291 orzdevinwang C Jan. 28, 2024, 2:41 a.m. OK GNU C++17 (64) TESTS 21 31 0
243664540 nnv-nick C Jan. 27, 2024, 6:41 p.m. OK GNU C++20 (64) TESTS 21 15 0
243699806 Lavine C Jan. 28, 2024, 3:06 a.m. OK GNU C++20 (64) TESTS 21 15 0
243695727 your_submissions_ C Jan. 28, 2024, 1:59 a.m. OK GNU C++20 (64) TESTS 21 15 0
243694357 Fysty C Jan. 28, 2024, 1:33 a.m. OK GNU C++20 (64) TESTS 21 15 0
243673190 Wobert C Jan. 27, 2024, 7:39 p.m. OK GNU C++20 (64) TESTS 21 15 0
243672862 BroScientist C Jan. 27, 2024, 7:37 p.m. OK GNU C++20 (64) TESTS 21 15 0
243668392 snowy2002 C Jan. 27, 2024, 7:03 p.m. OK GNU C++20 (64) TESTS 21 15 0
243667437 oiocha C Jan. 27, 2024, 6:57 p.m. OK GNU C++20 (64) TESTS 21 15 0
243666166 bachbeo2007 C Jan. 27, 2024, 6:50 p.m. OK GNU C++20 (64) TESTS 21 15 0
243664791 JettyOller C Jan. 27, 2024, 6:43 p.m. OK GNU C++20 (64) TESTS 21 15 0
243682931 arvindf232 C Jan. 27, 2024, 9:20 p.m. OK Kotlin 1.9 TESTS 21 171 0
243682162 arvindf232 C Jan. 27, 2024, 9:10 p.m. OK Kotlin 1.9 TESTS 21 171 0
243613397 FastFreeTask C Jan. 27, 2024, 3:38 p.m. OK Kotlin 1.9 TESTS 21 171 0
243683541 arvindf232 C Jan. 27, 2024, 9:28 p.m. OK Kotlin 1.9 TESTS 21 186 0
243622933 Tlatoani C Jan. 27, 2024, 3:50 p.m. OK Kotlin 1.9 TESTS 21 234 0
243620529 byurak C Jan. 27, 2024, 3:47 p.m. OK PyPy 3-64 TESTS 21 187 7270400
243644320 toam C Jan. 27, 2024, 4:23 p.m. OK PyPy 3-64 TESTS 21 187 9830400
243625264 alxwen711 C Jan. 27, 2024, 3:54 p.m. OK PyPy 3-64 TESTS 21 202 8294400
243599233 Maruzensky C Jan. 27, 2024, 3:21 p.m. OK PyPy 3-64 TESTS 21 218 10035200
243694870 Little_Sheep_Yawn C Jan. 28, 2024, 1:42 a.m. OK PyPy 3-64 TESTS 21 218 11366400
243624663 chinerist C Jan. 27, 2024, 3:53 p.m. OK PyPy 3-64 TESTS 21 249 10342400
243630568 Jorke C Jan. 27, 2024, 4:01 p.m. OK PyPy 3-64 TESTS 21 311 7782400
243650879 rikein12 C Jan. 27, 2024, 4:35 p.m. OK PyPy 3-64 TESTS 21 373 10137600
243666600 hxu10 C Jan. 27, 2024, 6:52 p.m. OK PyPy 3-64 TESTS 21 404 7680000
243587605 crazyilian C Jan. 27, 2024, 3:10 p.m. OK PyPy 3-64 TESTS 21 405 9932800
243649641 Jimanbanashi C Jan. 27, 2024, 4:33 p.m. OK Python 2 TESTS 21 280 0
243620981 sansen C Jan. 27, 2024, 3:48 p.m. OK Rust 2021 TESTS 21 30 307200

remove filters

Back to search problems