Codeforces Round 506 (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
1029 Codeforces Round 506 (Div. 3) FINISHED False 7200 202403423 Aug. 24, 2018, 2:50 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2626 ) F Multicolored Markers PROGRAMMING binary search brute force math number theory 2100

B"There is an infinite board of square tiles. Initially all tiles are white. Vova has a red marker and a blue marker. Red marker can color a tiles. Blue marker can color b tiles. If some tile isn't white then you can't use marker of any color on it. Each marker must be drained completely, so at the end there should be exactly a red tiles and exactly b blue tiles across the board. Vova wants to color such a set of tiles that: Here are some examples of correct colorings: Here are some examples of incorrect colorings: Among all correct colorings Vova wants to choose the one with the minimal perimeter. What is the minimal perimeter Vova can obtain? It is guaranteed that there exists at least one correct coloring. A single line contains two integers a and b ( 1 <= a, b <= 10^{14} ) -- the number of tiles red marker should color and the number of tiles blue marker should color, respectively. Print a single integer -- the minimal perimeter of a colored rectangle Vova can obtain by coloring exactly a tiles red and exactly b tiles blue. It is guaranteed that there exists at least one correct coloring. The first four examples correspond to the first picture of the statement. Note that for there exist multiple correct colorings for all of the examples. In the first example you can also make a rectangle with sides 1 and 8 , though its perimeter will be 18 which is greater than 8 . In the second example you can make the same resulting rectangle with sides 3 and 4 , but red tiles will form the rectangle with sides 1 and 3 and blue tiles will form the rectangle with sides 3 and 3 . "...

Tutorials

Codeforces Round #506 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42761206 vjudge3 F Sept. 11, 2018, 10:43 a.m. OK Clang++17 Diagnostics TESTS 48 561 11468800 2100
44080416 vjudge2 F Oct. 10, 2018, 2:49 p.m. OK Clang++17 Diagnostics TESTS 48 1699 0 2100
42274143 despair F Aug. 30, 2018, 10:14 a.m. OK D TESTS 48 467 4198400 2100
42303526 cpy F Aug. 31, 2018, 9:26 a.m. OK D TESTS 48 670 4198400 2100
42424729 cpy F Sept. 3, 2018, 12:08 p.m. OK D TESTS 48 733 4198400 2100
42132306 ruban F Aug. 26, 2018, 7:08 p.m. OK FPC TESTS 48 1699 80281600 2100
42311995 xpirep F Aug. 31, 2018, 2:53 p.m. OK GNU C TESTS 48 405 7987200 2100
42240968 ziliuziliu F Aug. 29, 2018, 12:34 p.m. OK GNU C++ TESTS 48 280 6451200 2100
42113373 Silver-Water F Aug. 26, 2018, 7:53 a.m. OK GNU C++ TESTS 48 295 409600 2100
42125223 SCircokw F Aug. 26, 2018, 2:44 p.m. OK GNU C++ TESTS 48 296 80179200 2100
42360384 Scut82 F Sept. 2, 2018, 11:32 a.m. OK GNU C++ TESTS 48 312 0 2100
42240660 bnc1010 F Aug. 29, 2018, 12:24 p.m. OK GNU C++ TESTS 48 312 0 2100
42229964 luogu_bot1 F Aug. 29, 2018, 6:02 a.m. OK GNU C++ TESTS 48 312 0 2100
42225050 BILLZHOU F Aug. 29, 2018, 1:37 a.m. OK GNU C++ TESTS 48 312 48128000 2100
42108035 yinwuxiao F Aug. 26, 2018, 3:11 a.m. OK GNU C++ TESTS 48 312 96153600 2100
42445821 luogu_bot4 F Sept. 4, 2018, 3:08 a.m. OK GNU C++ TESTS 48 327 0 2100
42353262 Scut82 F Sept. 2, 2018, 7 a.m. OK GNU C++ TESTS 48 327 512000 2100
49652549 vjudge4 F Feb. 9, 2019, 8:21 a.m. OK GNU C11 TESTS 48 217 160358400 2100
44115976 luogu_bot3 F Oct. 11, 2018, 2:11 p.m. OK GNU C11 TESTS 48 654 0 2100
44080390 luogu_bot5 F Oct. 10, 2018, 2:48 p.m. OK GNU C11 TESTS 48 951 0 2100
66010230 vjudge2 F Nov. 30, 2019, 1:58 a.m. OK GNU C++11 TESTS 48 202 0 2100
50782756 vjudge1 F March 4, 2019, 12:06 p.m. OK GNU C++11 TESTS 48 217 0 2100
59954188 nwpu2018302329 F Sept. 3, 2019, 3:33 p.m. OK GNU C++11 TESTS 48 218 409600 2100
50768127 vjudge2 F March 4, 2019, 1:04 a.m. OK GNU C++11 TESTS 48 218 512000 2100
47484327 cheetose F Dec. 25, 2018, 7:37 a.m. OK GNU C++11 TESTS 48 218 1024000 2100
64661908 bartek95 F Nov. 10, 2019, 9:33 p.m. OK GNU C++11 TESTS 48 218 1638400 2100
51757882 Romed F March 23, 2019, 12:22 p.m. OK GNU C++11 TESTS 48 218 3276800 2100
44163516 dknguyen176 F Oct. 11, 2018, 10:17 p.m. OK GNU C++11 TESTS 48 218 160358400 2100
44163252 dknguyen176 F Oct. 11, 2018, 10:02 p.m. OK GNU C++11 TESTS 48 218 168550400 2100
50773739 ltr_bless F March 4, 2019, 6:58 a.m. OK GNU C++11 TESTS 48 233 512000 2100
61686829 pootis F Oct. 2, 2019, 4:13 a.m. OK GNU C++14 TESTS 48 93 8089600 2100
44223778 Huvok F Oct. 12, 2018, 6:26 p.m. OK GNU C++14 TESTS 48 109 716800 2100
50582800 vjudge1 F Feb. 27, 2019, 11:29 p.m. OK GNU C++14 TESTS 48 124 716800 2100
54016221 Sait2000 F May 12, 2019, 6:52 a.m. OK GNU C++14 TESTS 48 171 1126400 2100
52477890 JYILY_xiaoxiong F April 8, 2019, 1:50 a.m. OK GNU C++14 TESTS 48 187 0 2100
50783452 MengXiaoLong F March 4, 2019, 12:25 p.m. OK GNU C++14 TESTS 48 187 0 2100
69687580 DMCS F Jan. 28, 2020, 5:31 p.m. OK GNU C++14 TESTS 48 187 512000 2100
49546440 xiaowuc1 F Feb. 6, 2019, 11:22 p.m. OK GNU C++14 TESTS 48 187 819200 2100
56048459 threepebbles F June 25, 2019, 5:46 p.m. OK GNU C++14 TESTS 48 187 170700800 2100
50783697 vjudge2 F March 4, 2019, 12:31 p.m. OK GNU C++14 TESTS 48 202 0 2100
42103312 hexicle F Aug. 25, 2018, 9:09 p.m. OK GNU C++17 TESTS 48 30 716800 2100
42696016 ReaLNero1 F Sept. 9, 2018, 7:12 a.m. OK GNU C++17 TESTS 48 31 614400 2100
46409035 StasEoS F Nov. 30, 2018, 4:08 p.m. OK GNU C++17 TESTS 48 140 0 2100
65671243 JakubLap F Nov. 24, 2019, 4:01 p.m. OK GNU C++17 TESTS 48 187 409600 2100
65671340 JakubLap F Nov. 24, 2019, 4:04 p.m. OK GNU C++17 TESTS 48 202 409600 2100
44758371 DragoonKiller F Oct. 24, 2018, 5:11 a.m. OK GNU C++17 TESTS 48 202 512000 2100
56000952 vjudge4 F June 24, 2019, 12:58 p.m. OK GNU C++17 TESTS 48 202 1126400 2100
66855851 cuiaoxiang F Dec. 14, 2019, 12:14 p.m. OK GNU C++17 TESTS 48 217 614400 2100
66205331 G3meux F Dec. 3, 2019, 2:12 a.m. OK GNU C++17 TESTS 48 217 819200 2100
59048612 Test2311 F Aug. 18, 2019, 4:45 p.m. OK GNU C++17 TESTS 48 218 512000 2100
42442697 vasyak F Sept. 3, 2018, 10:38 p.m. OK Go TESTS 48 592 204800 2100
66011160 vjudge1 F Nov. 30, 2019, 2:36 a.m. OK Go TESTS 48 608 0 2100
66022394 vjudge2 F Nov. 30, 2019, 7:45 a.m. OK Go TESTS 48 686 0 2100
65975378 vjudge3 F Nov. 29, 2019, 3:26 p.m. OK Go TESTS 48 1029 0 2100
42442268 Marii F Sept. 3, 2018, 9:56 p.m. OK Go TESTS 48 1075 2457600 2100
42349778 ramesh.public F Sept. 2, 2018, 3:50 a.m. OK Haskell TESTS 48 2121 8499200 2100
65512053 yaoct F Nov. 22, 2019, 4:39 a.m. OK Java 8 TESTS 48 436 0 2100
66165791 Agnimandur F Dec. 2, 2019, 7:31 a.m. OK Java 8 TESTS 48 451 0 2100
45955149 2153596 F Nov. 19, 2018, 8:46 a.m. OK Java 8 TESTS 48 467 0 2100
66017145 vjudge5 F Nov. 30, 2019, 5:56 a.m. OK Java 8 TESTS 48 483 0 2100
42157836 barakraganosungam F Aug. 27, 2018, 3:58 p.m. OK Java 8 TESTS 48 499 0 2100
50871415 vjudge1 F March 6, 2019, 2:08 a.m. OK Java 8 TESTS 48 530 0 2100
45098625 Asim_Babayev F Oct. 30, 2018, 12:53 p.m. OK Java 8 TESTS 48 545 0 2100
42253698 di_halt F Aug. 29, 2018, 7:18 p.m. OK Java 8 TESTS 48 576 0 2100
42874376 parth_15 F Sept. 14, 2018, 9:58 p.m. OK Java 8 TESTS 48 592 0 2100
42354344 sonlii F Sept. 2, 2018, 7:43 a.m. OK Java 8 TESTS 48 592 16076800 2100
42143597 BlizzardBunny F Aug. 27, 2018, 7:26 a.m. OK Mono C# TESTS 48 452 3993600 2100
42120454 YouAreTheBest F Aug. 26, 2018, 12:11 p.m. OK Mono C# TESTS 48 530 4505600 2100
44051836 omikad F Oct. 9, 2018, 7:38 p.m. OK Mono C# TESTS 48 826 5120000 2100
48079290 jernchr11 F Jan. 8, 2019, 6:35 a.m. OK MS C++ TESTS 48 265 409600 2100
42495839 old_new_phoenix F Sept. 5, 2018, 2:21 p.m. OK MS C++ TESTS 48 343 614400 2100
65957850 vjudge5 F Nov. 29, 2019, 1:32 p.m. OK MS C++ TESTS 48 374 0 2100
45237927 vjudge1 F Nov. 3, 2018, 10:17 a.m. OK MS C++ TESTS 48 390 0 2100
42416860 DeBudd F Sept. 3, 2018, 7:41 a.m. OK MS C++ TESTS 48 405 512000 2100
42136164 Ivan_Bondarev F Aug. 27, 2018, 12:12 a.m. OK MS C++ TESTS 48 420 716800 2100
42136140 Ivan_Bondarev F Aug. 27, 2018, 12:10 a.m. OK MS C++ TESTS 48 436 716800 2100
66012801 vjudge4 F Nov. 30, 2019, 3:40 a.m. OK MS C++ TESTS 48 452 3993600 2100
43610218 vjudge3 F Sept. 30, 2018, 1:55 p.m. OK MS C++ TESTS 48 483 409600 2100
43814051 vjudge4 F Oct. 5, 2018, 3:42 a.m. OK MS C++ TESTS 48 498 512000 2100
58383263 yorky F Aug. 6, 2019, 10:54 a.m. OK MS C++ 2017 TESTS 48 436 160358400 2100
45095546 YESMAths F Oct. 30, 2018, 11:40 a.m. OK PyPy 2 TESTS 48 857 1433600 2100
45095473 YESMAths F Oct. 30, 2018, 11:38 a.m. OK PyPy 2 TESTS 48 1231 1536000 2100
42449170 morejarphone F Sept. 4, 2018, 6:40 a.m. OK PyPy 2 TESTS 48 1622 921600 2100
56424491 tushartyagi8750 F July 2, 2019, 8:55 a.m. OK PyPy 3 TESTS 48 779 2048000 2100
48103540 TurningTables F Jan. 9, 2019, 12:58 a.m. OK PyPy 3 TESTS 48 857 3788800 2100
43606790 vjudge5 F Sept. 30, 2018, 12:40 p.m. OK PyPy 3 TESTS 48 982 819200 2100
42291779 rhshadowgreen F Aug. 30, 2018, 9:32 p.m. OK PyPy 3 TESTS 48 982 921600 2100
42187818 LordVader F Aug. 27, 2018, 11:26 p.m. OK PyPy 3 TESTS 48 1013 2252800 2100
42255552 DigitalNerd F Aug. 29, 2018, 8:47 p.m. OK PyPy 3 TESTS 48 1154 409600 2100
42156923 shanzei F Aug. 27, 2018, 3:21 p.m. OK PyPy 3 TESTS 48 1169 307200 2100
42284239 Skybytskyi.Nikita F Aug. 30, 2018, 4:05 p.m. OK PyPy 3 TESTS 48 1372 8908800 2100
42128916 Letmecry F Aug. 26, 2018, 5:05 p.m. OK Rust TESTS 48 420 512000 2100
42495511 vain0 F Sept. 5, 2018, 2:11 p.m. OK Rust TESTS 48 498 512000 2100
42336543 m1el F Sept. 1, 2018, 2:17 p.m. OK Rust TESTS 48 623 0 2100
42115866 yakamoto F Aug. 26, 2018, 9:36 a.m. OK Scala TESTS 48 2183 0 2100

remove filters

Back to search problems