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