fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;cin>>n;
  7. int a[n][2];
  8. for(int i=0;i<n;i++){
  9. for(int j=0;j<2;j++){
  10. cin>>a[i][j];
  11. }
  12. }
  13. vector<int>adj[n];
  14. for(int i=0;i<n;i++){
  15. for(int j=0;j<2;j++){
  16. adj[i].push_back(j);
  17. adj[j].push_back(i);
  18. }
  19. }
  20. for(auto i:a){
  21. // cout<<i<<"-"<<"\n";
  22. cout<<i[0]<<" "<<i[1];
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5548KB
stdin
3
0 1 
1 2
2 0
stdout
0 11 22 0