Advertisement
_no0B

Untitled

Jul 23rd, 2021
1,256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1.  
  2. #include<bits/stdc++.h>
  3. #define ll long long
  4. #define fastio ios_base::sync_with_stdio(false),cin.tie(NULL)
  5. #define N ((int)2e6 + 9)
  6. #define endl "\n"
  7.  
  8. using namespace std;
  9.  
  10.  
  11. /*fast io
  12. ios_base::sync_with_stdio(false);
  13. cin.tie(NULL);
  14. */
  15.  
  16. /// queue
  17.  
  18. int main()
  19. {
  20. //    fastio;
  21.  
  22.     int n;
  23.     cin>>n;
  24.     queue < int > line;
  25.  
  26.     while(n > 0){
  27.         n--;
  28.         int a;
  29.         cin>>a;
  30.         line.push(a);
  31.     }
  32.  
  33.     while(line.empty() == 0){
  34.         int a = line.front();
  35.         cout<<a<< " " ;
  36.         line.pop();
  37.     }
  38.  
  39.     return 0;
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement