Advertisement
Josif_tepe

Untitled

Oct 19th, 2023
728
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4. vector<int> graph[1001];
  5.  
  6. void dfs(int node) {
  7.     for(int neighbour : graph[node]) {
  8.         cout << neighbour << " ";
  9.     }
  10. }
  11. int main()
  12. {
  13.     vector<int> v;
  14.     int n;
  15.     cin >> n;
  16.    
  17.     for(int i = 0; i < n; i++) {
  18.         int x;
  19.         cin >> x;
  20.         v.push_back(x);
  21.     }
  22.    
  23.     for(int x : v) {
  24.         cout << x << endl;
  25.     }
  26.     return 0;
  27. }
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement