結果
問題 | No.306 さいたま2008 |
ユーザー |
![]() |
提出日時 | 2016-08-12 00:50:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 592 ms |
コンパイル使用メモリ | 77,292 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-14 12:13:23 |
合計ジャッジ時間 | 1,513 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 |
ソースコード
#include <iostream>#include <fstream>#include <vector>#include <cstring>#include <string>#include <algorithm>#include <iomanip>#include <cmath>using namespace std;double x[2], y[2];int main() {cin.tie(0);ios::sync_with_stdio(false);for(int i = 0; i < 2; i++) {cin >> x[i] >> y[i];}double a = (y[1] - y[0]) / (-x[1] - x[0]);cout << setprecision(15) << y[1] + a * x[1] << endl;}