| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 129500 | 陈奕涵 | 矩阵右移动 | C++ | Time Limit Exceeded | 1000 MS | 268 KB | 580 | 2025-08-27 13:59:29 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m,a[10][10]={},b[10][10]={}; cin>>m>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;i++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;i++){ b[i][(j+m)%n]=a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;i++){ cout<<b[i][j]<<' '; } cout<<endl; } return 0; }