Codeforces Round 923 (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
1927 Codeforces Round 923 (Div. 3) FINISHED False 8100 24592499 Feb. 6, 2024, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4444 ) F Microcycle PROGRAMMING data structures dfs and similar ds graphs greedy trees

B"Given an undirected weighted graph with n vertices and m edges. There is at most one edge between each pair of vertices in the graph, and the graph does not contain loops (edges from a vertex to itself). The graph is not necessarily connected. A cycle in the graph is called simple if it doesn't pass through the same vertex twice and doesn't contain the same edge twice. Find any simple cycle in this graph in which the weight of the lightest edge is minimal. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then follow the descriptions of the test cases. The first line of each test case contains two integers n and m ( 3 <= n <= m <= min( frac{n cdot(n - 1)}{2}, 2 cdot 10^5) ) -- the size of the graph and the number of edges. The next m lines of the test case contain three integers u , v , and w ( 1 <= u, v <= n , u ne v , 1 <= w <= 10^6 ) -- vertices u and v are connected by an edge of weight w . It is guaranteed that there is at most one edge between each pair of vertices. Note that under the given constraints, there is always at least one simple cycle in the graph. It is guaranteed that the sum of the values of m for all test cases does not exceed 2 cdot 10^5 . For each test case, output a pair of numbers b and k , where: On the next line, output k numbers from 1 to n -- the vertices of the cycle in traversal order. Note that the answer always exists, as under the given constraints, there is always at least one simple cycle in the graph. "...

Tutorials

125597

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
245270446 NenadDapic F Feb. 6, 2024, 11:08 p.m. OK FPC TESTS 36 826 41984000

remove filters

Back to search problems