内存要求最少的程序(2.35MB)
2025-08-30 11:00:26
发布于:上海
2阅读
0回复
0点赞
#include <math.h>
int main() {
int n, x, y;
scanf("%d %d %d", &n, &x, &y);
int z[n][2];
double mx = -1;
for (int i = 0; i < n; i++) {
scanf("%d %d", &z[i][0], &z[i][1]);
}
for (int i = 0; i < n; i++) {
int tx = x;
int ty = y;
tx += z[i][0];
ty += z[i][1];
if (tx > 100) {
int r = tx - 100;
tx = 100;
ty += r * 3;
}
double q = 10000 * (tx / 100.0) * (1 + ty / 100.0) + 10000 * ((100 - tx) / 100.0) * 1;
if (q > mx) {
mx = q;
}
}
printf("%d\n", (int)ceil(mx));
return 0;
}
这里空空如也
有帮助,赞一个