Submission #231578

# Submission time Handle Problem Language Result Execution time Memory
231578 2020-05-14T04:00:15 Z huangqr Baloni (COCI15_baloni) C++14
0 / 100
1865 ms 42020 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
multiset<int>s;

int main(){
	ll n,k,ans;
	cin>>n;
	ans=n;
	for(ll i=0;i<n;i++){
		cin>>k;
		auto it=s.find(k);
		if(it!=s.end()){
			s.insert(*it-1);
			s.erase(it);
			ans--;
		}
		s.insert(k-1);
	}
	cout<<ans;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Incorrect 6 ms 384 KB Output isn't correct
3 Incorrect 7 ms 512 KB Output isn't correct
4 Incorrect 8 ms 512 KB Output isn't correct
5 Incorrect 1793 ms 37768 KB Output isn't correct
6 Incorrect 1865 ms 42020 KB Output isn't correct
7 Incorrect 1302 ms 34724 KB Output isn't correct
8 Incorrect 1415 ms 34468 KB Output isn't correct
9 Incorrect 1486 ms 36104 KB Output isn't correct
10 Incorrect 1512 ms 37592 KB Output isn't correct