I have a problem finding a strongly connected component of size exactly K in a Tournament Graph. Can someone help me?

Thanks in advance

Thanks in advance

Before contest

Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)

02:40:14

Register now »

Codeforces Round #504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)

02:40:14

Register now »

*has extra registration

# | User | Rating |
---|---|---|

1 | tourist | 3434 |

2 | OO0OOO00O0OOO0O0…O | 3280 |

3 | Syloviaely | 3274 |

4 | Um_nik | 3248 |

5 | Petr | 3233 |

6 | fateice | 3230 |

7 | mnbvmar | 3096 |

8 | anta | 3053 |

9 | FizzyDavid | 3050 |

10 | LHiC | 3047 |

# | User | Contrib. |
---|---|---|

1 | Radewoosh | 165 |

2 | rng_58 | 161 |

3 | tourist | 160 |

4 | Petr | 153 |

5 | csacademy | 151 |

6 | Swistakk | 150 |

7 | Vovuh | 145 |

7 | Um_nik | 145 |

9 | Nickolas | 142 |

10 | PikMike | 140 |

10 | 300iq | 140 |

I have a problem finding a strongly connected component of size exactly K in a Tournament Graph. Can someone help me?

Thanks in advance

Thanks in advance

↑

↓

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/17/2018 14:54:48 (d1).

Desktop version, switch to mobile version.

User lists

Name |
---|

Thanks for your attention.

Sorry, it seems that the left side of the page is cut off for me, and therefore I cannot really read what the proof is about.

From what I gathered from the page and googled about, if a tournament of size N is strongly connected, then it is vertex pan-cyclic, which means that every vertex in G is part of a cycle of length K for 3<=K<=N. And this proof is done using induction.

However, as the page is cut off, I cannot really read it, and I think I don't really understand what I read too XD. Is it okay for you to explain it here? Is the proof and algorithm similar to the proof and algorithm for finding a hamiltonian path in a tournament? I tried to adapt that algorithm and it seems that I got into some counterexamples.

Hello,

i have implemented code for the problem http://www.spoj.pl/problems/CYCLERUN/ and the complexity is O(N2),but getting TLE. Any idea what is the best complexity for this problem