Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
137016 陈馨逸 空间定位1 C++ 通过 100 0 MS 264 KB 416 2024-03-09 16:57:06

Tests(4/4):


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


测评信息: