Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- //
- #define ll long long
- #define ull unsigned long long
- #define pb push_back
- #define mx 100010
- #define mod 1000000007
- #define inf INT_MAX
- #define pi acos(-1)
- #define endl '\n'
- #define fin freopen("input", "r", stdin)
- #define Fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
- //
- int main() {
- ll n;
- cin >> n;
- ll ar[n];
- map<ll, ll> mp;
- for (ll i = 0; i < n; i++) {
- cin >> ar[i];
- auto it = mp.find(ar[i]);
- if (it == mp.end()) mp.insert({ar[i], 1});
- else it->second += 1;
- }
- for (auto it = mp.begin(); it != mp.end(); it++) {
- if (it->second != 3) cout << it->first << " ";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement