CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)

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
1810 CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 7200 56993062 March 31, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3322 ) E Monsters PROGRAMMING brute force data structures dfs and similar ds graphs implementation trees

B'There is an undirected graph with n vertices and m edges. Initially, for each vertex i , there is a monster with danger a_{i} on that vertex. For a monster with danger a_{i} , you can defeat it if and only if you have defeated at least a_{i} other monsters before. Now you want to defeat all the monsters. First, you choose some vertex s and defeat the monster on that vertex (since you haven 't defeated any monsters before, a_{s} has to be 0 ). Then, you can move through the edges. If you want to move from vertex u to vertex v , then the following must hold: either the monster on vertex v has been defeated before, or you can defeat it now. For the second case, you defeat the monster on vertex v and reach vertex v . You can pass the vertices and the edges any number of times. Determine whether you can defeat all the monsters or not. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Their description follows. The first line of each test case contains two integers n , m ( 1 <= n, m <= 2 cdot 10^5 ) -- the number of vertices and edges in the graph respectively. The second line of each test case contains n integers a_{1}, a_{2}, ldots, a_{n} ( 0 <= a_{i} <= n ) -- the dangers of monsters on corresponding vertices. For the following m lines, each line contains two integers u , v ( 1 <= u, v <= n ), describing an edge connecting vertex u and vertex v . It is guaranteed that there are no multi-edges or self-loops in the graph. It is guaranteed that both the sum of n and the sum of m over all test cases do not exceed 2 cdot 10^5 . For each test case, output "YES" if you can defeat all the monsters, or "NO" otherwise. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes'...

Tutorials

Editorial of CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
200022739 Tdyx E March 31, 2023, 5:07 p.m. OK C# 10 TESTS 48 451 61235200
200063395 Jaswanth_1999 E April 1, 2023, 2:09 a.m. OK Clang++17 Diagnostics TESTS 50 1138 38195200
200024202 rainboy E March 31, 2023, 5:14 p.m. OK GNU C11 TESTS 49 140 11468800
200068815 an_interesting_name E April 1, 2023, 3:42 a.m. OK GNU C++14 TESTS 50 156 8192000
200069150 2020gangbazi E April 1, 2023, 3:47 a.m. OK GNU C++14 TESTS 50 171 7680000
200068807 2020gangbazi E April 1, 2023, 3:42 a.m. OK GNU C++14 TESTS 50 187 7680000
200066503 huazai676 E April 1, 2023, 3:05 a.m. OK GNU C++14 TESTS 50 202 9420800
200071003 huazai676 E April 1, 2023, 4:15 a.m. OK GNU C++14 TESTS 50 202 9420800
200060155 ix35 E April 1, 2023, 12:57 a.m. OK GNU C++14 TESTS 50 202 51609600
200021302 Francesco481 E March 31, 2023, 5:02 p.m. OK GNU C++14 TESTS 47 217 9318400
200029264 KiFaH_HeLaL E March 31, 2023, 5:49 p.m. OK GNU C++14 TESTS 50 218 17100800
200023432 usernameson E March 31, 2023, 5:10 p.m. OK GNU C++14 TESTS 48 233 12492800
200068049 yazhi. E April 1, 2023, 3:29 a.m. OK GNU C++14 TESTS 50 233 26931200
200030157 G_X_J E March 31, 2023, 5:56 p.m. OK GNU C++17 TESTS 50 108 18227200
200029852 G_X_J E March 31, 2023, 5:53 p.m. OK GNU C++17 TESTS 50 109 17305600
200023518 hl666 E March 31, 2023, 5:11 p.m. OK GNU C++17 TESTS 48 156 7577600
200035536 mlk_moaz_01 E March 31, 2023, 6:45 p.m. OK GNU C++17 TESTS 50 156 7577600
200022245 hl666 E March 31, 2023, 5:05 p.m. OK GNU C++17 TESTS 47 171 7577600
200072226 ChinaDWH E April 1, 2023, 4:33 a.m. OK GNU C++17 TESTS 50 171 10854400
200037543 Andrei_ierdnA E March 31, 2023, 7:07 p.m. OK GNU C++17 TESTS 50 186 12902400
200070892 Aicu E April 1, 2023, 4:14 a.m. OK GNU C++17 TESTS 50 187 7987200
200068953 Aicu E April 1, 2023, 3:44 a.m. OK GNU C++17 TESTS 50 202 7987200
200070959 Fiyuls E April 1, 2023, 4:15 a.m. OK GNU C++17 TESTS 50 202 8806400
200027932 Hackenbush E March 31, 2023, 5:37 p.m. OK GNU C++17 (64) TESTS 50 124 20070400
200064342 Liam_Evander E April 1, 2023, 2:26 a.m. OK GNU C++17 (64) TESTS 50 139 5632000
200026755 2020BNUAIer E March 31, 2023, 5:29 p.m. OK GNU C++17 (64) TESTS 49 156 10547200
200033432 egorsa E March 31, 2023, 6:25 p.m. OK GNU C++17 (64) TESTS 50 186 26112000
200059598 fakhoury E April 1, 2023, 12:41 a.m. OK GNU C++17 (64) TESTS 50 187 13926400
200037216 rapaz E March 31, 2023, 7:03 p.m. OK GNU C++17 (64) TESTS 50 187 13926400
200068883 anhkha2003 E April 1, 2023, 3:43 a.m. OK GNU C++17 (64) TESTS 50 187 19558400
200069671 anhkha2003 E April 1, 2023, 3:56 a.m. OK GNU C++17 (64) TESTS 50 187 19558400
200022259 Z_i_X E March 31, 2023, 5:05 p.m. OK GNU C++17 (64) TESTS 47 217 21401600
200073637 Amigomust E April 1, 2023, 4:50 a.m. OK GNU C++17 (64) TESTS 52 218 19251200
200026280 noya2 E March 31, 2023, 5:26 p.m. OK GNU C++20 (64) TESTS 49 93 10752000
200078863 1205691775 E April 1, 2023, 5:50 a.m. OK GNU C++20 (64) TESTS 52 93 10752000
200030185 G_X_J E March 31, 2023, 5:56 p.m. OK GNU C++20 (64) TESTS 50 108 22835200
200029411 vgtcross E March 31, 2023, 5:50 p.m. OK GNU C++20 (64) TESTS 50 109 5017600
200029019 vgtcross E March 31, 2023, 5:47 p.m. OK GNU C++20 (64) TESTS 50 109 5017600
200024193 areke E March 31, 2023, 5:14 p.m. OK GNU C++20 (64) TESTS 49 124 4096000
200037936 kaiboy E March 31, 2023, 7:11 p.m. OK GNU C++20 (64) TESTS 50 124 6451200
200052054 noomaK E March 31, 2023, 9:48 p.m. OK GNU C++20 (64) TESTS 50 124 6758400
200052031 -Kamoon- E March 31, 2023, 9:47 p.m. OK GNU C++20 (64) TESTS 50 124 6758400
200021879 _FireGhost_ E March 31, 2023, 5:04 p.m. OK GNU C++20 (64) TESTS 47 140 7680000
200039505 liangjiahui11 E March 31, 2023, 7:30 p.m. OK Go TESTS 50 514 39219200
200067664 manchik E April 1, 2023, 3:24 a.m. OK Go TESTS 50 623 55296000
200029010 profchi E March 31, 2023, 5:46 p.m. OK Java 11 TESTS 50 795 63385600
200017377 warks E March 31, 2023, 4:31 p.m. OK Java 11 TESTS 47 1044 55705600
200018983 Tourist_01 E March 31, 2023, 4:34 p.m. OK Java 11 TESTS 47 1387 87859200
200036547 Dukkha E March 31, 2023, 6:56 p.m. OK Java 17 TESTS 50 1060 8294400
200031385 merlin_ E March 31, 2023, 6:07 p.m. OK Java 17 TESTS 50 1091 89292800
200044703 this.is.shivamsingh E March 31, 2023, 8:27 p.m. OK Java 17 TESTS 50 1918 50380800
200052259 IanISam E March 31, 2023, 9:52 p.m. OK Java 8 TESTS 50 857 111104000
200052529 IanISam E March 31, 2023, 9:56 p.m. OK Java 8 TESTS 50 873 118067200
200051205 invincible777 E March 31, 2023, 9:37 p.m. OK Java 8 TESTS 50 967 106598400
200051344 invincible777 E March 31, 2023, 9:38 p.m. OK Java 8 TESTS 50 998 108134400
200039556 codicon E March 31, 2023, 7:30 p.m. OK PyPy 3 TESTS 50 795 31129600
200032919 hxu10 E March 31, 2023, 6:20 p.m. OK PyPy 3 TESTS 50 966 51916800
200026768 shobonvip E March 31, 2023, 5:29 p.m. OK PyPy 3 TESTS 49 982 41472000
200072657 BlackSpectre E April 1, 2023, 4:38 a.m. OK PyPy 3-64 TESTS 50 483 34713600
200058402 SoleProprietor E April 1, 2023, 12:08 a.m. OK PyPy 3-64 TESTS 50 483 34713600
200064588 SoleProprietor E April 1, 2023, 2:31 a.m. OK PyPy 3-64 TESTS 50 545 39936000
200064339 SoleProprietor E April 1, 2023, 2:26 a.m. OK PyPy 3-64 TESTS 50 577 37888000
200024008 zouyu9631 E March 31, 2023, 5:13 p.m. OK PyPy 3-64 TESTS 49 623 50790400
200077427 yuki_keshiki E April 1, 2023, 5:34 a.m. OK PyPy 3-64 TESTS 52 748 61440000
200024521 Maruzensky E March 31, 2023, 5:16 p.m. OK PyPy 3-64 TESTS 49 795 78848000
200030054 Leocosmos E March 31, 2023, 5:55 p.m. OK PyPy 3-64 TESTS 50 858 50176000
200054317 FlakeLCR E March 31, 2023, 10:30 p.m. OK PyPy 3-64 TESTS 50 920 71577600
200021612 zouyu9631 E March 31, 2023, 5:03 p.m. OK PyPy 3-64 TESTS 47 935 52121600
200026924 liut E March 31, 2023, 5:30 p.m. OK Rust 2021 TESTS 49 327 29491200

remove filters

Back to search problems