Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <bits/stdc++.h>
- using namespace std ;
- typedef long long ll ;
- void ABDEL3AL () {
- ios_base::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nullptr) ;
- #ifndef ONLINE_JUDGE
- freopen("input.txt" , "r" ,stdin) , freopen("output.txt" , "w" , stdout) ;
- #endif
- }
- int main() {
- ABDEL3AL() ;
- int n , m ;
- cin >> n >> m ;
- for (int i = 0; i < n; i++) {
- ll arr[m] ;
- for (int i = 0 ; i < m && cin >> arr[i]; i++);
- reverse (arr , arr + m) ;
- for (int i = 0; i < m && cout << arr[i] << " "; i++);
- cout << "\n" ;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment