sadiqul_amin

Cycle

Apr 30th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. // 3. Cycle
  2.  
  3. /*
  4. Input
  5. ======
  6. 5
  7.  
  8. 6 6
  9. 4 5
  10. 5 6
  11. 6 1
  12. 1 2
  13. 3 1
  14. 2 3
  15.  
  16. 6 6
  17. 4 5
  18. 5 6
  19. 6 1
  20. 2 5
  21. 1 3
  22. 3 2
  23.  
  24. 10 9
  25. 4 5
  26. 5 6
  27. 6 1
  28. 1 2
  29. 3 1
  30. 2 3
  31. 3 7
  32. 7 8
  33. 8 9
  34.  
  35. 6 6
  36. 1 2
  37. 2 3
  38. 3 4
  39. 4 5
  40. 5 6
  41. 6 4
  42.  
  43. 6 6
  44. 4 5
  45. 5 6
  46. 6 1
  47. 1 2
  48. 3 1
  49. 3 2
  50.  
  51.  
  52. */
  53.  
  54. /*
  55. Output
  56. ======
  57. #1 1 2 3
  58. #2 1 2 3 5 6
  59. #3 1 2 3
  60. #4 4 5 6
  61. #5 -1
  62.  
  63. */
Add Comment
Please, Sign In to add comment