Submission #462601

#TimeUsernameProblemLanguageResultExecution timeMemory
462601JasperLBaloni (COCI15_baloni)C++14
100 / 100
242 ms3864 KiB
#include <iostream> using namespace std; #define maxn 1000005 int f[maxn]; int main() { int n; cin >> n; int ret = 0; for (int i = 0; i < n; i++) { int h; cin >> h; if (f[h+1]) f[h+1]--; else ret++; f[h]++; } cout << ret << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...