結果
| 問題 |
No.1980 [Cherry 4th Tune D] 停止距離
|
| コンテスト | |
| ユーザー |
hamuhei4869
|
| 提出日時 | 2022-03-24 04:16:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 771 bytes |
| コンパイル時間 | 1,799 ms |
| コンパイル使用メモリ | 160,236 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-10-09 06:24:57 |
| 合計ジャッジ時間 | 7,189 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 TLE * 1 -- * 25 |
ソースコード
#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 w = 20 * u;
ll Tw36000 = T * w * 36000;
ll magic = 3600 * 3600;
ll Lw = L * w;
ll left = Lw * magic;
for(ll V = 600100;V >= 0;V--){
if(left >= V * Tw36000 + V * V * 1000000){
printf("%lld.%02lld\n", V / 100, V % 100);
break;
}
}
}
return 0;
}
hamuhei4869