# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112400 | vjudge1 | Baloni (COCI15_baloni) | C++98 | 124 ms | 7928 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.
// Online IDE - Code Editor, Compiler, Interpreter
#include<bits/stdc++.h>
using namespace std;
int main()
{
int top=0;
int x = 0;
cin >> x;
int arr[1000001] = {0};
vector<int> b(x);
for(int i = 0;i < x;i++)
cin >> b[i];
for(int a = 0; a < x;a++){
if(arr[a] > 0){
arr[a]--;
arr[a-1]++;
}else{
top++;
arr[a-1]++;
}
}cout << top;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |