immuntasir

Arpita

Jun 27th, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <sstream>
  3. #include <vector>
  4. using namespace std;
  5. int main() {
  6.     char line[32700];
  7.     int T;
  8.     scanf("%d", &T);
  9.     getchar();
  10.     vector< int > v;
  11.     while(T--)  {
  12.         gets(line);
  13.         stringstream ss( line );
  14.         int num;
  15.         while( ss >> num ) v.push_back( num );
  16.  
  17.     }
  18.     int len = v.size();
  19.     for (int i = 0; i<len; i++) printf("%d ", v[i]);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment