Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Need help for 100551E.Disconnected Graph

Правка en4, от dfsof, 2023-09-15 10:50:13

Hello lady/bros, I am struggling with 100551E.Disconnected Graph.

I have considered: (1) Online fully dynamic graph connectivity. I copied a piece of code here: https://www.luogu.com.cn/problem/solution/P5247. I passed LuoguP5247 and SPOJDYNACON2, however I could not pass this problem;

SPOJ Code

Codeforces submission is similar, but it always gets TLE on test15, due to a relatively large constant:

Codeforces Disconnected Graph Submission

(2)Retractable DSU, however it seems that DSU only supports rolling back the add options, it cannot roll back delete operations...

Теги graph, tree, dynamic connectivity

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский dfsof 2023-09-15 10:50:20 0 (published)
en4 Английский dfsof 2023-09-15 10:50:13 17
en3 Английский dfsof 2023-09-15 10:49:55 36 Tiny change: ' on test15:\n\n<spoi' -> ' on test15, due to a relatively large constant:\n\n<spoi'
en2 Английский dfsof 2023-09-15 10:49:17 37
en1 Английский dfsof 2023-09-15 10:48:24 19700 Initial revision (saved to drafts)