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 |
---|---|---|---|---|---|---|
1824 | Codeforces Round 872 (Div. 1) | FINISHED | False | 7200 | 53718863 | May 8, 2023, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4788 ) | B1 | LuoTianyi and the Floating Islands (Easy Version) | PROGRAMMING | combinatorics math probabilities trees | 1800 |
B"This is the easy version of the problem. The only difference is that in this version k <= min(n,3) . You can make hacks only if both versions of the problem are solved. LuoTianyi now lives in a world with n floating islands. The floating islands are connected by n-1 undirected air routes, and any two of them can reach each other by passing the routes. That means, the n floating islands form a tree. One day, LuoTianyi wants to meet her friends: Chtholly, Nephren, William, .... Totally, she wants to meet k people. She doesn't know the exact positions of them, but she knows that they are in pairwise distinct islands. She define an island is good if and only if the sum of the distances ^{ dagger} from it to the islands with k people is the minimal among all the n islands. Now, LuoTianyi wants to know that, if the k people are randomly set in k distinct of the n islands, then what is the expect number of the good islands? You just need to tell her the expect number modulo 10^9+7 . ^{ dagger} The distance between two islands is the minimum number of air routes you need to take to get from one island to the other. The first line contains two integers n and k ( 1 <= k <= min(n,3), 1 <= n <= 2 cdot 10^5 ) -- the number of the islands and people respectively. Next n xe2 x88 x921 lines describe the air routes. The i -th of them contains two integers u_i and v_i ( 1 <= u_i,v_i <= n, u_i neq v_i ) -- the islands connected by the i -th air route. Print a single integer -- the expect number of the good islands modulo 10^9 + 7 . Formally, let M = 10^9 + 7 . It can be shown that the answer can be expressed as an irreducible fraction frac{p}{q} , where p and q are integers and q not equiv 0 ( operatorname{mod} M ). Output the integer equal to p cdot q^{-1} operatorname{mod} M . In other words, output "... |
CodeForces Round 872(Div. 1&2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
205105324 | mban259 | B1 | May 8, 2023, 1:07 p.m. | OK | C# 10 | TESTS | 26 | 717 | 57856000 | 1800 | |
205106727 | DmitriyAnikeyev | B1 | May 8, 2023, 1:11 p.m. | OK | C# 10 | TESTS | 26 | 904 | 104038400 | 1800 | |
205102525 | kakel_san | B1 | May 8, 2023, 12:58 p.m. | OK | C# 8 | TESTS | 26 | 327 | 48947200 | 1800 | |
205086927 | hos.lyric | B1 | May 8, 2023, 12:18 p.m. | OK | D | TESTS | 26 | 373 | 31846400 | 1800 | |
205154878 | Khanj | B1 | May 8, 2023, 6:24 p.m. | OK | GNU C11 | TESTS | 26 | 202 | 12697600 | 1800 | |
206103980 | CaveNightingale | B1 | May 16, 2023, 3:09 p.m. | OK | GNU C11 | TESTS | 26 | 234 | 26316800 | 1800 | |
205301135 | Leasier | B1 | May 10, 2023, 7:47 a.m. | OK | GNU C++14 | TESTS | 26 | 78 | 11366400 | 1800 | |
205202088 | king20090712 | B1 | May 9, 2023, 9:02 a.m. | OK | GNU C++14 | TESTS | 26 | 93 | 11366400 | 1800 | |
205490897 | yinhee | B1 | May 12, 2023, 2:35 a.m. | OK | GNU C++14 | TESTS | 26 | 93 | 11366400 | 1800 | |
205395415 | Leasier | B1 | May 11, 2023, 6:36 a.m. | OK | GNU C++14 | TESTS | 26 | 93 | 14540800 | 1800 | |
205219520 | c1120231020 | B1 | May 9, 2023, 11:56 a.m. | OK | GNU C++14 | TESTS | 26 | 93 | 21094400 | 1800 | |
206176614 | luogu_bot2 | B1 | May 17, 2023, 6:42 a.m. | OK | GNU C++14 | TESTS | 26 | 93 | 85401600 | 1800 | |
205224974 | jiangbowen | B1 | May 9, 2023, 12:42 p.m. | OK | GNU C++14 | TESTS | 26 | 93 | 88064000 | 1800 | |
205836577 | luogu_bot2 | B1 | May 14, 2023, 1:23 p.m. | OK | GNU C++14 | TESTS | 26 | 108 | 11366400 | 1800 | |
205175938 | XZC__Bobby | B1 | May 9, 2023, 1:53 a.m. | OK | GNU C++14 | TESTS | 26 | 108 | 13004800 | 1800 | |
205099769 | Pompeii | B1 | May 8, 2023, 12:50 p.m. | OK | GNU C++14 | TESTS | 26 | 108 | 19763200 | 1800 | |
205358318 | prafull_08 | B1 | May 10, 2023, 5:51 p.m. | OK | GNU C++17 | TESTS | 26 | 93 | 13004800 | 1800 | |
205594985 | 21h51a6677 | B1 | May 12, 2023, 3:40 p.m. | OK | GNU C++17 | TESTS | 26 | 93 | 13004800 | 1800 | |
205694705 | 2000032077cse | B1 | May 13, 2023, 8:48 a.m. | OK | GNU C++17 | TESTS | 26 | 108 | 13004800 | 1800 | |
205388554 | gottipatiyasaswini | B1 | May 11, 2023, 4:49 a.m. | OK | GNU C++17 | TESTS | 26 | 108 | 13004800 | 1800 | |
205231795 | over_thinker001 | B1 | May 9, 2023, 1:40 p.m. | OK | GNU C++17 | TESTS | 26 | 109 | 15155200 | 1800 | |
205399245 | Raymond_YP | B1 | May 11, 2023, 7:24 a.m. | OK | GNU C++17 | TESTS | 26 | 124 | 14336000 | 1800 | |
205092747 | Natsuzora | B1 | May 8, 2023, 12:30 p.m. | OK | GNU C++17 | TESTS | 26 | 124 | 15155200 | 1800 | |
205111848 | MarbIue | B1 | May 8, 2023, 1:28 p.m. | OK | GNU C++17 | TESTS | 26 | 139 | 33587200 | 1800 | |
205167390 | Agreb | B1 | May 8, 2023, 9:38 p.m. | OK | GNU C++17 | TESTS | 26 | 140 | 15769600 | 1800 | |
205186786 | kimmoqt | B1 | May 9, 2023, 5:41 a.m. | OK | GNU C++17 | TESTS | 26 | 140 | 16486400 | 1800 | |
205827047 | BootsHua | B1 | May 14, 2023, 11:41 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 46 | 32358400 | 1800 | |
205392385 | asdvgy | B1 | May 11, 2023, 5:53 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 93 | 17408000 | 1800 | |
205121567 | hydro-bot3 | B1 | May 8, 2023, 1:59 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 93 | 40755200 | 1800 | |
205088063 | zqyyy | B1 | May 8, 2023, 12:20 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 108 | 27852800 | 1800 | |
205112128 | frankly6 | B1 | May 8, 2023, 1:29 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 124 | 26009600 | 1800 | |
205113466 | yangjl | B1 | May 8, 2023, 1:34 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 124 | 39628800 | 1800 | |
205132199 | illume2021 | B1 | May 8, 2023, 2:57 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 139 | 22835200 | 1800 | |
205394300 | anhkha2003 | B1 | May 11, 2023, 6:21 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 139 | 28774400 | 1800 | |
205099407 | ollpu | B1 | May 8, 2023, 12:49 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 140 | 22016000 | 1800 | |
205091706 | crashed | B1 | May 8, 2023, 12:28 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 140 | 23961600 | 1800 | |
205174293 | Zhouershan | B1 | May 9, 2023, 1:09 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 260608000 | 1800 | |
205101438 | Zhouershan | B1 | May 8, 2023, 12:55 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 46 | 267264000 | 1800 | |
205531014 | xukai | B1 | May 12, 2023, 11:50 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 78 | 19558400 | 1800 | |
205090817 | Nephry | B1 | May 8, 2023, 12:26 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 93 | 17817600 | 1800 | |
205096512 | wanghai673 | B1 | May 8, 2023, 12:40 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 93 | 28979200 | 1800 | |
205234566 | CC2021zyz | B1 | May 9, 2023, 2:04 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 93 | 32358400 | 1800 | |
205091881 | wery0 | B1 | May 8, 2023, 12:28 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 108 | 13824000 | 1800 | |
205216664 | luogu_bot2 | B1 | May 9, 2023, 11:31 a.m. | OK | GNU C++20 (64) | TESTS | 26 | 108 | 23961600 | 1800 | |
205137734 | mehrunesartem | B1 | May 8, 2023, 3:39 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 108 | 31948800 | 1800 | |
205170295 | Apple_Method | B1 | May 8, 2023, 10:57 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 109 | 18329600 | 1800 | |
205173904 | 0x3F | B1 | May 9, 2023, 12:59 a.m. | OK | Go | TESTS | 26 | 249 | 47206400 | 1800 | |
205105697 | insert_cool_handle | B1 | May 8, 2023, 1:08 p.m. | OK | Java 11 | TESTS | 26 | 514 | 50585600 | 1800 | |
205115961 | profchi | B1 | May 8, 2023, 1:42 p.m. | OK | Java 11 | TESTS | 26 | 748 | 117350400 | 1800 | |
205139424 | knightL | B1 | May 8, 2023, 3:53 p.m. | OK | Java 11 | TESTS | 26 | 826 | 60108800 | 1800 | |
205271246 | kamranm | B1 | May 9, 2023, 9:03 p.m. | OK | Java 17 | TESTS | 26 | 499 | 247603200 | 1800 | |
205152931 | Aemon | B1 | May 8, 2023, 6:03 p.m. | OK | Java 17 | TESTS | 26 | 1185 | 164044800 | 1800 | |
205242318 | Hiranmoy | B1 | May 9, 2023, 3:13 p.m. | OK | Java 17 | TESTS | 26 | 1294 | 74956800 | 1800 | |
205266459 | mukhopadhyaypushan42 | B1 | May 9, 2023, 7:35 p.m. | OK | Java 17 | TESTS | 26 | 1341 | 76697600 | 1800 | |
205098474 | iakovlev.zakhar | B1 | May 8, 2023, 12:46 p.m. | OK | Java 8 | TESTS | 26 | 265 | 18534400 | 1800 | |
205104760 | yvbf | B1 | May 8, 2023, 1:05 p.m. | OK | Java 8 | TESTS | 26 | 482 | 68710400 | 1800 | |
205226586 | Java_Programmer | B1 | May 9, 2023, 12:55 p.m. | OK | Java 8 | TESTS | 26 | 577 | 50073600 | 1800 | |
205119215 | ika | B1 | May 8, 2023, 1:53 p.m. | OK | Java 8 | TESTS | 26 | 592 | 40345600 | 1800 | |
205117671 | Virendra115 | B1 | May 8, 2023, 1:48 p.m. | OK | Java 8 | TESTS | 26 | 592 | 43929600 | 1800 | |
205109492 | fetetriste | B1 | May 8, 2023, 1:20 p.m. | OK | Java 8 | TESTS | 26 | 655 | 113049600 | 1800 | |
205393546 | yvbf | B1 | May 11, 2023, 6:10 a.m. | OK | Java 8 | TESTS | 26 | 951 | 139980800 | 1800 | |
205174587 | cc4414 | B1 | May 9, 2023, 1:17 a.m. | OK | Java 8 | TESTS | 26 | 998 | 101068800 | 1800 | |
205132238 | cc4414 | B1 | May 8, 2023, 2:57 p.m. | OK | Java 8 | TESTS | 26 | 1123 | 101068800 | 1800 | |
205319719 | yvbf | B1 | May 10, 2023, 11:27 a.m. | OK | Java 8 | TESTS | 26 | 1481 | 139878400 | 1800 | |
205106809 | top73only | B1 | May 8, 2023, 1:12 p.m. | OK | Kotlin 1.6 | TESTS | 26 | 436 | 15257600 | 1800 | |
205098327 | Tlatoani | B1 | May 8, 2023, 12:45 p.m. | OK | Kotlin 1.7 | TESTS | 26 | 1715 | 176435200 | 1800 | |
205139355 | GeraltLUL | B1 | May 8, 2023, 3:53 p.m. | OK | MS C++ 2017 | TESTS | 26 | 451 | 13619200 | 1800 | |
205096743 | hxu10 | B1 | May 8, 2023, 12:41 p.m. | OK | PyPy 3 | TESTS | 26 | 670 | 50278400 | 1800 | |
205505490 | wangzheny | B1 | May 12, 2023, 6:40 a.m. | OK | PyPy 3 | TESTS | 26 | 935 | 82432000 | 1800 | |
205100127 | plevande | B1 | May 8, 2023, 12:51 p.m. | OK | PyPy 3-64 | TESTS | 26 | 467 | 73625600 | 1800 | |
205093848 | dyppp | B1 | May 8, 2023, 12:33 p.m. | OK | PyPy 3-64 | TESTS | 26 | 514 | 51507200 | 1800 | |
205168910 | bronze_coder | B1 | May 8, 2023, 10:15 p.m. | OK | PyPy 3-64 | TESTS | 26 | 530 | 57344000 | 1800 | |
206374302 | gsaunders | B1 | May 18, 2023, 6:03 p.m. | OK | PyPy 3-64 | TESTS | 26 | 639 | 105369600 | 1800 | |
205103046 | tamato | B1 | May 8, 2023, 1 p.m. | OK | PyPy 3-64 | TESTS | 26 | 685 | 67276800 | 1800 | |
205096213 | toam | B1 | May 8, 2023, 12:39 p.m. | OK | PyPy 3-64 | TESTS | 26 | 950 | 85196800 | 1800 | |
205343327 | nonrice | B1 | May 10, 2023, 3:06 p.m. | OK | PyPy 3-64 | TESTS | 26 | 1435 | 91136000 | 1800 | |
205168729 | bronze_coder | B1 | May 8, 2023, 10:10 p.m. | OK | PyPy 3-64 | TESTS | 26 | 1496 | 58982400 | 1800 | |
205203822 | Spheniscine | B1 | May 9, 2023, 9:19 a.m. | OK | Rust 2021 | TESTS | 26 | 124 | 26521600 | 1800 | |
205088884 | sansen | B1 | May 8, 2023, 12:22 p.m. | OK | Rust 2021 | TESTS | 26 | 124 | 28262400 | 1800 | |
205333201 | cottoncotton | B1 | May 10, 2023, 1:34 p.m. | OK | Rust 2021 | TESTS | 26 | 124 | 108851200 | 1800 | |
205375655 | kost | B1 | May 10, 2023, 11:04 p.m. | OK | Rust 2021 | TESTS | 26 | 140 | 35840000 | 1800 | |
205104727 | red_tree | B1 | May 8, 2023, 1:05 p.m. | OK | Rust 2021 | TESTS | 26 | 171 | 48435200 | 1800 | |
205095431 | cpchenpi | B1 | May 8, 2023, 12:37 p.m. | OK | Rust 2021 | TESTS | 26 | 186 | 33075200 | 1800 | |
205098587 | hiratai | B1 | May 8, 2023, 12:46 p.m. | OK | Rust 2021 | TESTS | 26 | 296 | 76185600 | 1800 |
Back to search problems