Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
102858 汤奕硕 18插队喝水 C++ Output Limit Exceeded 0 MS 272 KB 394 2024-12-24 19:42:45

Tests(0/10):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int n; int p; cin>>p; cin>>n; p=p-1; int a[n]; int b[n]; for(int i=0; i<n; ++i) cin>>a[i]; for(int j=0; j<p; ++j) b[j]=a[j]; b[p]=a[n-1]; for(int i=p+1; i<n; ++i) b[i]=a[i-1]; for(int i=0; i<n; ++i) cout<<b[i]<<' '; return 0; }