Educational Codeforces Round 180 (Rated for Div. 2)

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
2112 Educational Codeforces Round 180 (Rated for Div. 2) FINISHED False 7200 25716323 June 23, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 626 ) F Variables and Operations PROGRAMMING graphs greedy shortest paths

There are (n) variables; let's denote the value of the (i)-th variable as (a_i). There are also (m) operations which will be applied to these variables; the (i)-th operation is described by three integers (x_i, y_i, z_i). When the (i)-th operation is applied, the variable (x_i) gets assigned the following value: (\min(a_{x_i}, a_{y_i} + z_i)). Every operation will be applied exactly once , but their order is not fixed; they can be applied in any order. Let's call a sequence of initial variable values (a_1, a_2, \dots, a_n) stable , if no matter in which order we apply operations, the resulting values will be the same. If the resulting value of the (i)-th variable depends on the order of operations, then the sequence of initial variable values is called (i)- unstable . You have to process (q) queries. In each query, you will be given initial values (a_1, a_2, \dots, a_n) and an integer (k); before applying the operations, you can at most (k) times choose a variable and decrease it by (1). For every variable (i), you have to independently determine if it is possible to transform the given values into an (i)-unstable sequence. The first line contains two integers (n) and (m) ((2 \le n \le 500); (1 \le m \le 4 \cdot 10^5)) — the number of variables and operations, respectively. Then, (m) lines follow. The (i)-th of them contains three integers (x_i, y_i, z_i) ((1 \le x_i, y_i \le n); (x_i \ne y_i); (0 \le z_i \le 10^5)) — the description of the (i)-th operation. The next line contains one integer (q) ((1 \le q \le 1000)) — the number of queries. Each query consists of two lines: the first line contains one integer (k) ((0 \le k \le 10^9)) — the maximum number of times you can choose a variable and decrease it by (1); the second line contains (n) integers (a_1, a_2, \dots, a_n) ((0 \le a_i \le 10^9)) — the initi

Tutorials

Educational Codeforces Round 180 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
325952529 ValeriyShiyan F June 25, 2025, 3:46 a.m. OK C# 10 TESTS 90 4718 16384000
325939556 Kyte F June 24, 2025, 10:42 p.m. OK C++17 (GCC 7-32) TESTS 90 1155 2048000
325850939 wwwaz F June 24, 2025, 1:22 a.m. OK C++17 (GCC 7-32) TESTS 90 1280 2150400
325950399 Lightwhite F June 25, 2025, 3:14 a.m. OK C++17 (GCC 7-32) TESTS 90 1374 2048000
325903733 Mahjong_Triple F June 24, 2025, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 90 1812 2150400
325828736 akulsareen F June 23, 2025, 6:02 p.m. OK C++17 (GCC 7-32) TESTS 90 1890 2150400
325951402 sunchaoyi F June 25, 2025, 3:28 a.m. OK C++17 (GCC 7-32) TESTS 90 2156 102400
325894458 chennie F June 24, 2025, 3:31 p.m. OK C++17 (GCC 7-32) TESTS 90 2609 102400
325854367 CrispyLobster F June 24, 2025, 10:08 a.m. OK C++17 (GCC 7-32) TESTS 90 3015 2457600
325844826 _odium F June 23, 2025, 9:51 p.m. OK C++17 (GCC 7-32) TESTS 90 3953 4198400
325919543 Chaeryeong F June 24, 2025, 6:34 p.m. OK C++17 (GCC 7-32) TESTS 90 3984 102400
325925665 weirdflexbutok F June 24, 2025, 7:43 p.m. OK C++20 (GCC 13-64) TESTS 90 890 102400
325835951 NickMish F June 23, 2025, 7:09 p.m. OK C++20 (GCC 13-64) TESTS 90 952 102400
325943015 dengyufan F June 25, 2025, 12:40 a.m. OK C++20 (GCC 13-64) TESTS 90 1109 2048000
325829124 fanhuaxingyu F June 23, 2025, 6:05 p.m. OK C++20 (GCC 13-64) TESTS 90 1202 102400
325821210 Kirkon F June 23, 2025, 5:08 p.m. OK C++20 (GCC 13-64) TESTS 90 1389 102400
325842096 turkhuu622 F June 23, 2025, 8:51 p.m. OK C++20 (GCC 13-64) TESTS 90 1421 102400
325939072 ahmetalp F June 24, 2025, 10:25 p.m. OK C++20 (GCC 13-64) TESTS 90 1437 102400
325837823 retarddestroyer F June 23, 2025, 7:37 p.m. OK C++20 (GCC 13-64) TESTS 90 1499 8704000
325947643 xcc_szy0905 F June 25, 2025, 2:33 a.m. OK C++20 (GCC 13-64) TESTS 90 1624 4198400
325841904 turkhuu622 F June 23, 2025, 8:47 p.m. OK C++20 (GCC 13-64) TESTS 90 1718 1945600
325820942 Joler_ F June 23, 2025, 5:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 90 905 102400
325960020 jianjianj F June 25, 2025, 5:30 a.m. OK C++23 (GCC 14-64, msys2) TESTS 90 952 102400
325907395 DanielChang F June 24, 2025, 5 p.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1171 2048000
325835867 Auchenai01 F June 23, 2025, 7:08 p.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1202 102400
325826154 Abilmansur-K-008-27 F June 23, 2025, 5:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1265 5836800
325948297 Dominater069 F June 25, 2025, 2:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1311 819200
325851639 phtniit F June 24, 2025, 9:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1327 2150400
325824943 tosivanmak F June 23, 2025, 5:33 p.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1452 12595200
325865958 PinkieRabbit F June 24, 2025, 11:44 a.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1499 2150400
325919225 waste_ F June 24, 2025, 6:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 90 1577 4198400
325901033 DanielAnker F June 24, 2025, 4:16 p.m. OK Rust 2021 TESTS 90 4234 12492800

remove filters

Back to search problems