Codeforces Round 664 (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
1394 Codeforces Round 664 (Div. 1) FINISHED False 7200 140109911 Aug. 12, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2045 ) B Boboniu Walks on Graph PROGRAMMING brute force graphs hashing implementation meet-in-the-middle 2300

B"Boboniu has a directed graph with n vertices and m edges. The out-degree of each vertex is at most k . Each edge has an integer weight between 1 and m . No two edges have equal weights. Boboniu likes to walk on the graph with some specific rules, which is represented by a tuple (c_1,c_2, ldots,c_k) . If he now stands on a vertex u with out-degree i , then he will go to the next vertex by the edge with the c_i -th (1 <= c_i <= i) smallest weight among all edges outgoing from u . Now Boboniu asks you to calculate the number of tuples (c_1,c_2, ldots,c_k) such that The first line contains three integers n , m and k ( 2 <= n <= 2 cdot 10^5 , 2 <= m <= min(2 cdot 10^5,n(n-1) ) , 1 <= k <= 9 ). Each of the next m lines contains three integers u , v and w (1 <= u,v <= n,u ne v,1 <= w <= m) , denoting an edge from u to v with weight w . It is guaranteed that there are no self-loops or multiple edges and each vertex has at least one edge starting from itself. It is guaranteed that the out-degree of each vertex is at most k and no two edges have equal weight. Print one integer: the number of tuples. For the first example, there are two tuples: (1,1,3) and (1,2,3) . The blue edges in the picture denote the c_i -th smallest edges for each vertex, which Boboniu chooses to go through. For the third example, there's only one tuple: (1,2,2,2) . The out-degree of vertex u means the number of edges outgoing from u . "...

Tutorials

Codeforces Round #664 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
89689204 Gassa B Aug. 12, 2020, 3:14 p.m. OK D TESTS 45 233 14950400 2300
89853975 Tommy0103 B Aug. 14, 2020, 8:25 a.m. OK GNU C++11 TESTS 46 46 9318400 2300
89839264 Qza_AC B Aug. 14, 2020, 4:02 a.m. OK GNU C++11 TESTS 46 46 9625600 2300
89774649 Rainbow_sjy B Aug. 13, 2020, 8:16 a.m. OK GNU C++11 TESTS 46 61 12595200 2300
89785558 luogu_bot3 B Aug. 13, 2020, 10:45 a.m. OK GNU C++11 TESTS 46 62 6451200 2300
89875772 autoint B Aug. 14, 2020, 1:52 p.m. OK GNU C++11 TESTS 46 62 7270400 2300
91124927 JasonLan B Aug. 27, 2020, 10:40 a.m. OK GNU C++11 TESTS 46 62 8908800 2300
90882200 Tian_Xing B Aug. 25, 2020, 8:27 a.m. OK GNU C++11 TESTS 46 62 9318400 2300
90899819 jzh817 B Aug. 25, 2020, 12:42 p.m. OK GNU C++11 TESTS 46 62 9625600 2300
89762866 yuzhechuan B Aug. 13, 2020, 5:33 a.m. OK GNU C++11 TESTS 46 62 10956800 2300
91692716 Feng B Sept. 3, 2020, 6:30 a.m. OK GNU C++11 TESTS 46 62 42496000 2300
90827680 nitvjudge3 B Aug. 24, 2020, 1:04 p.m. OK GNU C++14 TESTS 46 62 11980800 2300
89754310 11235813213455 B Aug. 13, 2020, 2:45 a.m. OK GNU C++14 TESTS 46 93 9113600 2300
89721382 11235813213455 B Aug. 12, 2020, 4:22 p.m. OK GNU C++14 TESTS 45 93 9113600 2300
89783641 YLWang B Aug. 13, 2020, 10:17 a.m. OK GNU C++14 TESTS 46 93 15257600 2300
89754180 11235813213455 B Aug. 13, 2020, 2:42 a.m. OK GNU C++14 TESTS 46 109 9113600 2300
89755649 KbMu B Aug. 13, 2020, 3:15 a.m. OK GNU C++14 TESTS 46 124 8192000 2300
91100652 oipotato B Aug. 27, 2020, 3:44 a.m. OK GNU C++14 TESTS 46 124 10444800 2300
90449590 uk224 B Aug. 20, 2020, 9:20 a.m. OK GNU C++14 TESTS 46 124 10649600 2300
89773625 raghav_19 B Aug. 13, 2020, 8:04 a.m. OK GNU C++14 TESTS 46 139 7372800 2300
89822328 krijgertje B Aug. 13, 2020, 6:58 p.m. OK GNU C++14 TESTS 46 140 6553600 2300
90523670 ShiinaMahiru B Aug. 21, 2020, 10:36 a.m. OK GNU C++17 TESTS 46 62 12288000 2300
89750059 Lezedary_sandwich B Aug. 13, 2020, 12:33 a.m. OK GNU C++17 TESTS 46 93 11468800 2300
89750163 J_B_Y B Aug. 13, 2020, 12:38 a.m. OK GNU C++17 TESTS 46 93 13516800 2300
90266142 spatarel B Aug. 17, 2020, 10:44 p.m. OK GNU C++17 TESTS 46 124 86528000 2300
89755016 tsyr8924503 B Aug. 13, 2020, 3 a.m. OK GNU C++17 TESTS 46 139 7372800 2300
89747418 Kripton2005 B Aug. 12, 2020, 10:38 p.m. OK GNU C++17 TESTS 46 140 5836800 2300
89730920 I_love_ICHB B Aug. 12, 2020, 5:41 p.m. OK GNU C++17 TESTS 46 140 5836800 2300
89982710 newgate B Aug. 15, 2020, 3:18 a.m. OK GNU C++17 TESTS 46 140 7372800 2300
89717682 Son B Aug. 12, 2020, 4:12 p.m. OK GNU C++17 TESTS 45 140 8192000 2300
89756020 DXTsT B Aug. 13, 2020, 3:23 a.m. OK GNU C++17 TESTS 46 140 8704000 2300
89689040 Egor B Aug. 12, 2020, 3:13 p.m. OK GNU C++17 (64) TESTS 45 62 12083200 2300
89785374 Joney B Aug. 13, 2020, 10:43 a.m. OK GNU C++17 (64) TESTS 46 77 13721600 2300
89678074 QAQAutoMaton B Aug. 12, 2020, 3 p.m. OK GNU C++17 (64) TESTS 45 77 15462400 2300
90010181 GRT_2018 B Aug. 15, 2020, 10:28 a.m. OK GNU C++17 (64) TESTS 46 109 3993600 2300
91551893 dimas.kovas B Sept. 1, 2020, 9:17 a.m. OK GNU C++17 (64) TESTS 46 109 4812800 2300
89760404 thtsshz_bgwrswh B Aug. 13, 2020, 4:52 a.m. OK GNU C++17 (64) TESTS 46 109 12902400 2300
89758188 neal B Aug. 13, 2020, 4:08 a.m. OK GNU C++17 (64) TESTS 46 109 12902400 2300
89686030 yosupo B Aug. 12, 2020, 3:09 p.m. OK GNU C++17 (64) TESTS 45 109 17203200 2300
89832967 Ernestico B Aug. 14, 2020, 1:01 a.m. OK GNU C++17 (64) TESTS 46 124 8908800 2300
89877217 WiwiHo B Aug. 14, 2020, 2:14 p.m. OK GNU C++17 (64) TESTS 46 124 9625600 2300
89737788 Xylenox B Aug. 12, 2020, 6:53 p.m. OK Go TESTS 46 717 15462400 2300
89861030 uwi B Aug. 14, 2020, 10:16 a.m. OK Java 11 TESTS 46 295 10035200 2300
89861206 uwi B Aug. 14, 2020, 10:19 a.m. OK Java 11 TESTS 46 295 10035200 2300
89861132 uwi B Aug. 14, 2020, 10:18 a.m. OK Java 11 TESTS 46 296 10035200 2300
91031550 Ahmad B Aug. 26, 2020, 8:15 a.m. OK Java 11 TESTS 46 311 9011200 2300
89741673 Dukkha B Aug. 12, 2020, 8 p.m. OK Java 11 TESTS 46 311 16793600 2300
89860987 uwi B Aug. 14, 2020, 10:15 a.m. OK Java 11 TESTS 46 389 12390400 2300
89860851 uwi B Aug. 14, 2020, 10:13 a.m. OK Java 11 TESTS 46 404 11468800 2300
89746701 ZeyadKhattab B Aug. 12, 2020, 10:13 p.m. OK Java 11 TESTS 46 483 34201600 2300
90492840 idk321 B Aug. 20, 2020, 7:41 p.m. OK Java 11 TESTS 46 498 33792000 2300
90347859 mphillotry B Aug. 18, 2020, 11:26 p.m. OK Java 11 TESTS 46 499 36352000 2300
89687264 cwise B Aug. 12, 2020, 3:11 p.m. OK Java 8 TESTS 45 358 49459200 2300
90261789 MagentaCobra B Aug. 17, 2020, 8:20 p.m. OK Java 8 TESTS 46 374 33382400 2300
91528987 overACer B Sept. 1, 2020, 12:40 a.m. OK Java 8 TESTS 46 389 35430400 2300
89747368 AnandOza B Aug. 12, 2020, 10:37 p.m. OK Java 8 TESTS 46 421 33075200 2300
89723302 Agnimandur B Aug. 12, 2020, 4:26 p.m. OK Java 8 TESTS 45 436 16281600 2300
89746886 AnandOza B Aug. 12, 2020, 10:20 p.m. OK Java 8 TESTS 46 436 32972800 2300
89746861 AnandOza B Aug. 12, 2020, 10:19 p.m. OK Java 8 TESTS 46 436 33075200 2300
91105569 chesiver B Aug. 27, 2020, 5:41 a.m. OK Java 8 TESTS 46 436 33280000 2300
90702192 yaoct B Aug. 22, 2020, 4:07 p.m. OK Java 8 TESTS 46 452 57958400 2300
89723218 ijxjdjd B Aug. 12, 2020, 4:26 p.m. OK Java 8 TESTS 45 482 31539200 2300
89692992 Sugimoto B Aug. 12, 2020, 3:19 p.m. OK Kotlin TESTS 45 514 43520000 2300
89764347 yakamoto B Aug. 13, 2020, 5:57 a.m. OK Kotlin TESTS 46 545 33280000 2300
89758584 terry_u16 B Aug. 13, 2020, 4:16 a.m. OK Mono C# TESTS 46 467 25190400 2300
89787891 Mickey-snow B Aug. 13, 2020, 11:19 a.m. OK Mono C# TESTS 46 530 26316800 2300
89751678 mban259 B Aug. 13, 2020, 1:33 a.m. OK Mono C# TESTS 46 624 45875200 2300
89731825 azukun B Aug. 12, 2020, 5:47 p.m. OK Mono C# TESTS 46 888 24371200 2300
89732742 azukun B Aug. 12, 2020, 5:54 p.m. OK Mono C# TESTS 46 998 159334400 2300
89793497 q8_514199 B Aug. 13, 2020, 12:31 p.m. OK MS C++ 2017 TESTS 46 202 8089600 2300
90002379 wp32pw B Aug. 15, 2020, 8:40 a.m. OK MS C++ 2017 TESTS 46 342 20172800 2300
89737658 nns2009 B Aug. 12, 2020, 6:51 p.m. OK MS C++ 2017 TESTS 46 452 11264000 2300
89737556 nns2009 B Aug. 12, 2020, 6:50 p.m. OK MS C++ 2017 TESTS 46 514 11264000 2300
90508689 codershuvo B Aug. 21, 2020, 6:53 a.m. OK PyPy 2 TESTS 46 685 57651200 2300
90508713 codershuvo B Aug. 21, 2020, 6:54 a.m. OK PyPy 3 TESTS 46 670 60518400 2300
89804747 PhilTheFish B Aug. 13, 2020, 2:50 p.m. OK PyPy 3 TESTS 46 732 59187200 2300
89762369 titia B Aug. 13, 2020, 5:26 a.m. OK PyPy 3 TESTS 46 748 39833600 2300
89737058 chinerist B Aug. 12, 2020, 6:42 p.m. OK PyPy 3 TESTS 46 795 66969600 2300
89792730 Kiri8128 B Aug. 13, 2020, 12:21 p.m. OK PyPy 3 TESTS 46 857 35635200 2300
89790446 Kiri8128 B Aug. 13, 2020, 11:53 a.m. OK PyPy 3 TESTS 46 857 36147200 2300
89756096 chinerist B Aug. 13, 2020, 3:25 a.m. OK PyPy 3 TESTS 46 873 41369600 2300
89731055 juppy B Aug. 12, 2020, 5:42 p.m. OK PyPy 3 TESTS 46 889 30003200 2300
89792633 Kiri8128 B Aug. 13, 2020, 12:20 p.m. OK PyPy 3 TESTS 46 889 37068800 2300
89792276 Kiri8128 B Aug. 13, 2020, 12:16 p.m. OK PyPy 3 TESTS 46 904 37068800 2300
90169617 xavier13540 B Aug. 16, 2020, 6:07 p.m. OK Rust TESTS 46 124 7270400 2300
89729088 sansen B Aug. 12, 2020, 5:32 p.m. OK Rust TESTS 45 187 41164800 2300
89827258 Russell_Emerine B Aug. 13, 2020, 8:54 p.m. OK Rust TESTS 46 280 47718400 2300

remove filters

Back to search problems