# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
292358 | 2020-09-06T21:33:08 Z | MilosMilutinovic | Baloni (COCI15_baloni) | C++14 | 233 ms | 7548 KB |
#include <bits/stdc++.h> using namespace std; int main(){ int n; scanf("%i",&n); int a[n]; for(int i=0;i<n;i++)scanf("%i",&a[i]); int ans=0; map<int,int> mp; for(int i=0;i<n;i++){ if(!mp[a[i]+1])ans++; mp[a[i]]=1; } printf("%i",ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 384 KB | Output isn't correct |
2 | Incorrect | 1 ms | 384 KB | Output isn't correct |
3 | Incorrect | 2 ms | 384 KB | Output isn't correct |
4 | Incorrect | 2 ms | 384 KB | Output isn't correct |
5 | Incorrect | 233 ms | 7196 KB | Output isn't correct |
6 | Incorrect | 226 ms | 7548 KB | Output isn't correct |
7 | Incorrect | 181 ms | 6136 KB | Output isn't correct |
8 | Incorrect | 174 ms | 6136 KB | Output isn't correct |
9 | Incorrect | 202 ms | 6648 KB | Output isn't correct |
10 | Incorrect | 199 ms | 6648 KB | Output isn't correct |