Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
1648 吴奕希 22数列变换III C++ Accepted 0 MS 264 KB 476 2023-10-29 07:46:09

Tests(2/2):


Code:

# include<iostream> using namespace std; int main() { int n,k,m,l; cin>>n; int lst[n]; for(int i = 0; i < n; i++) { cin>>lst[i]; } cin>>k; for(int i = 0; i < k; i++) { cin>>m; l = lst[m-1]; for(int a = m; a < n; a++) { lst[a-1] = lst[a]; } lst[n-1] = l; } for(int i = 0; i < n; i++) { cout<<lst[i]<<" "; } return 0; }