Codeforces Round 647 (Div. 1) - Thanks, Algo Muse!

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
1361 Codeforces Round 647 (Div. 1) - Thanks, Algo Muse! FINISHED False 9000 146071511 June 4, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 716 ) E James and the Chase PROGRAMMING dfs and similar graphs probabilities trees 3000

B"James Bond has a new plan for catching his enemy. There are some cities and directed roads between them, such that it is possible to travel between any two cities using these roads. When the enemy appears in some city, Bond knows her next destination but has no idea which path she will choose to move there. The city a is called interesting, if for each city b , there is exactly one simple path from a to b . By a simple path, we understand a sequence of distinct cities, such that for every two neighboring cities, there exists a directed road from the first to the second city. Bond's enemy is the mistress of escapes, so only the chase started in an interesting city gives the possibility of catching her. James wants to arrange his people in such cities. However, if there are not enough interesting cities, the whole action doesn't make sense since Bond's people may wait too long for the enemy. You are responsible for finding all the interesting cities or saying that there is not enough of them. By not enough, James means strictly less than 20 % of all cities. The first line contains one integer t ( 1 <= q t <= q 2 ,000 ) -- the number of test cases. Each test case is described as follows: The first line contains two integers n and m ( 1 <= q n <= 10^5 , 0 <= q m <= 2 cdot 10^5 ) -- the number of cities and roads between them. Each of the following m lines contains two integers u , v ( u neq v ; 1 <= q u, v <= q n ), which denote that there is a directed road from u to v . You can assume that between each ordered pair of cities there is at most one road. The sum of n over all test cases doesn't exceed 10^5 , and the sum of m doesn't exceed 2 cdot 10^5 . If strictly less than 20 % of all cities are interesting, print -1 . Otherwise, let k be the number of interesting cities. Print k distinct integers in increasi"...

Tutorials

Codeforces Round #647 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
82602925 cjy2003 E June 5, 2020, 6:37 a.m. OK GNU C++11 TESTS 55 327 11878400 3000
83195879 _twilight E June 9, 2020, 7:30 a.m. OK GNU C++11 TESTS 55 390 10547200 3000
82667464 ErdemKirez E June 6, 2020, 1:16 a.m. OK GNU C++11 TESTS 55 390 11059200 3000
82666529 2018LZY E June 6, 2020, 12:27 a.m. OK GNU C++11 TESTS 55 468 9318400 3000
82681771 npng E June 6, 2020, 6:58 a.m. OK GNU C++11 TESTS 55 545 10342400 3000
82572711 jaswanth_9652 E June 4, 2020, 7:18 p.m. OK GNU C++11 TESTS 47 545 10342400 3000
82591941 panole E June 5, 2020, 3:52 a.m. OK GNU C++11 TESTS 55 577 9011200 3000
83213103 anodiebird E June 9, 2020, 11:19 a.m. OK GNU C++11 TESTS 55 592 8396800 3000
83132734 Lagoon_ E June 8, 2020, 12:07 p.m. OK GNU C++11 TESTS 55 623 9113600 3000
82667868 Pigbrain E June 6, 2020, 1:35 a.m. OK GNU C++11 TESTS 55 639 6553600 3000
83165448 21August E June 8, 2020, 6:46 p.m. OK GNU C++14 TESTS 55 311 17920000 3000
83165385 21August E June 8, 2020, 6:45 p.m. OK GNU C++14 TESTS 55 405 17920000 3000
82552092 MURAT_ECEM_EKICI E June 4, 2020, 4:37 p.m. OK GNU C++14 TESTS 47 467 29798400 3000
82590250 IrvinSpence E June 5, 2020, 3:19 a.m. OK GNU C++14 TESTS 55 561 20377600 3000
82693463 SameerGulati E June 6, 2020, 9:58 a.m. OK GNU C++14 TESTS 55 576 55500800 3000
83165356 21August E June 8, 2020, 6:44 p.m. OK GNU C++14 TESTS 55 577 17920000 3000
83109525 Alfalfa_w E June 8, 2020, 7:20 a.m. OK GNU C++14 TESTS 55 608 11059200 3000
82621871 DBradac E June 5, 2020, 10:35 a.m. OK GNU C++14 TESTS 55 608 19251200 3000
82570494 gs12117 E June 4, 2020, 6:52 p.m. OK GNU C++14 TESTS 47 686 13004800 3000
83296234 zhouzhendong E June 10, 2020, 11:50 a.m. OK GNU C++14 TESTS 55 732 13312000 3000
83258089 yhx-12243 E June 9, 2020, 11:35 p.m. OK GNU C++17 TESTS 55 452 9216000 3000
83300008 Magicdog_Jo E June 10, 2020, 12:40 p.m. OK GNU C++17 TESTS 55 514 9318400 3000
82683754 guyan E June 6, 2020, 7:27 a.m. OK GNU C++17 TESTS 55 514 10342400 3000
82560373 oleh1421 E June 4, 2020, 5 p.m. OK GNU C++17 TESTS 47 514 18534400 3000
82547325 Marcin_smu E June 4, 2020, 4:24 p.m. OK GNU C++17 TESTS 47 545 14438400 3000
83205323 antekb E June 9, 2020, 9:36 a.m. OK GNU C++17 TESTS 55 561 12083200 3000
82742642 sayeedt E June 7, 2020, 12:49 a.m. OK GNU C++17 TESTS 55 577 9011200 3000
82579220 amethyst0 E June 4, 2020, 9:26 p.m. OK GNU C++17 TESTS 53 577 12595200 3000
82737456 vlchen888 E June 6, 2020, 8:55 p.m. OK GNU C++17 TESTS 55 623 11264000 3000
82517696 amethyst0 E June 4, 2020, 3:16 p.m. OK GNU C++17 TESTS 47 623 12595200 3000
82574591 majk E June 4, 2020, 7:45 p.m. OK GNU C++17 (64) TESTS 47 514 16588800 3000
83144593 AmShZ E June 8, 2020, 2:31 p.m. OK GNU C++17 (64) TESTS 55 545 21401600 3000
82574492 majk E June 4, 2020, 7:44 p.m. OK GNU C++17 (64) TESTS 47 607 16588800 3000
83514251 user202729_ E June 12, 2020, 9 a.m. OK GNU C++17 (64) TESTS 55 623 31948800 3000
82541491 KAN E June 4, 2020, 4:08 p.m. OK GNU C++17 (64) TESTS 47 732 21913600 3000
82745752 Ernestico E June 7, 2020, 3 a.m. OK GNU C++17 (64) TESTS 55 764 25702400 3000
82574537 majk E June 4, 2020, 7:44 p.m. OK GNU C++17 (64) TESTS 47 779 16588800 3000
83160059 Egor.Lifar E June 8, 2020, 5:31 p.m. OK GNU C++17 (64) TESTS 55 794 22118400 3000
82543445 I_love_chickpea E June 4, 2020, 4:13 p.m. OK GNU C++17 (64) TESTS 47 826 22425600 3000
82544569 Swistakk E June 4, 2020, 4:16 p.m. OK GNU C++17 (64) TESTS 47 842 73216000 3000
82584718 Lewin E June 5, 2020, 12:52 a.m. OK Java 11 TESTS 55 2058 53862400 3000
83111646 cwise E June 8, 2020, 7:48 a.m. OK Java 8 TESTS 55 1637 57344000 3000
83112646 cwise E June 8, 2020, 8:02 a.m. OK Java 8 TESTS 55 1809 59494400 3000
82596629 ahmadhoumani E June 5, 2020, 5:14 a.m. OK Java 8 TESTS 55 2262 91852800 3000
83285680 Spheniscine E June 10, 2020, 9:20 a.m. OK Kotlin TESTS 55 1387 15462400 3000

remove filters

Back to search problems