Submission #895063

# Submission time Handle Problem Language Result Execution time Memory
895063 2023-12-29T11:28:17 Z Litusiano Rabbit Carrot (LMIO19_triusis) C++17
0 / 100
0 ms 348 KB
#include<bits/stdc++.h>
using namespace std;

#define int long long

signed main(){
	int n,h; cin>>n>>h;
	int ans = 0;
	vector<int> v(n+1,0); //for(int& i : v) cin>>i
	// for(int i = 1; i<=n; i++){
	// 	cin>>v[i];
	// 	if(v[i] > i*h){
	// 		ans++;
	// 		v[i] = v[i-1] + h;
	// 	}
	// }
	for(int i = 1; i<=n; i++){
		if(v[i] > v[i-1]+h){
			v[i] = v[i-1]+h;
			ans++;
		}
	}
	cout<<ans<<endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Halted 0 ms 0 KB -