結果

問題 No.159 刺さらないUSB
ユーザー te-sh
提出日時 2016-08-31 14:50:09
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 377 bytes
コンパイル時間 940 ms
コンパイル使用メモリ 116,160 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 03:59:49
合計ジャッジ時間 1,606 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.array, std.container, std.range;
import std.numeric, std.math, std.bigint, std.bitmanip, std.random;
import std.string, std.conv, std.stdio, std.typecons;

void main()
{
  auto rd = readln.split.map!(to!real);
  auto p = rd[0], q = rd[1];

  auto p0 = p * q;
  auto p1 = (1 - p) * q;
  auto p2 = p * (1 - q) * q;

  writeln(p1 < p2 ? "YES" : "NO");
}
0