Codeforces Round 599 (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
1242 Codeforces Round 599 (Div. 1) FINISHED False 7200 164386487 Nov. 6, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12751 ) A Tile Painting PROGRAMMING constructive algorithms math number theory 1500

B'Ujan has been lazy lately, but now has decided to bring his yard to good shape. First, he decided to paint the path from his house to the gate. The path consists of n consecutive tiles, numbered from 1 to n . Ujan will paint each tile in some color. He will consider the path aesthetic if for any two different tiles with numbers i and j , such that |j - i| is a divisor of n greater than 1 , they have the same color. Formally, the colors of two tiles with numbers i and j should be the same if |i-j| > 1 and n bmod |i-j| = 0 (where x bmod y is the remainder when dividing x by y ). Ujan wants to brighten up space. What is the maximum number of different colors that Ujan can use, so that the path is aesthetic? The first line of input contains a single integer n ( 1 <= q n <= q 10^{12} ), the length of the path. Output a single integer, the maximum possible number of colors that the path can be painted in. In the first sample, two colors is the maximum number. Tiles 1 and 3 should have the same color since 4 bmod |3-1| = 0 . Also, tiles 2 and 4 should have the same color since 4 bmod |4-2| = 0 . In the second sample, all five colors can be used. '...

Tutorials

Codeforces Round #599 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64502654 vlad89 A Nov. 8, 2019, 5:12 a.m. OK Clang++17 Diagnostics TESTS 62 62 0 1500
64374831 Gassa A Nov. 6, 2019, 3:10 p.m. OK D TESTS 62 31 0 1500
64472693 iica A Nov. 7, 2019, 1:31 p.m. OK D TESTS 62 46 4300800 1500
64390496 hos.lyric A Nov. 6, 2019, 3:43 p.m. OK D TESTS 62 46 5939200 1500
67270435 RajMaheshwari A Dec. 20, 2019, 8:02 a.m. OK GNU C11 TESTS 62 31 0 1500
66257013 tour0149 A Dec. 4, 2019, 6:31 a.m. OK GNU C11 TESTS 62 31 0 1500
64419487 physics0523 A Nov. 6, 2019, 5:41 p.m. OK GNU C11 TESTS 62 31 0 1500
64754068 pokorj54 A Nov. 12, 2019, 4:16 p.m. OK GNU C11 TESTS 62 46 0 1500
65500752 yakitori A Nov. 21, 2019, 6:45 p.m. OK GNU C++11 TESTS 62 30 0 1500
68617101 monk A Jan. 11, 2020, 5:54 p.m. OK GNU C++11 TESTS 62 31 0 1500
68046540 Nyse A Jan. 1, 2020, 4:43 p.m. OK GNU C++11 TESTS 62 31 0 1500
68046480 Vanquisher A Jan. 1, 2020, 4:42 p.m. OK GNU C++11 TESTS 62 31 0 1500
68022487 geneanlyz A Jan. 1, 2020, 1:22 a.m. OK GNU C++11 TESTS 62 31 0 1500
67252133 prowess A Dec. 19, 2019, 7:38 p.m. OK GNU C++11 TESTS 62 31 0 1500
68972437 The_Crossing A Jan. 17, 2020, 7:31 a.m. OK GNU C++11 TESTS 62 31 0 1500
69858063 KhandokerEbrahim A Jan. 30, 2020, 5:36 p.m. OK GNU C++11 TESTS 62 31 0 1500
69895689 Mr_Wu A Jan. 31, 2020, 11:39 a.m. OK GNU C++11 TESTS 62 31 0 1500
69945134 Avign A Feb. 1, 2020, 7:22 a.m. OK GNU C++11 TESTS 62 31 0 1500
69299309 fireswan A Jan. 22, 2020, 1:19 p.m. OK GNU C++14 TESTS 62 30 0 1500
67517855 Akshit1515 A Dec. 24, 2019, 11:28 a.m. OK GNU C++14 TESTS 62 30 0 1500
66578459 kawara_y A Dec. 10, 2019, 8:24 a.m. OK GNU C++14 TESTS 62 30 0 1500
64799561 LuckyPants A Nov. 13, 2019, 2:06 p.m. OK GNU C++14 TESTS 62 30 0 1500
69569413 nk0183828 A Jan. 26, 2020, 1:36 p.m. OK GNU C++14 TESTS 62 30 307200 1500
64377979 forerunner A Nov. 6, 2019, 3:15 p.m. OK GNU C++14 TESTS 62 30 1228800 1500
69234289 AbradolfLincler A Jan. 21, 2020, 10:41 a.m. OK GNU C++14 TESTS 62 31 0 1500
69396009 vjudge3 A Jan. 23, 2020, 6:20 a.m. OK GNU C++14 TESTS 62 31 0 1500
69060385 Leonidas98 A Jan. 18, 2020, 4:15 p.m. OK GNU C++14 TESTS 62 31 0 1500
68949669 destroyer07 A Jan. 16, 2020, 5:29 p.m. OK GNU C++14 TESTS 62 31 0 1500
64715609 aZvezda A Nov. 11, 2019, 9:42 p.m. OK GNU C++17 TESTS 62 30 0 1500
64539475 matheusataidee A Nov. 8, 2019, 6:06 p.m. OK GNU C++17 TESTS 62 30 0 1500
64486395 yassin_ A Nov. 7, 2019, 5:57 p.m. OK GNU C++17 TESTS 62 30 0 1500
64484276 Radik12 A Nov. 7, 2019, 5:07 p.m. OK GNU C++17 TESTS 62 30 0 1500
64475381 Omar_Elawady A Nov. 7, 2019, 2:13 p.m. OK GNU C++17 TESTS 62 30 0 1500
64471915 qinmaye A Nov. 7, 2019, 1:19 p.m. OK GNU C++17 TESTS 62 30 0 1500
65465201 Umi A Nov. 21, 2019, 5:28 a.m. OK GNU C++17 TESTS 62 30 0 1500
65466164 I_love_little_sisters A Nov. 21, 2019, 6:03 a.m. OK GNU C++17 TESTS 62 30 0 1500
66414567 MathBoy A Dec. 6, 2019, 4:33 p.m. OK GNU C++17 TESTS 62 30 0 1500
66996546 nowyyz A Dec. 16, 2019, 2:12 a.m. OK GNU C++17 TESTS 62 30 0 1500
65538542 sanyacoder A Nov. 22, 2019, 3:07 p.m. OK Java 11 TESTS 62 202 0 1500
65528121 lpls1 A Nov. 22, 2019, 11:17 a.m. OK Java 11 TESTS 62 202 0 1500
64402251 sarthakmanna A Nov. 6, 2019, 4:15 p.m. OK Java 11 TESTS 62 202 0 1500
64382392 Musin A Nov. 6, 2019, 3:24 p.m. OK Java 11 TESTS 62 202 0 1500
64488941 derrick20 A Nov. 7, 2019, 7:01 p.m. OK Java 8 TESTS 62 124 0 1500
67668891 MagentaCobra A Dec. 26, 2019, 7:10 p.m. OK Java 8 TESTS 62 124 0 1500
66608417 Ahmad A Dec. 10, 2019, 7:46 p.m. OK Java 8 TESTS 62 124 0 1500
65902883 qwerty46246 A Nov. 28, 2019, 9:34 a.m. OK Java 8 TESTS 62 124 0 1500
64901721 adityagupta1089 A Nov. 14, 2019, 7:16 p.m. OK Java 8 TESTS 62 124 0 1500
64664029 anirudhrahul A Nov. 10, 2019, 11:52 p.m. OK Java 8 TESTS 62 124 0 1500
64576812 xodiac A Nov. 9, 2019, 10:59 a.m. OK Java 8 TESTS 62 124 0 1500
64474693 anuraxx A Nov. 7, 2019, 2:03 p.m. OK Java 8 TESTS 62 124 0 1500
64447113 TIGER16 A Nov. 7, 2019, 6:19 a.m. OK Java 8 TESTS 62 124 0 1500
64432113 altik_nik A Nov. 6, 2019, 9:58 p.m. OK Java 8 TESTS 62 124 0 1500
64376686 Tlatoani A Nov. 6, 2019, 3:13 p.m. OK Kotlin TESTS 62 155 0 1500
64599502 tatarahmad A Nov. 9, 2019, 6:06 p.m. OK Kotlin TESTS 62 233 0 1500
64404561 keymoon A Nov. 6, 2019, 4:22 p.m. OK Mono C# TESTS 62 77 3584000 1500
64753432 hyzhangzhy A Nov. 12, 2019, 4:03 p.m. OK Mono C# TESTS 62 78 3584000 1500
65330935 vjudge1 A Nov. 19, 2019, 6:02 a.m. OK MS C++ TESTS 62 31 0 1500
69566783 Apsara A Jan. 26, 2020, 12:43 p.m. OK MS C++ TESTS 62 31 102400 1500
64634488 vjudge3 A Nov. 10, 2019, 11:12 a.m. OK MS C++ TESTS 62 46 3993600 1500
64375820 tarattata1 A Nov. 6, 2019, 3:11 p.m. OK MS C++ TESTS 62 62 4812800 1500
64725737 hushiba A Nov. 12, 2019, 6:22 a.m. OK MS C++ 2017 TESTS 62 31 307200 1500
64474337 vjudge3 A Nov. 7, 2019, 1:57 p.m. OK MS C++ 2017 TESTS 62 31 307200 1500
64386049 Pavs A Nov. 6, 2019, 3:31 p.m. OK MS C++ 2017 TESTS 62 31 307200 1500
69201384 kurs A Jan. 20, 2020, 4:39 p.m. OK MS C++ 2017 TESTS 62 31 307200 1500
64377139 Timonnable A Nov. 6, 2019, 3:14 p.m. OK MS C++ 2017 TESTS 62 31 409600 1500
64390653 MrLolthe1st A Nov. 6, 2019, 3:43 p.m. OK MS C++ 2017 TESTS 62 46 0 1500
64576834 oneminh A Nov. 9, 2019, 10:59 a.m. OK MS C++ 2017 TESTS 62 46 307200 1500
64383057 AlexanderL A Nov. 6, 2019, 3:25 p.m. OK MS C++ 2017 TESTS 62 46 307200 1500
64753258 BpeMeHHa91_TryDHocTb A Nov. 12, 2019, 3:59 p.m. OK MS C++ 2017 TESTS 62 46 307200 1500
66552324 CtrlAlt A Dec. 9, 2019, 3:23 p.m. OK MS C++ 2017 TESTS 62 46 307200 1500
64384594 TheManTheMythTheLegend A Nov. 6, 2019, 3:28 p.m. OK PyPy 2 TESTS 62 171 0 1500
64381045 alexwice A Nov. 6, 2019, 3:21 p.m. OK PyPy 2 TESTS 62 280 9420800 1500
64759426 deepakpadamata A Nov. 12, 2019, 6:24 p.m. OK PyPy 3 TESTS 62 140 1331200 1500
68377015 KrishRawat A Jan. 7, 2020, 8:35 p.m. OK PyPy 3 TESTS 62 155 1433600 1500
65728570 kevinwinatamichael A Nov. 26, 2019, 2:46 a.m. OK PyPy 3 TESTS 62 170 1331200 1500
64771168 drinkwaterknow A Nov. 12, 2019, 11:51 p.m. OK PyPy 3 TESTS 62 170 1331200 1500
64479231 grapheo12 A Nov. 7, 2019, 3:22 p.m. OK PyPy 3 TESTS 62 170 2048000 1500
64383585 pineriver A Nov. 6, 2019, 3:26 p.m. OK PyPy 3 TESTS 62 171 1331200 1500
65222943 ratatat A Nov. 16, 2019, 10:24 p.m. OK PyPy 3 TESTS 62 171 1433600 1500
64674224 interestingLSY A Nov. 11, 2019, 7:21 a.m. OK PyPy 3 TESTS 62 171 1433600 1500
64586798 FallingStar A Nov. 9, 2019, 1:34 p.m. OK PyPy 3 TESTS 62 171 1433600 1500
64502452 Mickey-snow A Nov. 8, 2019, 5:05 a.m. OK PyPy 3 TESTS 62 171 1433600 1500
68042139 soumyasarkar1998 A Jan. 1, 2020, 2:47 p.m. OK Python 2 TESTS 62 467 0 1500
64378932 nwi A Nov. 6, 2019, 3:17 p.m. OK Python 2 TESTS 62 530 0 1500
64731027 PJdan A Nov. 12, 2019, 8:26 a.m. OK Python 3 TESTS 62 218 0 1500
64378376 Kiri8128 A Nov. 6, 2019, 3:16 p.m. OK Python 3 TESTS 62 249 409600 1500
64683125 timeomine A Nov. 11, 2019, 10:50 a.m. OK Python 3 TESTS 62 264 0 1500
64673249 otsosite A Nov. 11, 2019, 6:57 a.m. OK Python 3 TESTS 62 265 0 1500
68980887 vegetablesandwich A Jan. 17, 2020, 10:40 a.m. OK Python 3 TESTS 62 311 716800 1500
65577868 vishnutheerthep A Nov. 23, 2019, 10:01 a.m. OK Python 3 TESTS 62 327 0 1500
66870206 sritha A Dec. 14, 2019, 1:21 p.m. OK Python 3 TESTS 62 342 0 1500
65186547 UR5ANO A Nov. 16, 2019, 3:17 p.m. OK Python 3 TESTS 62 342 0 1500
64585865 gioif A Nov. 9, 2019, 1:19 p.m. OK Python 3 TESTS 62 342 0 1500
68044077 drpdada A Jan. 1, 2020, 3:38 p.m. OK Python 3 TESTS 62 343 0 1500
65324264 tbogus A Nov. 18, 2019, 10:48 p.m. OK Ruby TESTS 62 374 204800 1500
68037976 gearjack A Jan. 1, 2020, 1 p.m. OK Rust TESTS 62 46 0 1500
64380193 yoshrc A Nov. 6, 2019, 3:20 p.m. OK Rust TESTS 62 46 0 1500

remove filters

Back to search problems