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.
Problems
In an interdisciplinary collaboration, an ecosystem scientist and a computer scientist join forces to analyze the structure of a complex ecosystem using computational methods. The ecosystem scientist models the ecosystem as a directed graph (D = (V, A)), where each species is represented by a node (v \in V), and each feeding relationship is represented as a directed edge ((x, y) \in A) from prey (x) to predator (y). This graph structure allows them to simulate the flow of energy throughout the ecosystem from one species to another. Two essential features of the ecosystem are defined: Independent Trophic Group : A set (S) of animal species is classified as an independent trophic group if no species (x \in S) can reach another species (y \in S) (for some (y \ne x)) through a series of directed feeding relationships, meaning there is no directed path in (D) from (x) to (y). Trophic Balance Species : A species is termed a trophic balance species if it has a nearly equal number of species that affect it as directly or indirectly predators (species it can reach via a directed path in (D), excluding itself) and species that affect it as directly or indirectly prey (species that can reach it via a directed path in (D), excluding itself). Specifically, trophic balance species are those for which the absolute difference between the above two numbers is minimum among all species in the ecosystem. Consider an ecosystem with (n = 4) species and (m = 3) feeding relationships: Species 1: Grass (Node 1) Species 2: Rabbits (Node 2) Species 3: Foxes (Node 3) Species 4: Hawks (Node 4) The directed edges representing the feeding relationships are as follows: ((1, 2)): Grass is eaten by Rabbits. ((2, 3)): Rabbits are eaten by Foxes. ((2, 4)): Rabbits are also eaten by Hawks. Now, consider the set (S=\{3,4\}) (Foxes and Hawks). There are no directed paths between Foxes (Node 3) and Hawks (Node 4); F |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
293103225 |
Alpha_Q |
K |
Nov. 24, 2024, 1:43 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
40 |
1203 |
25497600 |
|
|
|
293073768 |
PEIMUDA GroupMatrix |
K |
Nov. 24, 2024, 10:13 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
40 |
2015 |
35840000 |
|
|
|
293107739 |
HuaJun |
K |
Nov. 24, 2024, 2:15 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
40 |
1218 |
82534400 |
|
|
|
293082442 |
kradcigam Xun_Xiaoyao no_dream |
K |
Nov. 24, 2024, 11:15 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
40 |
2202 |
129433600 |
|
|
|
293081841 |
defnotmee LoboLobo enzopsm |
K |
Nov. 24, 2024, 11:11 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
40 |
999 |
54272000 |
|
|
|
293171402 |
Ion_Gravirei |
K |
Nov. 25, 2024, 4:45 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
40 |
1374 |
36864000 |
|
|
|
293104478 |
Alpha_Q |
K |
Nov. 24, 2024, 1:52 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
40 |
1483 |
36966400 |
|
|
|
293018755 |
|
K |
Nov. 24, 2024, 1:17 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
|
|
293018220 |
|
K |
Nov. 24, 2024, 1:17 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
|
remove filters
Back to search problems