Run ID:154526
提交时间:2026-05-30 14:58:05
#include <bits/stdc++.h> using namespace std; int main (){ long long a[101][101],sum=0; int n,m; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; } } for(int i=1;i<=5;i++){ for(int j=m;j>=5;j--){ if(i==m){ cout<<a[n][j]<<" "; }else if(i==n){ cout<<a[m][j]<<" "; }else{ cout<<a[i][j]<<" "; } } cout<<endl; } cout<<sum; return 0; }