You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
int b[] = {0, 13, 32, 9, 40, 19};
|
|
int main() {
|
|
int n = 5;
|
|
sort(b + 1, b + n + 1);
|
|
int tot = unique(b + 1, b + n + 1) - b - 1;
|
|
cout << tot << endl;
|
|
|
|
for (int i = 1; i <= tot; i++) cout << b[i] << " ";
|
|
return 0;
|
|
}
|
|
/*
|
|
输出:
|
|
5
|
|
9 13 19 32 40
|
|
*/ |