Showing posts with label Upsolve. Show all posts
Showing posts with label Upsolve. Show all posts
2015 ACM Amman Collegiate Programming Contest ( H.Bridge)
Consider each component as a single vertex and add the bridges again, now you have a tree where all edges are bridges (in the original graph).
Number of single cycle components in an undirected graph (CF-977E)
E. Cyclic Components
resource
হিন্টঃ প্রতিটি কম্পোনেন্ট এ চেক করবো তাদের প্রত্যেকটি নোডের ডিগ্রি দুই কিনা, যদি দুই হয় তাইলে সেটা একটা সিঙ্গেল সাইকেল কম্পোনেন্ট।