2025-2026 ICPC, NERC, Northern Eurasia Finals (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
2181 2025-2026 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 10446923 Dec. 17, 2025, 8:05 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 140 ) C Cacti Classification PROGRAMMING binary search interactive math

Ivan and Petr like to play with cacti — special graphs where each edge belongs to at most one simple cycle, and the graph is connected. Multiple edges between pairs of vertices and loops are allowed. They invent the following game: Petr secretly builds a cactus with (n) vertices and (m) edges. The edges are labeled from (1) to (m). Petr only tells Ivan the number (m). Ivan is then allowed to ask questions of the following form: He chooses a subset (S) of edge labels (see below about limitations on the subset), and asks: "If we only keep the edges whose labels are in (S) (and all (n) vertices), is the resulting graph connected?" Petr must answer either "yes" or "no". He chooses a subset (S) of edge labels (see below about limitations on the subset), and asks: "If we only keep the edges whose labels are in (S) (and all (n) vertices), is the resulting graph connected?" Petr must answer either "yes" or "no". After asking at most (8m) questions, Ivan must determine, for every edge: whether this edge lies on some cycle in the cactus; if it does, what is the length of that simple cycle. In this problem, each loop is considered a simple cycle of length (1) and two edges between the same pair of vertices form a simple cycle of length (2). However, Ivan is still very young and only knows numbers up to (14). So: if an edge lies on a simple cycle of length at most (14), he must output that exact length; if an edge lies on a simple cycle of length greater than (14), he must say that this edge lies on a big cycle . Also, to avoid having to list a lot of edges each time, Ivan always asks about an edge set obtained from the set used in one of the previous queries, or from the set of all edges, by removing exactly one edge. Can you design a strategy that allows Ivan to complete this task? Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
353847078 StarSilk C Dec. 17, 2025, 12:30 p.m. OK C++20 (GCC 13-64) TESTS 114 265 102400
353840930 Boboge Fantasy_Blue geospiza C Dec. 17, 2025, 11:53 a.m. OK C++20 (GCC 13-64) TESTS 114 265 102400
353815449 Kevin114514 jiangly jqdai0815 C Dec. 17, 2025, 9:35 a.m. OK C++23 (GCC 14-64, msys2) TESTS 114 203 102400
353832952 Adam_GS ArturSmolenski C Dec. 17, 2025, 11:07 a.m. OK C++23 (GCC 14-64, msys2) TESTS 114 281 102400

remove filters

Back to search problems