> 数学 >
将一整数数列按奇数在前,偶数在后的顺序重新排列,并要求奇偶两部分分别有序.
人气:431 ℃ 时间:2020-06-13 01:24:16
解答
;#include <algorithm>#include <iterator>using namespace std;bool IsOdd(int n){return n & 1;}int main(){int a[] = ;int* beg = a;int* end = a + sizeof a / sizeof a[0];sort(beg,end);stabl...
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版