Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
11993 | 徐一喆 | 【一维数组】排序后的奇数项 | C++ | Accepted | 0 MS | 748 KB | 202 | 2021-05-18 17:07:44 |
#include<bits/stdc++.h> using namespace std; int a[20]; int main() { for(int i=0;i<20;++i) cin>>a[i]; sort(a,a+20); for(int i=0;i<=19;i+=2) cout<<a[i]<<" "; cout<<endl; return 0; }