結果
問題 |
No.306 さいたま2008
|
ユーザー |
![]() |
提出日時 | 2020-06-16 18:39:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 788 bytes |
コンパイル時間 | 1,341 ms |
コンパイル使用メモリ | 161,272 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-14 12:17:02 |
合計ジャッジ時間 | 2,352 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
#include <bits/stdc++.h> struct FastIO { char buf[1000000]; char *ptr = buf; void read() { int size; size = fread_unlocked(buf, 1, sizeof(buf) - 1, stdin); buf[size] = '\0'; ptr = buf; } FastIO () { read(); } void inc() { if (++ptr == buf + sizeof(buf) || !*ptr) read(); } template<typename Integer> Integer read() { bool neg = false; Integer res = 0; while ((*ptr < '0' || *ptr > '9') && *ptr != '-') inc(); if (*ptr == '-') neg = true, inc(); while (*ptr >= '0' && *ptr <= '9') res = res * 10 + *ptr - '0', inc(); return neg ? -res : res; } } fastio; #define ri fastio.read<int> #define rs64 fastio.read<int64_t> int main() { int x0 = ri(), y0 = ri(), x1 = ri(), y1 = ri(); printf("%.7f\n", y0 + (double) (y1 - y0) * x0 / (x0 + x1)); return 0; }