2022-2023 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, 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
1773 2022-2023 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 106005323 Dec. 7, 2022, 8:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 140 ) J Jumbled Trees PROGRAMMING 2900

You are given an undirected connected graph with (n) vertices and (m) edges. Each edge has an associated counter, initially equal to (0). In one operation, you can choose an arbitrary spanning tree and add any value (v) to all edges of this spanning tree. Determine if it's possible to make every counter equal to its target value (x_i) modulo prime (p), and provide a sequence of operations that achieves it. The first line contains three integers (n), (m), and (p) — the number of vertices, the number of edges, and the prime modulus ((1 \le n \le 500); (1 \le m \le 1000); (2 \le p \le 10^9), (p) is prime). Next (m) lines contain three integers (u_i), (v_i), (x_i) each — the two endpoints of the (i)-th edge and the target value of that edge's counter ((1 \le u_i, v_i \le n); (0 \le x_i < p); (u_i \neq v_i)). The graph is connected. There are no loops, but there may be multiple edges between the same two vertices. If the target values on counters cannot be achieved, print -1 . Otherwise, print (t) — the number of operations, followed by (t) lines, describing the sequence of operations. Each line starts with integer (v) ((0 \le v < p)) — the counter increment for this operation. Then, in the same line, followed by (n - 1) integers (e_1), (e_2), ... (e_{n - 1}) ((1 \le e_i \le m)) — the edges of the spanning tree. The number of operations (t) should not exceed (2m). You don't need to minimize (t). Any correct answer within the (2m) bound is accepted. You are allowed to repeat spanning trees.

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
184224806 QCFium E869120 square1001 J Dec. 7, 2022, 12:51 p.m. OK GNU C++17 TESTS 111 93 3891200 2900
184193682 mango_lassi rivalq -is-this-fft- J Dec. 7, 2022, 10:25 a.m. OK GNU C++17 (64) TESTS 111 109 4710400 2900
184221697 orzdevinwang J Dec. 7, 2022, 12:23 p.m. OK GNU C++17 (64) TESTS 111 109 16793600 2900
184192927 EternalAlexander zech yizr_cnyali J Dec. 7, 2022, 10:17 a.m. OK GNU C++17 (64) TESTS 111 233 5017600 2900
184186051 AlternatingCurrent njwrz CrTsIr J Dec. 7, 2022, 9:44 a.m. OK GNU C++20 (64) TESTS 111 93 18227200 2900
184220608 snuke hos.lyric maroonrk J Dec. 7, 2022, 12:11 p.m. OK GNU C++20 (64) TESTS 111 109 9011200 2900
184209528 353cerega Batrr mhq J Dec. 7, 2022, 11:12 a.m. OK GNU C++20 (64) TESTS 111 124 7065600 2900
184216302 MiracleFaFa J Dec. 7, 2022, 11:30 a.m. OK GNU C++20 (64) TESTS 111 156 4915200 2900
184241977 2qbingxuan J Dec. 7, 2022, 3:41 p.m. OK GNU C++20 (64) TESTS 111 249 49664000 2900
184261254 SSerxhs J Dec. 7, 2022, 7:07 p.m. OK GNU C++20 (64) TESTS 111 2261 2764800 2900
184219662 cnnfls_csy MonkeyKing Alex_Wei J Dec. 7, 2022, 12:02 p.m. OK GNU C++20 (64) TESTS 111 2339 32358400 2900

remove filters

Back to search problems