結果
| 問題 |
No.221 犯罪都市
|
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2025-02-22 00:29:10 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 763 bytes |
| コンパイル時間 | 3,695 ms |
| コンパイル使用メモリ | 273,672 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-02-22 00:29:15 |
| 合計ジャッジ時間 | 4,295 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "settings/debug.cpp"
#else
#define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
int n;
cin >> n;
// | 正 | 誤
// ----------------------------------
// 陽性 | N/10000 * 0.99 | (10000-N)/10000 * 0.01
// 陰性 | N/10000 * 0.01 | (10000-N)/10000 * 0.99
// 陽性の確率: N/10000 * 0.99 + (10000-N)/10000 * 0.01
// = (N * 98 + 10000) / 10000'00
// 誤認 = (10000-N)/10000 * 0.01 / ((N * 98 + 10000) / 10000'00)
// = (10000-N) / (N * 98 + 10000)
cout << fixed << setprecision(15) << (10000 - n) * 100 / (n * 98.0 + 10000) << endl;
return 0;
}
a01sa01to