4 solutions
-
0
#include <stdio.h> int main(){ int a[6][6]; int b[6][6];//临时用来交换变量的中间商 int m,n; for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ scanf("%d",&a[i][j]); } } scanf("%d%d",&n,&m); for(int j=1;j<=5;j++){ b[n][j]=a[n][j]; a[n][j]=a[m][j]; a[m][j]=b[n][j]; } for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ if(j!=5) printf("%d ",a[i][j]); else printf("%d",a[i][j]); } printf("\n"); } return 0; }
Information
- ID
- 86
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- # Submissions
- 259
- Accepted
- 119
- Uploaded By