Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44217 | chenyifei | 矩阵交换行 | C++ | Wrong Answer | 1 MS | 256 KB | 375 | 2024-03-29 15:36:10 |
#include<iostream> using namespace std; int main() { int a[6][6],n,m,b[6][6]; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; cin>>m>>n; if(i==m-1){ b[i][j]=a[n-1][j]; a[m-1][j]=a[n-1][j]; } if(i==n-1){ a[n-1][j]=b[i][j]; } if(j==4) cout<<a[i][j]<<endl; if(j!=4) cout<<a[i][j]<<" "; } } return 0; }