P9360 [ICPC2022 Xi‘an R] Clone Ranran(枚举克隆次数!!!)

P9360 [ICPC2022 Xi‘an R] Clone Ranran(枚举克隆次数!!!)_第1张图片枚举克隆次数!太庙啦,原来一直想着怎么o1出,原来暴力循环一手AC

ACcode:

#include
using namespace std;
#define int long long
int a,b,c;
void solve() {
	cin>>a>>b>>c;
	int mmin=1e18;
	for(int i=0; i<=30; i++) { //枚举克隆次数
	   mmin=min(mmin,i*a+(int)ceil(c*1.00/(1<>t;
	while(t--) {
		solve();
	}
	return 0;
}



over~

你可能感兴趣的:(c++,模拟,算法)