# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
590010 |
2022-07-05T13:04:32 Z |
0123xx |
Baloni (COCI15_baloni) |
C++14 |
|
67 ms |
3700 KB |
#include <bits/stdc++.h>
using namespace std;
int n, ar[1000005], freq[1000005], ans;
int main(){
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
cin >> n;
for (int i = 1; i<= n; i++){
cin >> ar[i];
if (freq[ar[i]+1] == 0){
freq[ar[i]+1]--;
}
else{
ans++;
}
freq[ar[i]]++;
}
cout << ans << "\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
2 |
Incorrect |
3 ms |
384 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
5 |
Incorrect |
55 ms |
3372 KB |
Output isn't correct |
6 |
Incorrect |
56 ms |
3700 KB |
Output isn't correct |
7 |
Incorrect |
57 ms |
3152 KB |
Output isn't correct |
8 |
Incorrect |
45 ms |
3048 KB |
Output isn't correct |
9 |
Incorrect |
67 ms |
3192 KB |
Output isn't correct |
10 |
Incorrect |
57 ms |
3408 KB |
Output isn't correct |