Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
137065 沈梓珺 空间定位1 C++ 通过 100 0 MS 244 KB 367 2024-03-09 17:22:42

Tests(4/4):


#include<bits/stdc++.h> using namespace std; double a[20]; int n,m; int main(){ cin>>m; for(int i=1;i<=m;i++){ cin>>n; for(int j=1;j<=n;j++){ cin>>a[j]; } sort(a+1,a+1+n,greater<double>()); double len=0; for(int k=1;k<=n;k++){ len+=sqrt(pow(2*a[k],2)-1); if(len>=20){ cout<<k<<endl; break; } } } return 0; }


测评信息: