Spoj PT07Y IS IT A TREE Solution
An undirected/directed graph is a tree if anyone know that any two of the following three properties are true: 1. It is connected 2. ...
An undirected/directed graph is a tree if anyone know that any two of the following three properties are true: 1. It is connected 2. ...
Solution in C++: ///**********ALLAH IS ALMIGHTY************/// ///AH Tonmoy ///Department of CSE,23rd batch ///Islamic University,Banglad...
Solution in C++: ///La ilaha illellahu muhammadur rasulullah ///******Bismillahir-Rahmanir-Rahim******/// ///Abul Hasnat Tonmoy ///Departm...
Solution in C++: ///**********ALLAH IS ALMIGHTY************/// ///AH Tonmoy ///Department of CSE,23rd batch ///Islamic University,Banglades...
To count the dependencies, do a clean DFS for every node and count all visited nodes. The input is small (N <= 100) and we do not need...
Solution in C++: ///La ilaha illellahu muhammadur rasulullah ///******Bismillahir-Rahmanir-Rahim******/// ///Abul Hasnat Tonmoy ///Departm...
Solution in C++: ///**********ALLAH IS ALMIGHTY************/// ///AH Tonmoy ///Department of CSE,23rd batch ///Islamic University,Banglades...
Solution in C++: ///**********ALLAH IS ALMIGHTY************/// ///AH Tonmoy ///Department of CSE,23rd batch ///Islamic University,Bang...
Solution in c++: #include < bits / stdc ++. h > using namespace std ; int main () { int a , sum , i , j , t ; cin ...
Problem Link https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...