# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
231902 | jzh | Baloni (COCI15_baloni) | C++14 | 301 ms | 4088 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;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
multiset<ll>s;
ll n,i,x,y;
cin>>n;
for (i=0;i<n;i++){
cin>>x;
auto it = s.find(x);
if (it != s.end()){
s.erase(it);
}
s.insert(x-1);
}
cout<<s.size()<<'\n';
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |