# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
462601 | JasperL | Baloni (COCI15_baloni) | C++14 | 242 ms | 3864 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |