Submission #384622

#TimeUsernameProblemLanguageResultExecution timeMemory
384622vulpesBaloni (COCI15_baloni)C++17
100 / 100
349 ms4076 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int r = 0, n; cin >> n; multiset<int> x; while (n--) { int a; cin >> a; if (x.find(a) != x.end()) { x.erase(x.find(a)); } else { r++; } x.insert(a - 1); } cout << r << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...