标签:include ace tin std name space namespace i++ pac
纯桶拍
#include<iostream> using namespace std; int main(){ int n,x; cin>>n; int sum(0),bus[1002]={0}; for(int i=1;i<=n;i++){ cin>>x; if(bus[x]) continue; bus[x]++; sum++; } cout<<sum<<endl; for(int i=1;i<=1000;i++) if(bus[i]) cout<<i<<‘ ‘; cout<<endl; return 0; }
标签:include ace tin std name space namespace i++ pac
原文地址:https://www.cnblogs.com/wangshengjun/p/luoguP1059.html