fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int m, n;
  6. cin>>m>>n;
  7. int arr[m][n];
  8. for(int i = 0; i<m; i++)
  9. {
  10. for(int j=0; j<n; j++)
  11. {
  12. cin>>arr[i][j];
  13. }
  14. }
  15. int x;
  16. cin>>x;
  17. for(int j=0; j<n; j++)
  18. {
  19. cout<<arr[x-1][j]<<" ";
  20. }
  21.  
  22.  
  23.  
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0.01s 5288KB
stdin
2 3
1 2 3
4 5 6
1
stdout
1 2 3