Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
136993 | 梁乃元 | 空间定位1 | C++ | 解答错误 | 0 | 0 MS | 256 KB | 468 | 2024-03-09 16:47:03 |
# include <bits/stdc++.h> using namespace std ; double dot [1000] ; int main ( ) { int n , m ; cin >> m ; while ( m -- ) { 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 ; } } } return 0 ; }