Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

strange issue when submitting 590 div. 1C

Правка en1, от NoTwo, 2015-10-30 20:23:59

Hi, Ok so i solved this problem by converting the map to a graph and then merging all vertices that are in the same country and then i found the minimum connecting subgraph for the 3 vertices. ok now the strange part is that in test case 5, n and m are 1000 and my solution passes this test but in test case 19 n, m are 995 and 997 but i get Memory Limit Exceeded and i cant understand why. i would be grateful if someone helped me out. Thanks... The link to my submission: 13957392 The link to the problem: 590C - Three States

Теги graphs, help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский NoTwo 2015-10-30 20:24:37 11
en1 Английский NoTwo 2015-10-30 20:23:59 580 Initial revision (published)