結果
問題 |
No.2352 Sharpened Knife in Fall
|
ユーザー |
![]() |
提出日時 | 2023-06-16 22:38:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 777 bytes |
コンパイル時間 | 1,270 ms |
コンパイル使用メモリ | 120,480 KB |
最終ジャッジ日時 | 2025-02-14 06:43:10 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 19 |
ソースコード
#include <algorithm> #include <bit> #include <cassert> #include <cstdio> #include <cstdlib> #include <cmath> #include <deque> #include <iostream> #include <map> #include <random> #include <unordered_set> #include <unordered_map> #include <vector> #include <set> #include <string> using namespace::std; int main() { ios::sync_with_stdio(false); double r; int k; cin >> r >> k; vector<double> y; default_random_engine e; uniform_real_distribution<double> p(-r, r); for (int i = 0; i < 5e6; ++i) { double yi = p(e); if (hypot(p(e), yi) < r) y.push_back(yi); } while (y.size() % (k + 1)) y.pop_back(); sort(y.begin(), y.end()); int c = y.size() / (k + 1); for (int i = 1; i <= k; ++i) cout << y[c * i] << endl; return 0; }