Codeforces Round 652 (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
1369 Codeforces Round 652 (Div. 2) FINISHED False 7200 144258863 June 23, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8745 ) D TediousLee PROGRAMMING dp graphs greedy math matrices trees 1900

B"Lee tried so hard to make a good div.2 D problem to balance his recent contest, but it still doesn't feel good at all. Lee invented it so tediously slow that he managed to develop a phobia about div.2 D problem setting instead. And now he is hiding behind the bushes... Let's define a Rooted Dead Bush (RDB) of level n as a rooted tree constructed as described below. A rooted dead bush of level 1 is a single vertex. To construct an RDB of level i we, at first, construct an RDB of level i-1 , then for each vertex u : Let's define a claw as a rooted tree with four vertices: one root vertex (called also as center) with three children. It looks like a claw: Lee has a Rooted Dead Bush of level n . Initially, all vertices of his RDB are green. In one move, he can choose a claw in his RDB, if all vertices in the claw are green and all vertices of the claw are children of its center, then he colors the claw's vertices in yellow. He'd like to know the maximum number of yellow vertices he can achieve. Since the answer might be very large, print it modulo 10^9+7 . The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Next t lines contain test cases -- one per line. The first line of each test case contains one integer n ( 1 <= n <= 2 cdot 10^6 ) -- the level of Lee's RDB. For each test case, print a single integer -- the maximum number of yellow vertices Lee can make modulo 10^9 + 7 . It's easy to see that the answer for RDB of level 1 or 2 is 0 . The answer for RDB of level 3 is 4 since there is only one claw we can choose: {1, 2, 3, 4 } . The answer for RDB of level 4 is 4 since we can choose either single claw {1, 3, 2, 4 } or single claw {2, 7, 5, 6 } . There are no other claws in the RDB of level 4 (for example, we can't choose {2, 1, 7, 6 } , since 1 is not a child of cente"...

Tutorials

Codeforces Round #652 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
84803635 daut-dlang D June 23, 2020, 3:29 p.m. OK D TESTS 7 78 34918400 1900
84798206 Gassa D June 23, 2020, 3:15 p.m. OK D TESTS 7 109 35225600 1900
84806267 rainboy D June 23, 2020, 3:36 p.m. OK GNU C11 TESTS 7 78 11673600 1900
84809007 mutsuki D June 23, 2020, 3:43 p.m. OK GNU C11 TESTS 7 78 19968000 1900
84814280 yhc19990202 D June 23, 2020, 3:58 p.m. OK GNU C11 TESTS 7 93 19763200 1900
84809031 EZ4DSG D June 23, 2020, 3:43 p.m. OK GNU C++11 TESTS 7 31 20172800 1900
84787031 npng D June 23, 2020, 2:52 p.m. OK GNU C++11 TESTS 7 46 11673600 1900
84785574 DarkoLoveRuby D June 23, 2020, 2:50 p.m. OK GNU C++11 TESTS 7 46 11673600 1900
84839663 anodiebird D June 23, 2020, 9:47 p.m. OK GNU C++11 TESTS 7 46 12185600 1900
84845903 DWAE86 D June 24, 2020, 1:55 a.m. OK GNU C++11 TESTS 7 46 12185600 1900
84840961 skaahy D June 23, 2020, 10:31 p.m. OK GNU C++11 TESTS 7 46 12185600 1900
84800917 loenvom D June 23, 2020, 3:22 p.m. OK GNU C++11 TESTS 7 46 19763200 1900
84800394 __xzh D June 23, 2020, 3:21 p.m. OK GNU C++11 TESTS 7 46 19865600 1900
84843649 dcordb D June 24, 2020, 12:25 a.m. OK GNU C++11 TESTS 7 46 19865600 1900
84801374 dalaodaiwo D June 23, 2020, 3:23 p.m. OK GNU C++11 TESTS 7 46 19865600 1900
84841632 preyam D June 23, 2020, 11 p.m. OK GNU C++14 TESTS 7 46 11673600 1900
84831807 elManco D June 23, 2020, 7:09 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84830455 dark_horse07 D June 23, 2020, 6:47 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84818272 TimeWarp101 D June 23, 2020, 4:38 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84809786 BamiTorabi D June 23, 2020, 3:46 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84792347 retawB D June 23, 2020, 3:03 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84782336 niga123 D June 23, 2020, 2:44 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84833681 tnarayanan D June 23, 2020, 7:38 p.m. OK GNU C++14 TESTS 7 46 11776000 1900
84848067 S_Aditya D June 24, 2020, 2:55 a.m. OK GNU C++14 TESTS 7 46 11776000 1900
84849129 Invisible_Shadow D June 24, 2020, 3:22 a.m. OK GNU C++14 TESTS 7 46 11776000 1900
84826892 AliShahali1382 D June 23, 2020, 6 p.m. OK GNU C++17 TESTS 7 31 3686400 1900
84807511 bry_rp D June 23, 2020, 3:39 p.m. OK GNU C++17 TESTS 7 31 3891200 1900
84839592 rishu_1234 D June 23, 2020, 9:44 p.m. OK GNU C++17 TESTS 7 31 11673600 1900
84829623 VEGAnn D June 23, 2020, 6:35 p.m. OK GNU C++17 TESTS 7 31 11776000 1900
84832733 RULO D June 23, 2020, 7:23 p.m. OK GNU C++17 TESTS 7 31 11776000 1900
84818472 valerikk2 D June 23, 2020, 4:39 p.m. OK GNU C++17 TESTS 7 31 11776000 1900
84800045 sayeedt D June 23, 2020, 3:20 p.m. OK GNU C++17 TESTS 7 31 11776000 1900
84797292 AswatthaFei D June 23, 2020, 3:13 p.m. OK GNU C++17 TESTS 7 31 11776000 1900
84781834 ShJ D June 23, 2020, 2:43 p.m. OK GNU C++17 TESTS 7 31 11776000 1900
84831645 sambhavk99 D June 23, 2020, 7:06 p.m. OK GNU C++17 TESTS 7 46 11673600 1900
84843517 tfg D June 24, 2020, 12:20 a.m. OK GNU C++17 (64) TESTS 7 31 4505600 1900
84844458 tfg D June 24, 2020, 12:56 a.m. OK GNU C++17 (64) TESTS 7 31 4608000 1900
84799506 trek_walker D June 23, 2020, 3:19 p.m. OK GNU C++17 (64) TESTS 7 31 5017600 1900
84846853 Tzak D June 24, 2020, 2:22 a.m. OK GNU C++17 (64) TESTS 7 31 12288000 1900
84782642 HCPS42 D June 23, 2020, 2:44 p.m. OK GNU C++17 (64) TESTS 7 31 12595200 1900
84798450 eidan D June 23, 2020, 3:16 p.m. OK GNU C++17 (64) TESTS 7 31 12595200 1900
84840067 CodingKnight D June 23, 2020, 10 p.m. OK GNU C++17 (64) TESTS 7 31 12595200 1900
84840445 CodingKnight D June 23, 2020, 10:12 p.m. OK GNU C++17 (64) TESTS 7 31 12595200 1900
84819414 tomaso D June 23, 2020, 4:44 p.m. OK GNU C++17 (64) TESTS 7 31 20275200 1900
84820999 vdv09 D June 23, 2020, 4:56 p.m. OK GNU C++17 (64) TESTS 7 31 20377600 1900
84814995 yaegashi D June 23, 2020, 4 p.m. OK Go TESTS 7 62 27545600 1900
84827228 wistful23 D June 23, 2020, 6:05 p.m. OK Java 11 TESTS 7 187 31846400 1900
84835586 egaeus.code D June 23, 2020, 8:13 p.m. OK Java 11 TESTS 7 218 39833600 1900
84826623 idk321 D June 23, 2020, 5:57 p.m. OK Java 11 TESTS 7 218 39936000 1900
84827844 pk_sinha53 D June 23, 2020, 6:12 p.m. OK Java 11 TESTS 7 218 39936000 1900
84819294 anhtaihsgs D June 23, 2020, 4:43 p.m. OK Java 11 TESTS 7 233 39936000 1900
84825268 chris_11 D June 23, 2020, 5:41 p.m. OK Java 11 TESTS 7 233 40038400 1900
84819684 atishay127 D June 23, 2020, 4:46 p.m. OK Java 11 TESTS 7 233 40038400 1900
84819187 fivefourthreeone D June 23, 2020, 4:43 p.m. OK Java 11 TESTS 7 233 40038400 1900
84835521 Anonymous D June 23, 2020, 8:12 p.m. OK Java 11 TESTS 7 234 65228800 1900
84828878 minaezzat D June 23, 2020, 6:26 p.m. OK Java 11 TESTS 7 248 39936000 1900
84805509 Sadakant D June 23, 2020, 3:34 p.m. OK Java 8 TESTS 7 140 28569600 1900
84847752 LevyJeng D June 24, 2020, 2:47 a.m. OK Java 8 TESTS 7 140 36556800 1900
84810111 glider.g D June 23, 2020, 3:46 p.m. OK Java 8 TESTS 7 155 28569600 1900
84827743 sudhanshu_lucky D June 23, 2020, 6:11 p.m. OK Java 8 TESTS 7 155 36556800 1900
84823845 Lior D June 23, 2020, 5:25 p.m. OK Java 8 TESTS 7 155 36556800 1900
84823537 meashish2 D June 23, 2020, 5:22 p.m. OK Java 8 TESTS 7 155 36556800 1900
84819229 bwang1008 D June 23, 2020, 4:43 p.m. OK Java 8 TESTS 7 155 36556800 1900
84816171 Java D June 23, 2020, 4:03 p.m. OK Java 8 TESTS 7 155 36556800 1900
84800674 2020akadaver D June 23, 2020, 3:21 p.m. OK Java 8 TESTS 7 155 36556800 1900
84791503 saurabhs1206 D June 23, 2020, 3:01 p.m. OK Java 8 TESTS 7 155 44953600 1900
84825871 Loremon D June 23, 2020, 5:47 p.m. OK JavaScript TESTS 7 187 115097600 1900
84792128 Hakiobo D June 23, 2020, 3:02 p.m. OK Kotlin TESTS 7 140 37068800 1900
84827192 Hakiobo D June 23, 2020, 6:04 p.m. OK Kotlin TESTS 7 186 38297600 1900
84802729 koboshi D June 23, 2020, 3:27 p.m. OK Kotlin TESTS 7 217 20582400 1900
84843939 a11eca D June 24, 2020, 12:36 a.m. OK Kotlin TESTS 7 218 61952000 1900
84820038 xxxcul D June 23, 2020, 4:49 p.m. OK Kotlin TESTS 7 249 36761600 1900
84847130 HaKuLess D June 24, 2020, 2:29 a.m. OK Kotlin TESTS 7 265 38297600 1900
84808099 abdukodir D June 23, 2020, 3:41 p.m. OK Kotlin TESTS 7 280 94822400 1900
84816135 golions D June 23, 2020, 4:03 p.m. OK Kotlin TESTS 7 296 61132800 1900
84813955 speshuric D June 23, 2020, 3:58 p.m. OK Kotlin TESTS 7 327 31129600 1900
84806208 rocketm D June 23, 2020, 3:36 p.m. OK Kotlin TESTS 7 358 20992000 1900
84808876 _Trung_Nguyen D June 23, 2020, 3:43 p.m. OK Mono C# TESTS 7 109 31129600 1900
84801925 eSeF_ D June 23, 2020, 3:25 p.m. OK Mono C# TESTS 7 109 93286400 1900
84803955 kuuso D June 23, 2020, 3:30 p.m. OK Mono C# TESTS 7 124 42291200 1900
84815431 Kolyanich D June 23, 2020, 4:02 p.m. OK Mono C# TESTS 7 155 42393600 1900
84792951 hibatibati D June 23, 2020, 3:04 p.m. OK Mono C# TESTS 7 171 26828800 1900
84801803 Arnyev D June 23, 2020, 3:24 p.m. OK Mono C# TESTS 7 171 28979200 1900
84807032 EmK D June 23, 2020, 3:38 p.m. OK Mono C# TESTS 7 186 25600000 1900
84799075 Yupiteru D June 23, 2020, 3:18 p.m. OK Mono C# TESTS 7 202 38809600 1900
84820230 mban259 D June 23, 2020, 4:50 p.m. OK Mono C# TESTS 7 265 26419200 1900
84819421 otarra D June 23, 2020, 4:44 p.m. OK MS C++ 2017 TESTS 7 46 19763200 1900
84824787 ningBr D June 23, 2020, 5:36 p.m. OK MS C++ 2017 TESTS 7 61 19763200 1900
84779815 pichulia D June 23, 2020, 2:40 p.m. OK MS C++ 2017 TESTS 7 62 35737600 1900
84832090 tarattata1 D June 23, 2020, 7:13 p.m. OK MS C++ 2017 TESTS 7 62 35737600 1900
84787838 P___ D June 23, 2020, 2:54 p.m. OK MS C++ 2017 TESTS 7 62 35840000 1900
84798973 jjimo D June 23, 2020, 3:17 p.m. OK MS C++ 2017 TESTS 7 77 22016000 1900
84801018 zsmith3 D June 23, 2020, 3:22 p.m. OK MS C++ 2017 TESTS 7 93 19763200 1900
84855371 deuslovelt D June 24, 2020, 5:29 a.m. OK MS C++ 2017 TESTS 7 93 19763200 1900
84811239 tarattata1 D June 23, 2020, 3:50 p.m. OK MS C++ 2017 TESTS 7 93 35737600 1900
84808662 poormate D June 23, 2020, 3:42 p.m. OK MS C++ 2017 TESTS 7 93 67891200 1900
84814508 Loremon D June 23, 2020, 3:59 p.m. OK Node.js TESTS 7 436 221593600 1900
84842272 Satwik_Tiwari D June 23, 2020, 11:31 p.m. OK PyPy 2 TESTS 7 249 37273600 1900
84808119 rajasbansal1998 D June 23, 2020, 3:41 p.m. OK PyPy 2 TESTS 7 358 41472000 1900
84808918 Mukundan314 D June 23, 2020, 3:43 p.m. OK PyPy 2 TESTS 7 764 139059200 1900
84843089 chris-md D June 24, 2020, 12:06 a.m. OK PyPy 2 TESTS 7 779 155238400 1900
84842957 chris-md D June 24, 2020, 12:01 a.m. OK PyPy 2 TESTS 7 779 155238400 1900
84840273 chris-md D June 23, 2020, 10:06 p.m. OK PyPy 2 TESTS 7 826 155750400 1900
84802665 shehebe D June 23, 2020, 3:27 p.m. OK PyPy 2 TESTS 7 1013 152985600 1900
84807078 pajenegod D June 23, 2020, 3:38 p.m. OK PyPy 2 TESTS 7 1138 147660800 1900
84818645 realnimish D June 23, 2020, 4:40 p.m. OK PyPy 2 TESTS 7 1232 255488000 1900
84818185 realnimish D June 23, 2020, 4:38 p.m. OK PyPy 2 TESTS 7 1278 265113600 1900
84840522 himanshu18038 D June 23, 2020, 10:14 p.m. OK PyPy 3 TESTS 7 234 47104000 1900
84834214 pratikjain226 D June 23, 2020, 7:46 p.m. OK PyPy 3 TESTS 7 249 39014400 1900
84821398 neweekoff D June 23, 2020, 5 p.m. OK PyPy 3 TESTS 7 265 31641600 1900
84825978 shivam_hbtu D June 23, 2020, 5:49 p.m. OK PyPy 3 TESTS 7 265 47718400 1900
84822054 neweekoff D June 23, 2020, 5:06 p.m. OK PyPy 3 TESTS 7 280 31846400 1900
84818959 Khan17 D June 23, 2020, 4:41 p.m. OK PyPy 3 TESTS 7 280 47513600 1900
84822040 neweekoff D June 23, 2020, 5:05 p.m. OK PyPy 3 TESTS 7 296 39731200 1900
84828487 DMCoder D June 23, 2020, 6:21 p.m. OK PyPy 3 TESTS 7 327 39321600 1900
84823608 ghoshashis545 D June 23, 2020, 5:22 p.m. OK PyPy 3 TESTS 7 327 41779200 1900
84846041 whisper0077 D June 24, 2020, 1:59 a.m. OK PyPy 3 TESTS 7 358 47104000 1900
84800848 mkawa2 D June 23, 2020, 3:22 p.m. OK Python 3 TESTS 7 1294 51200000 1900
84816366 oldos D June 23, 2020, 4:04 p.m. OK Python 3 TESTS 7 1482 58265600 1900
84821657 aparahuja123 D June 23, 2020, 5:02 p.m. OK Python 3 TESTS 7 1699 59904000 1900
84856742 timostar1 D June 24, 2020, 5:50 a.m. OK Python 3 TESTS 7 1700 51200000 1900
84828992 reddevil100 D June 23, 2020, 6:27 p.m. OK Python 3 TESTS 7 1778 51609600 1900
84827520 Invincible_Prat D June 23, 2020, 6:08 p.m. OK Python 3 TESTS 7 1793 51200000 1900
84809414 BlackBear D June 23, 2020, 3:45 p.m. OK Python 3 TESTS 7 1794 51200000 1900
84820246 sh1194 D June 23, 2020, 4:50 p.m. OK Python 3 TESTS 7 1840 51200000 1900
84822676 vit_72 D June 23, 2020, 5:12 p.m. OK Python 3 TESTS 7 1918 51200000 1900
84819242 sadm4n D June 23, 2020, 4:43 p.m. OK Ruby TESTS 7 1856 15564800 1900
84780352 MyK_00L D June 23, 2020, 2:41 p.m. OK Rust TESTS 7 46 12083200 1900
84786645 sansen D June 23, 2020, 2:52 p.m. OK Rust TESTS 7 62 28057600 1900
84791513 cotton100pc D June 23, 2020, 3:01 p.m. OK Rust TESTS 7 77 20070400 1900
84798581 rustafarian D June 23, 2020, 3:16 p.m. OK Rust TESTS 7 139 91852800 1900
84847417 t_uchida D June 24, 2020, 2:37 a.m. OK Rust TESTS 7 156 20070400 1900
84808583 pandrei D June 23, 2020, 3:42 p.m. OK Rust TESTS 7 186 23756800 1900
84802498 GeoffreyY D June 23, 2020, 3:26 p.m. OK Rust TESTS 7 186 35430400 1900
84787372 gepardo D June 23, 2020, 2:53 p.m. OK Rust TESTS 7 217 36147200 1900
84816421 robostac D June 23, 2020, 4:04 p.m. OK Rust TESTS 7 951 162508800 1900

remove filters

Back to search problems