1 条题解

  • 0
    @ 2025-4-7 21:38:07

    C++ :

    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
    	int n, x;
    	set <int> s;
    	set <int> :: iterator it;
    	
    	cin >> n;
    	while (n --) {
    		cin >> x;
    		s.insert(x);
    	}
    	
    	cout << s.size() << endl;
    	for (it = s.begin(); it != s.end(); it ++) cout << *it << ' ';
    
    	return 0;
    }
    
    
    • 1

    信息

    ID
    1936
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者