From 3e79ef41cefec10e7f46b184907edffb13c2ecff Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 27 Mar 2021 15:42:14 +0800 Subject: import(life): Add algorithm contest 3. --- works/life/algorithm-contest-3/test-data/5/10.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 works/life/algorithm-contest-3/test-data/5/10.cpp (limited to 'works/life/algorithm-contest-3/test-data/5/10.cpp') diff --git a/works/life/algorithm-contest-3/test-data/5/10.cpp b/works/life/algorithm-contest-3/test-data/5/10.cpp new file mode 100644 index 0000000..c74d96d --- /dev/null +++ b/works/life/algorithm-contest-3/test-data/5/10.cpp @@ -0,0 +1,20 @@ +#include +#include +#include + +const int kNumberCount = 100; +const int kChooseCount = 40; + +int main() { + std::random_device random_device; + auto random = std::default_random_engine{random_device()}; + std::uniform_int_distribution distribution{0, 200000}; + + std::cout << kNumberCount << ' ' << kChooseCount << "\n"; + + for (int i = 0; i < kNumberCount; i++) { + std::cout << distribution(random) - 100000 << "\n"; + } + + return 0; +} -- cgit v1.2.3