Submission #95294

#TimeUsernameProblemLanguageResultExecution timeMemory
95294karlopuhBaloni (COCI15_baloni)C++14
0 / 100
198 ms4468 KiB
#include <bits/stdc++.h> using namespace std; vector <bool> moze(10000001,false); long long int brojac,n; int main(){ cin>>n; for(long long int i=0;i<n;i++){ long long int broj; cin>>broj; long long int mask=broj; if(moze[mask]==false){ moze[mask-1]=true; brojac++; }else{ moze[mask]=false; moze[mask-1]=true; } } cout<<brojac; }
#Verdict Execution timeMemoryGrader output
Fetching results...