| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77882 | 只因你太美(Ikun 真爱粉) | 矩阵右移动 | C++ | Wrong Answer | 1 MS | 268 KB | 513 | 2024-06-15 16:51:30 |
# include<iostream> using namespace std; int main(){ int n,m,a[10][10],b; cin>>m>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } } for(int j=1;j<=m;j++){ for(int i=1;i<=n;i++){ b=a[i][j]; a[i][j]=a[i][(j+1)%m]; a[i][(j+1)%m]=b; } } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }
------Input------
2 3 1 2 3 4 5 6 7 8 9
------Answer-----
2 3 1 5 6 4 8 9 7
------Your output-----
2 8050816 3 5 8049888 6 8 8022832 9