3 条题解
-
1
#include <stdio.h> #include <math.h> #include <algorithm> #include <iostream> using namespace std; int main(){ int m; scanf("%d",&m); while(m--){ int n,i=0; scanf("%d",&n); double r[605]; while(n--){ scanf("%lf",&r[i]); i++; } sort(r,r+i); double len=0.0,cnt=0; while(len<20){ len+=2*sqrt(r[i-1]*r[i-1]-1); i--;cnt++; } printf("%0.f\n",cnt); } }
信息
- ID
- 121
- 时间
- 3000ms
- 内存
- 128MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 1299
- 已通过
- 349
- 上传者