| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77879 | 牛延希 | 矩阵右移动 | C++ | Wrong Answer | 1 MS | 280 KB | 392 | 2024-06-15 16:50:02 |
# include<iostream> using namespace std; int main(){ int m,n,a[114][114],t; cin>>m>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cin>>a[i][j]; } }for(int i=1;i<=n;i++){ int k=t=m; for(int j=t;j<=t+n-1;j++){ if(k%n!=0) cout<<a[i][k%n]<<" "; else cout<<a[i][n]<<" "; k++; }cout<<endl; } return 0; }
------Input------
3 3 1 2 3 4 5 6 7 8 9
------Answer-----
1 2 3 4 5 6 7 8 9
------Your output-----
3 1 2 6 4 5 9 7 8