結果
| 問題 |
No.787 Mice and Traitors(ネズミ達と裏切り者)
|
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2019-02-08 21:34:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 695 bytes |
| コンパイル時間 | 1,260 ms |
| コンパイル使用メモリ | 166,968 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 18:34:47 |
| 合計ジャッジ時間 | 1,732 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }
int main() {
cin.tie(nullptr); ios_base::sync_with_stdio(false);
long double p, q; cin >> p >> q;
p /= 100;
q /= 100;
long double r = p * q / ((1 - p) * (1 - q) + p * q);
cout << fixed << setprecision(15) << 100 * r << '\n';
}
risujiroh