Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

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

Revision en1, by Lord_vaibhav, 2020-08-01 09:11:36

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 ☺️

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Lord_vaibhav 2020-08-01 09:11:36 385 Initial revision (published)