Untitled
unknown
plain_text
10 months ago
315 B
5
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