// 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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
4176 KB |
Output isn't correct |
2 |
Incorrect |
4 ms |
4176 KB |
Output isn't correct |
3 |
Incorrect |
4 ms |
4176 KB |
Output isn't correct |
4 |
Incorrect |
5 ms |
4176 KB |
Output isn't correct |
5 |
Incorrect |
124 ms |
7248 KB |
Output isn't correct |
6 |
Incorrect |
123 ms |
7928 KB |
Output isn't correct |
7 |
Incorrect |
88 ms |
7208 KB |
Output isn't correct |
8 |
Incorrect |
89 ms |
6992 KB |
Output isn't correct |
9 |
Incorrect |
98 ms |
7248 KB |
Output isn't correct |
10 |
Incorrect |
96 ms |
7248 KB |
Output isn't correct |