Can someone hack my submission for 1796E?

Revision en2, by YocyCraft, 2023-03-01 18:53:52

Problem link: 1796E - Colored Subgraphs

When solving this problem I only know how to solve for a fixed root, and it's better to let a leaf node with smaller distance to the nearest node with degree>=3 to be the root, but I don't know how to choose it. So I sort all leaves by there distance, and try first 40 of them to be the root. I've thought it could fail on some large tests but unexpectedly it got AC. Can someone hack this solution or prove it's correctness?

My submission:195462544

Update: My submission has been hacked

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English YocyCraft 2023-03-01 18:53:52 41 Tiny change: '195462544]' -> '195462544]\n\nUpdate: My submission has been hacked'
en1 English YocyCraft 2023-03-01 17:39:24 539 Initial revision (published)