結果
| 問題 |
No.8099 夜の道路は気をつけて運転しなければならない
|
| コンテスト | |
| ユーザー |
otamay6
|
| 提出日時 | 2023-03-31 21:34:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 671 bytes |
| コンパイル時間 | 1,886 ms |
| コンパイル使用メモリ | 193,792 KB |
| 最終ジャッジ日時 | 2025-02-11 20:00:49 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 8 |
ソースコード
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0,i##_len=int(n);i<i##_len;++i)
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define All(x) (x).begin(),(x).end()
#define rAll(x) (x).rbegin(),(x).rend()
using namespace std;
using ll = long long;
int main(){
double t,s,d;
cin>>t>>s>>d;
double t_end = t + d/s;
double res = 0.0;
cerr << t_end << endl;
while(t_end > 24) {
// t を24時まで進める
res += max(24.0 - max(t, 18.0), 0.0) + max(0.0, 6.0 - max(t, 0.0));
t_end -= 24;
t = 0;
}
res += max(t_end - max(t, 18.0), 0.0) + max(0.0, min(6.0, t_end) - max(t, 0.0));
printf("%.9f", res);
}
otamay6