ICPC WF Moscow Invitational Contest - Online Mirror (Unrated, ICPC Rules, Teams Preferred)

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
1578 ICPC WF Moscow Invitational Contest - Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 98729699 Oct. 1, 2021, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9 ) C Cactus Lady and her Cing PROGRAMMING

B'Cactus lady loves her cactuses very much. Especially she likes a small cactus named Cing. Cing can be seen as a connected undirected graph in which every vertex lies on at most one simple cycle. Intuitively, a cactus is a generalization of a tree where some cycles are allowed. Multiedges (multiple edges between a pair of vertices) and loops (edges that connect a vertex to itself) are not allowed. She bought a special grid for her special little cactus Cing. This grid can be represented as a graph consisting of two paths of length 400 ,000 , u_{(0, -200 ,000)} - u_{(0, -199 ,999)} - ldots - u_{(0, 200 ,000)} and u_{(1, -200 ,000)} - u_{(1, -199 ,999)} - ldots - u_{(1, 200 ,000)} , connected together by 400 ,001 edges (u_{(0, i)}, u_{(1, i)}) for each i . In other words, a grid can be seen as a ladder. Cactus lady wants to know whether she can embed Cing into this grid, i.e., map each vertex of the cactus onto a separate vertex of the grid while each edge of the cactus will be mapped onto some edge of the grid. The first line contains an integer t -- the number of test cases. Each test case begins with a line containing two integers n and m -- the number of vertices and the number of edges in a given cactus, respectively ( 1 <= n <= 200 ,000 ; 0 <= m <= 250 ,000 ). Each of the following m lines contains two integers v and u , describing the edges of the cactus ( 1 <= v, u <= n, u ne v ). The total sum of all n in the input doesn 't exceed 200 ,000 . Print an answer for each test case in the same order the cases appear in the input. For each test case print "No" in the first line, if no layout exists. Otherwise print "Yes" in the first line, and the following n lines describing the layout. The i -th of these n lines should contain two integers x_i and y_i , the location of the i -th vertex ( 0 <= x_i <= 1 ; -200 ,00'...

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130511840 snuke C Oct. 2, 2021, 12:22 a.m. OK GNU C++17 (64) TESTS 43 732 88883200

remove filters

Back to search problems