fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. vector<int> cons[200020];
  7. int ut[200003];
  8.  
  9. int main() {
  10. int n,m;
  11. cin>>n>>m;
  12. for(int i=1;i<=n;i++){
  13. ut[i]=i;
  14. }
  15. for(int i=0;i<m;i++){
  16. int from,to;
  17. cin>>from>>to;
  18. cons[to].push_back(from);
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 8176KB
stdin
4 4
1 2
2 3
3 4
4 2
3
2 4
1 2
2 4
stdout
Standard output is empty