Untitled
unknown
plain_text
a year ago
315 B
10
Indexable
void solve (){
int n;cin>>n;
set<int> st;
For(n){
int x;cin>>x;
st.insert(x);
}
int ans = st.size();
for(auto it:st){
if(it<0){
ans --;
if(st.find(-1*it)!=st.end()) ans --;
}
}
cout << ans;
}Editor is loading...
Leave a Comment