Created
June 19, 2021 09:56
-
-
Save xnuk/f42b14a6639c8cd9eeed917c8aaeb0ec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const N = 1_000_000 | |
const M_MAX = 2_000_000_000 | |
const treeHeight = () => (Math.random() * (M_MAX - N) | 0) + N | |
const testCase = () => { | |
const trees = Array.from({ length: N }, treeHeight) | |
return N + ' ' + treeHeight() + '\n' + trees.join(' ') + '\n' | |
} | |
console.log(testCase()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment