Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
137064 梁煜然 空间定位1 C++ 通过 100 0 MS 248 KB 376 2024-03-09 17:20:34

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 k=1;k<=n;k++)cin>>dot[k]; 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){ printf("%d\n",j); break; } } } return 0; }


测评信息: