# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154279 | denmircea | Baloni (COCI15_baloni) | C++14 | 402 ms | 636 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <unordered_map>
using namespace std;
int i,n,ok,x,nr,d,y,j,k,v[1001];
short fr[200][30];
int sum[200];
unordered_map <int, int> m;
int main(){
cin>>n;
for(i=1;i<=n;i++){
cin>>x;
if(m[x+1]==0){
nr++;
m[x]++;
} else {
m[x+1]--;
m[x]++;
}
}
cout<<nr;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |