Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5053 莫业祁 18插队喝水 C++ Wrong Answer 0 MS 248 KB 511 2024-11-01 21:29:58

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 n,m[105],x; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>m[i]; } cin>>x; int temp=m[n]; for(int i=n-1;i>=x;i--){ m[i+1]=m[i]; } m[x]=temp; for(int i=1;i<=7;i++){ cout<<m[i]<<" "; } }


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-----
39 3 82 10 45 91 22