Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6809 先明缜 18插队喝水 C++ Wrong Answer 0 MS 256 KB 497 2025-03-15 20:32:55

Tests(0/10):


Code:

#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 i,n,a[100],x,d; cin>>n>>x; for(i=0;i<n;i++){ cin>>a[i]; } d=a[n-1]; for(i=n-1;i>x-1;i--){ a[i]=a[i-1]; } a[x-1]=d; for(i=0;i<n;i++){ cout<<a[i]<<" "; } return 0; }


Run Info:

------Input------
28 39 3 82 10 45 91 22 88 82 87 30 85 40 68 3 9 1 43 77 90 71 9 60 49 13 94 89 59 18
------Answer-----
39 3 82 10 45 91 22 88 82 87 30 85 40 68 3 9 1 59 43 77 90 71 9 60 49 13 94 89
------Your output-----
3 82 10 45 91 22 88 82 87 30 85 40 68 3 9 1 43 77 90 71 9 60 49 13 94 89 59 18