Submission #104301

#TimeUsernameProblemLanguageResultExecution timeMemory
104301tduong0806Baloni (COCI15_baloni)C++14
0 / 100
226 ms4060 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; for(int i=1;i<=n;++i) { cin>>x; if(!d[x+1]) r++,d[x]=1; else d[x+1]--,d[x]++; } cout<<r; }
#Verdict Execution timeMemoryGrader output
Fetching results...