lanqiao 2107 修剪灌木(数学优化)

This commit is contained in:
2025-03-29 19:44:45 +08:00
parent 32625a7d0e
commit 098f886795

13
13lanqiao/test4-2.cpp Normal file
View File

@@ -0,0 +1,13 @@
// lanqiao 2107 修剪灌木(数学优化)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
for(int i = 1; i <= n; i++){
cout << max(i - 1, n - i) * 2 << endl;
}
return 0;
}
/* test samples -> 4 2 4
3
*/