Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
137051 刘语晗 空间定位1 C++ 通过 100 0 MS 248 KB 383 2024-03-09 17:13:40

Tests(4/4):


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


测评信息: