#K56147. Cards Against Humanity Sentence Generator
Cards Against Humanity Sentence Generator
Cards Against Humanity Sentence Generator
Your task is to implement a simplified version of the popular card game "Cards Against Humanity". The program must randomly select a black card from a predefined list and replace any blanks (denoted by __
) with white cards randomly chosen from another predefined list.
The black card may have no blank, one blank, or two blanks. For every blank encountered, a white card must be selected and inserted into the blank position, in order.
To facilitate deterministic results for testing, your program must read an integer seed from the standard input, set the random number generator with this seed, and then output the generated sentence to the standard output.
The cards are defined as follows:
- Black Cards:
- "Why can't I sleep at night?"
- "In his new self-produced album, Kanye West raps over the sounds of ___."
- "Instead of coal, Santa now gives the bad children __ and __."
- "I got 99 problems but ___ ain't one."
- "During sex, I like to think about __."
- White Cards:
- "A spontaneous conga line."
- "Funky basslines."
- "A pack of weasels."
- "Explosive glitter bombs."
- "A mime having a stroke."
- "Chunks of dead hitchhiker."
- "A steaming pile of horse manure."
- "An endless stream of diarrhea."
- "A genetically engineered super-soldier."
- "10,000 shrieking madnesses."
inputFormat
The input consists of a single integer seed provided via standard input. This seed is used to initialize the random number generator.
outputFormat
The output is a single sentence generated by selecting a random black card and, if applicable, replacing its blank(s) with randomly chosen white cards. The sentence is printed to standard output.
## sample1
Why can't I sleep at night?
</p>