Submission #104302

#TimeUsernameProblemLanguageResultExecution timeMemory
104302tduong0806Baloni (COCI15_baloni)C++14
0 / 100
286 ms504 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e6+10; int n,x,d[N],r; int main() { cin>>n; while(n--) { cin>>x; if(!d[x+1]) r++,d[x]=1; else d[x+1]--,d[x]++; } cout<<r; }
#Verdict Execution timeMemoryGrader output
Fetching results...