# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1063654 | vjudge1 | Baloni (COCI15_baloni) | C++17 | 225 ms | 3928 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 <bits/stdc++.h>
using namespace std;
void solve(){
int n; cin>>n;
int xd[n];
map <int,int> lol;
for (int i=0;i<n;i++){
cin>>xd[i];
lol[xd[i]]++;
}
int ans=0;
for (int i=0;i<n;i++){
if(lol[xd[i]-1]==0) ans++;
lol[xd[i]]--;
}
cout<<ans;
}
int main() {
int t; t=1;
while(t--){
solve();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |