Блог пользователя bhavya_19

Автор bhavya_19, история, 10 месяцев назад, По-английски

there is undirected graph with n nodes and m edges you can start from any node and you have to end a path at node 1 and condition is that you cannot visit the same edge twice what is the maximum length of path you can have? constraints are n<=100 and m<=2*n-2

  • Проголосовать: нравится
  • -19
  • Проголосовать: не нравится

»
10 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

something like making a line graph, and dfs from every potential node(all edges from 1) getting max would work ?

upd: nvm it would tle I guess

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Dominater069 any thought on this problem?

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

[user:Radewoosh][user:rainboy][user:Dominator069][user:ksun48] please help