Submission #1112400

#TimeUsernameProblemLanguageResultExecution timeMemory
1112400vjudge1Baloni (COCI15_baloni)C++98
0 / 100
124 ms7928 KiB
// 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 timeMemoryGrader output
Fetching results...