# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
604183 | Hussein3600 | Baloni (COCI15_baloni) | C++14 | 383 ms | 3960 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N=1e6 ;
int n , a ,ans=0 ;
int main()
{
cin>>n;
multiset<ll>s;
for(int i=0;i<n;i++)
{
cin >> a ;
if(s.find(a)==s.end())ans++,s.insert(a-1);
else
{
s.erase(s.find(a)) ;
s.insert(a-1) ;
}
}
cout<<ans<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |