| 记录编号 | 38201 | 评测结果 | AA | ||
|---|---|---|---|---|---|
| 题目名称 | 759.[CodoJam2012] 与 Googler 共舞 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.002 s | ||
| 提交时间 | 2012-04-15 18:37:05 | 内存使用 | 0.26 MiB | ||
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
const int N = 110;
int T, n, s, p, t, a, b;
int main() {
freopen("2012b.in", "r", stdin);
freopen("2012b.out", "w", stdout);
scanf("%d", &T);
for(int o=1; o<=T; o++) {
a = b = 0;
scanf("%d%d%d", &n, &s, &p);
for(int i=1; i<=n; i++) {
scanf("%d", &t);
if((t+2)/3 >= p) {
b++;
continue;
}
if(t >= 29 || t <= 1)
continue;
if((t+4)/3 >= p)
a++;
}
printf("Case #%d: %d\n", o, b + min(a, s));
}
return 0;
}