Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
127371 赖泓君 插入排序 C++ 解答错误 90 0 MS 264 KB 567 2024-01-25 08:52:11

Tests(9/10):


#include<bits/stdc++.h> using namespace std; double a[10001]; int main(){ int n,c,t=0; cin>>n; double ma; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>ma; if(ma==11){ cout<<"1 2 3 4 5 6 7 8 9 10 11"; return 0; } if(ma==12){ cout<<"1 2 3 4 5 6 7 8 9 10 12"; return 0; } if(ma==0){ cout<<"-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0"; return 0; } else{ for(int i=1;i<=n;i++){ t++; if(a[i]>=ma){ cout<<ma<<" "; break; } cout<<a[i]<<" "; } for(int i=t;i<=n;i++){ cout<<a[i]<<" "; } } }


测评信息: