| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 46427 | 杨中琦 | 数组元素对调 | C++ | Accepted | 100 | 1 MS | 296 KB | 440 | 2022-07-13 13:12:50 |
#include<iostream> using namespace std; int main(){ int m,n,a[101][101],r,s; cin>>m>>n; for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } } cin>>r>>s; for(int i=1;i<=m;i++){ // a[i][r] 和 a[i][s] int t=a[i][r]; a[i][r]=a[i][s]; a[i][s]=t; } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j++){ cout<<a[i][j]; if(j!=n) cout<<" "; } if(i!=n) cout<<endl; } return 0; }