| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 3532 | 李言 | 数组元素对调 | C++ | Compile Error | 0 | 0 MS | 0 KB | 451 | 2019-12-20 16:20:36 |
#include<iostream> using namespace std; int main(){ int i1,i2; cin>>i1>>12; int a[100][100]={0}; int x=0; for(int n=0;n<i1;n++){ for(int m=0;m<i2;m++){ cin>>a[n][m]; } } int i3,i4; cin>>i3>>i4; for(int n=0;n<i1;n++){ int t=a[n][i3]; a[n][i3]=a[n][i4]; a[n][i4]=t; } for(int n=0;n<i1;n++){ for(int m=0;m<i2;m++){ if(n+m==i+1||n==m){ x+=a[i][m]; } } } cout<<x; return 0; }