ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2055. Urban Geography

AC! + hint on avoiding TLE.
Posted by sleepntsheep 12 Jan 2025 23:31
good problem. dynacon!

To avoid TLE:
Use dynamic array instead of linked list for better locality.
Break early when a first spanning tree is found. (important).

Edited by author 12.01.2025 23:51