Codeforces Round 933 (Div. 3)

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
1941 Codeforces Round 933 (Div. 3) FINISHED False 8100 27012263 March 11, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3710 ) G Rudolf and Subway PROGRAMMING dfs and similar graphs shortest paths

B'Building bridges did not help Bernard, and he continued to be late everywhere. Then Rudolf decided to teach him how to use the subway. Rudolf depicted the subway map as an undirected connected graph, without self-loops, where the vertices represent stations. There is at most one edge between any pair of vertices. Two vertices are connected by an edge if it is possible to travel directly between the corresponding stations, bypassing other stations. The subway in the city where Rudolf and Bernard live has a color notation. This means that any edge between stations has a specific color. Edges of a specific color together form a subway line. A subway line cannot contain unconnected edges and forms a connected subgraph of the given subway graph. An example of the subway map is shown in the figure. Rudolf claims that the route will be optimal if it passes through the minimum number of subway lines. Help Bernard determine this minimum number for the given departure and destination stations. The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. This is followed by descriptions of the test cases. The first line of each test case contains two integers n and m ( 2 <= n <= 2 cdot 10^5, 1 <= m <= 2 cdot 10^5 ) -- the number of subway stations and the number of direct routes between stations (i.e., graph edges). This is followed by m lines -- the description of the edges. Each line of the description contains three integers u , v , and c ( 1 <= u, v <= n, u ne v, 1 <= c <= 2 cdot 10^5 ) -- the numbers of the vertices between which there is an edge, and the color of this edge. It is guaranteed that edges of the same color form a connected subgraph of the given subway graph. There is at most one edge between a pair of any two vertices. This is followed by two integers b and e ( 1 <= b, e <= n ) -- the departure and destination stations. The sum of all $'...

Tutorials

127018

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
250828310 controlunit19 G March 11, 2024, 6:11 p.m. OK C++14 (GCC 6-32) TESTS 43 217 11776000
250865705 d2ep4k G March 12, 2024, 2:12 a.m. OK C++14 (GCC 6-32) TESTS 43 296 18124800
250829020 Nikhil2946 G March 11, 2024, 6:16 p.m. OK C++14 (GCC 6-32) TESTS 43 296 19456000
250872972 cxlian G March 12, 2024, 3:53 a.m. OK C++14 (GCC 6-32) TESTS 43 342 43110400
250873404 kavascg G March 12, 2024, 3:59 a.m. OK C++14 (GCC 6-32) TESTS 43 483 19251200
250884445 d1041231071 G March 12, 2024, 5:53 a.m. OK C++14 (GCC 6-32) TESTS 43 530 22732800
250829969 cleanser G March 11, 2024, 6:23 p.m. OK C++14 (GCC 6-32) TESTS 43 639 31436800
250838658 Hitler_Adolf G March 11, 2024, 7:38 p.m. OK C++14 (GCC 6-32) TESTS 43 826 13414400
250842278 A.n.o.n.y.m.o.u.s G March 11, 2024, 8:11 p.m. OK C++14 (GCC 6-32) TESTS 43 888 25804800
250849259 shreyashi0220 G March 11, 2024, 9:23 p.m. OK C++14 (GCC 6-32) TESTS 43 966 16486400
250874482 Lackofgod G March 12, 2024, 4:12 a.m. OK C++17 (GCC 7-32) TESTS 43 186 13209600
250870534 hhdhh G March 12, 2024, 3:22 a.m. OK C++17 (GCC 7-32) TESTS 43 187 12185600
250869237 Rafael_Y G March 12, 2024, 3:04 a.m. OK C++17 (GCC 7-32) TESTS 43 202 9830400
250881157 raed123 G March 12, 2024, 5:27 a.m. OK C++17 (GCC 7-32) TESTS 43 202 10444800
250840032 MiinaMagdy G March 11, 2024, 7:51 p.m. OK C++17 (GCC 7-32) TESTS 43 202 11776000
250885090 knightzzz1 G March 12, 2024, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 43 202 13824000
250866234 -XXP- G March 12, 2024, 2:21 a.m. OK C++17 (GCC 7-32) TESTS 43 202 13926400
250852018 Eslam_Saleh G March 11, 2024, 10 p.m. OK C++17 (GCC 7-32) TESTS 43 217 13721600
250840959 Rania G March 11, 2024, 8 p.m. OK C++17 (GCC 7-32) TESTS 43 217 15052800
250874216 TJUHuangTao G March 12, 2024, 4:08 a.m. OK C++17 (GCC 7-32) TESTS 43 217 15257600
250837535 Rememorio G March 11, 2024, 7:28 p.m. OK Go TESTS 43 327 24268800
250864034 sugar2023 G March 12, 2024, 1:42 a.m. OK Go TESTS 43 327 32460800
250836354 nguyenquocthao00 G March 11, 2024, 7:16 p.m. OK Go TESTS 43 327 47308800
250851748 lorenzotinfena G March 11, 2024, 9:56 p.m. OK Go TESTS 43 935 37478400
250827413 _global G March 11, 2024, 6:04 p.m. OK Java 21 TESTS 43 951 74137600
250829063 dzhi G March 11, 2024, 6:16 p.m. OK Java 21 TESTS 43 997 58368000
250828917 dzhi G March 11, 2024, 6:15 p.m. OK Java 21 TESTS 43 1075 58982400
250874301 2100031465 G March 12, 2024, 4:09 a.m. OK Java 8 TESTS 43 1653 63590400
250879214 ikillmyself G March 12, 2024, 5:07 a.m. OK Java 8 TESTS 43 1934 153088000
250868701 ikillmyself G March 12, 2024, 2:56 a.m. OK Java 8 TESTS 43 1981 153088000
250880998 YMSeah G March 12, 2024, 5:26 a.m. OK PyPy 3 TESTS 43 842 42700800
250855293 strashila G March 11, 2024, 10:58 p.m. OK PyPy 3-64 TESTS 43 545 67481600
250880843 yuki_keshiki G March 12, 2024, 5:25 a.m. OK PyPy 3-64 TESTS 43 561 51200000
250852252 _aadiupadhyay_ G March 11, 2024, 10:04 p.m. OK PyPy 3-64 TESTS 43 576 78848000
250868547 Little_Sheep_Yawn G March 12, 2024, 2:54 a.m. OK PyPy 3-64 TESTS 43 639 45875200
250851273 Lotrick G March 11, 2024, 9:49 p.m. OK PyPy 3-64 TESTS 43 654 95129600
250864323 voicon G March 12, 2024, 1:47 a.m. OK PyPy 3-64 TESTS 43 701 61542400
250875797 cybsbbb G March 12, 2024, 4:28 a.m. OK PyPy 3-64 TESTS 43 748 58470400
250878988 hato_ G March 12, 2024, 5:05 a.m. OK PyPy 3-64 TESTS 43 1185 118067200
250853307 edugong G March 11, 2024, 10:22 p.m. OK PyPy 3-64 TESTS 43 1700 56832000
250834620 cy171 G March 11, 2024, 7 p.m. OK PyPy 3-64 TESTS 43 1700 87859200
250833302 OLOGY G March 11, 2024, 6:49 p.m. OK Python 2 TESTS 43 1014 54374400
250832962 OLOGY G March 11, 2024, 6:46 p.m. OK Python 2 TESTS 43 1060 54579200
250876747 OLOGY G March 12, 2024, 4:40 a.m. OK Python 2 TESTS 43 1746 110899200
250874612 OLOGY G March 12, 2024, 4:13 a.m. OK Python 2 TESTS 43 1794 110796800
250876995 OLOGY G March 12, 2024, 4:43 a.m. OK Python 2 TESTS 43 1809 110796800
250877111 OLOGY G March 12, 2024, 4:45 a.m. OK Python 2 TESTS 43 1825 110899200
250875564 OLOGY G March 12, 2024, 4:26 a.m. OK Python 2 TESTS 43 1840 110796800
250830505 OLOGY G March 11, 2024, 6:27 p.m. OK Python 2 TESTS 43 1886 110796800
250876923 OLOGY G March 12, 2024, 4:42 a.m. OK Python 2 TESTS 43 1949 110796800
250875278 OLOGY G March 12, 2024, 4:22 a.m. OK Python 2 TESTS 43 1996 110796800
250872645 classic21 G March 12, 2024, 3:48 a.m. OK Python 3 TESTS 43 1263 132608000
250880039 krism G March 12, 2024, 5:16 a.m. OK Python 3 TESTS 43 1902 149708800
250833442 vstiff G March 11, 2024, 6:50 p.m. OK Rust 2021 TESTS 43 155 28364800

remove filters

Back to search problems