# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
154272 |
2019-09-19T22:32:10 Z |
mihaican |
Baloni (COCI15_baloni) |
C++14 |
|
46 ms |
1400 KB |
#include <iostream>
#include <algorithm>
using namespace std;
int n,v[100010],f[100010],sum,of;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>v[i];
}
for(int i=1;i<=n;i++){
if(f[v[i]]==0)
of++;
else
f[v[i]]--;
f[v[i]-1]++;
}
cout<<of;
}
# |
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 |
Incorrect |
44 ms |
1400 KB |
Output isn't correct |
6 |
Incorrect |
40 ms |
1272 KB |
Output isn't correct |
7 |
Incorrect |
46 ms |
1400 KB |
Output isn't correct |
8 |
Incorrect |
40 ms |
1272 KB |
Output isn't correct |
9 |
Incorrect |
42 ms |
1272 KB |
Output isn't correct |
10 |
Incorrect |
40 ms |
1272 KB |
Output isn't correct |