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

https://codeforces.me/contest/1388/problem/D of Codeforces Round #660 (Div. 2) using python

Автор Lord_vaibhav, история, 6 лет назад, По-английски

I tried to solve question using topological sort from the reference https://codeforces.me/contest/1388/submission/88532119 .It passed till test 7 but gave runtime error on test 8 with exit code 1, Here's my code https://ideone.com/MK0Ra6 , please help me correct it.

Thanks in advance ☺️

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

It's stack overflow due to recursive function topsort()

See this