Submission #153975

#TimeUsernameProblemLanguageResultExecution timeMemory
153975vladciuperceanuBaloni (COCI15_baloni)C++14
100 / 100
337 ms3960 KiB
#include <iostream> using namespace std; int n,i,x,f[1000005]; int main() { cin >> n; int sol = 0; for (i=1; i<=n; i++) { cin >> x; if (f[x+1] == 0) sol++; else f[x+1]--; f[x]++; } cout << sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...