# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
96131 |
2019-02-06T11:17:59 Z |
fadi57 |
Baloni (COCI15_baloni) |
C++14 |
|
372 ms |
4088 KB |
#include <bits/stdc++.h>
using namespace std;
#define clr(i, j) memset(i, j, sizeof(i))
#define pb push_back
typedef long long ll;
//-*-*-*-*-*-*-*-*-
map<ll,ll>l;
int main()
{ll n;
cin>>n;ll ans=n;ll d;
for(int i=0;i<n;i++){
cin>>d;
l[d]++;
if(l[d+1]){l[d+1]--;ans--;}
}
cout<<ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
3 ms |
376 KB |
Output is correct |
3 |
Correct |
4 ms |
376 KB |
Output is correct |
4 |
Correct |
4 ms |
376 KB |
Output is correct |
5 |
Correct |
372 ms |
4088 KB |
Output is correct |
6 |
Correct |
372 ms |
3960 KB |
Output is correct |
7 |
Correct |
305 ms |
3220 KB |
Output is correct |
8 |
Correct |
287 ms |
3116 KB |
Output is correct |
9 |
Correct |
328 ms |
3624 KB |
Output is correct |
10 |
Correct |
324 ms |
3576 KB |
Output is correct |