Submission #1111992

#TimeUsernameProblemLanguageResultExecution timeMemory
1111992AlmontherBaloni (COCI15_baloni)C++98
100 / 100
157 ms760 KiB
#include<bits/stdc++.h> #define co cout<< #define ll long long #define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; //stuff void solve(){ ll n; cin>>n; ll ans=0,x; map<ll,ll>mp; for(int i=0;i<n;i++){ cin>>x; mp[x-1]++; if(mp[x]<=0) ans++; else mp[x]--; } co ans; } int main(){ suiii int _=1; //cin>>_; while(_--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...