結果
問題 | No.787 Mice and Traitors(ネズミ達と裏切り者) |
ユーザー |
![]() |
提出日時 | 2019-02-08 21:39:04 |
言語 | C++11 (gcc 8.5.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 652 bytes |
コンパイル時間 | 483 ms |
使用メモリ | 3,780 KB |
最終ジャッジ日時 | 2023-01-28 14:57:47 |
合計ジャッジ時間 | 1,419 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
3,660 KB |
testcase_01 | AC | 1 ms
3,728 KB |
testcase_02 | AC | 1 ms
3,732 KB |
testcase_03 | AC | 2 ms
3,700 KB |
testcase_04 | AC | 2 ms
3,568 KB |
testcase_05 | AC | 1 ms
3,692 KB |
testcase_06 | AC | 1 ms
3,564 KB |
testcase_07 | AC | 1 ms
3,780 KB |
testcase_08 | AC | 1 ms
3,696 KB |
testcase_09 | AC | 1 ms
3,692 KB |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <utility> #include <queue> #include <set> #include <map> #include <deque> #include <iomanip> #include <cstdio> #include <stack> #include <numeric> using namespace std; typedef long long ll; typedef pair<int,int> PII; typedef vector<int> VI; typedef vector<VI> VVI; #define MP make_pair #define PB push_back #define inf 1000000007 #define rep(i,n) for(int i=0;i<(int)(n);++i) int main(){ double p,q; cin >> p >> q; p/=100.0; q/=100.0; cout.precision(20); cout << 100.0*p*q/(p*q+(1.0-p)*(1.0-q)) << endl; return 0; }