题解 | #明明的随机数#
明明的随机数
https://www.nowcoder.com/practice/3245215fffb84b7b81285493eae92ff0
#include <cstdio> #include <iostream> #include <set> using namespace std; int main() { int n; cin >> n; set<int> st; int vi = 0; for (int i = 0; i <= n; i++) { int a; cin >> a; st.insert(a); } for(set<int>::iterator it = st.begin(); it != st.end(); it ++) { printf("%d\n", *it); } }