/* * Quick Test: CLI for stress testing in competitive programming * Copyright (C) 2021-present / Luis Miguel Báez * License: MIT (See the LICENSE file in the repository root directory) */ // STRESS CODES pub const GEN_CPP_STRESS: &str = r#" #include using namespace std; template T random(const T from, const T to) { static random_device rdev; static default_random_engine re(rdev()); using dist_type = typename conditional< is_floating_point::value, uniform_real_distribution, uniform_int_distribution >::type; dist_type uni(from, to); return static_cast(uni(re)); } int main() { #define endl '\n' int n = random(1e5, 2e5); cout << n << endl; for(int i=0;i(1, 1e9) << " "; cout << endl; return 0; } "#; pub const TARGET_CPP_STRESS: &str = r#" #include using namespace std; int n; vector A; int main() { cin >> n; A.resize(n); for(auto &ref: A) cin >> ref; sort(A.begin(), A.end()); cout << n << endl; for(auto &a: A) cout << a << " "; cout << endl; return 0; } "#; pub const GEN_PY_STRESS: &str = r#" from random import uniform n = int(uniform(int(1e5), int(2e5))) print(n) A = [int(uniform(1, int(1e9))) for _ in range(n)] print(*A) "#; pub const TARGET_PY_STRESS: &str = r#" n = int(input()) A = list(map(int, input().split())) A.sort() print(n) print(*A) "#;