結果

問題 No.1980 [Cherry 4th Tune D] 停止距離
ユーザー hamuhei4869hamuhei4869
提出日時 2022-03-24 04:27:45
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 484 ms / 3,000 ms
コード長 787 bytes
コンパイル時間 1,325 ms
コンパイル使用メモリ 160,600 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 12:26:35
合計ジャッジ時間 14,754 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 88 ms
5,376 KB
testcase_02 AC 346 ms
5,376 KB
testcase_03 AC 237 ms
5,376 KB
testcase_04 AC 61 ms
5,376 KB
testcase_05 AC 301 ms
5,376 KB
testcase_06 AC 468 ms
5,376 KB
testcase_07 AC 474 ms
5,376 KB
testcase_08 AC 474 ms
5,376 KB
testcase_09 AC 467 ms
5,376 KB
testcase_10 AC 465 ms
5,376 KB
testcase_11 AC 472 ms
5,376 KB
testcase_12 AC 469 ms
5,376 KB
testcase_13 AC 467 ms
5,376 KB
testcase_14 AC 476 ms
5,376 KB
testcase_15 AC 481 ms
5,376 KB
testcase_16 AC 472 ms
5,376 KB
testcase_17 AC 470 ms
5,376 KB
testcase_18 AC 472 ms
5,376 KB
testcase_19 AC 466 ms
5,376 KB
testcase_20 AC 472 ms
5,376 KB
testcase_21 AC 484 ms
5,376 KB
testcase_22 AC 479 ms
5,376 KB
testcase_23 AC 473 ms
5,376 KB
testcase_24 AC 474 ms
5,376 KB
testcase_25 AC 468 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;
using ll = long long;

int main(){
    int N;cin >> N;
    while(N--){
        string _T, _u, _L;
        cin >> _T >> _u >> _L;
        _T.erase(find(_T.begin(), _T.end(), '.'));
        _u.erase(find(_u.begin(), _u.end(), '.'));
        _L.erase(find(_L.begin(), _L.end(), '.'));

        ll T = stoi(_T);
        ll u = stoi(_u);
        ll L = stoi(_L);

        ll ok = 0;
        ll ng = 100000000;
        while(ng - ok > 1){
            ll mid = (ok + ng) / 2;
            if(L * (20 * u) * 360 * 360 >= mid * T * (2 * u) * 36 + mid * mid){
                ok = mid;
            }else{
                ng = mid;
            }
        }
        ll V = ok / 100;
        printf("%lld.%02lld\n", V / 100, V % 100);
    }
    return 0;
}
0