标签:break nbsp lse 起点 ++ pre bsp div ble
#include<stdio.h> int main() { int n,a[50],b[50]; while(scanf("%d",&n)!=EOF) { for(int i=0;i<n;i++) { scanf("%d",&a[i]); } int m,k,j=0; scanf("%d%d",&m,&k); for(int i=0;i<n;i++) { if(a[i]<m) { b[j]=a[i]; j++; } else break; } b[j]=m; j++; for(int i=j-1;i<n;i++) { b[j]=a[i]; j++; } for(int i=0;i<j-1;i++) { printf("%d ",b[i]); } printf("%d\n",b[j-1]); printf("%d\n",b[k]); } return 0; }
标签:break nbsp lse 起点 ++ pre bsp div ble
原文地址:https://www.cnblogs.com/chenlong991223/p/9940254.html