28
4
Your task is to write a program which prints following four verses extracted from the lyrics from The Beatles' song "Hey Jude" (© Sony/ATV Music Publishing LLC):
Hey Jude, don't make it bad\n
Take a sad song and make it better\n
Remember to let her into your heart\n
Then you can start to make it better\n
\n
Hey Jude, don't be afraid\n
You were made to go out and get her\n
The minute you let her under your skin\n
Then you begin to make it better\n
\n
Hey Jude, don't let me down\n
You have found her, now go and get her\n
Remember to let her into your heart\n
Then you can start to make it better\n
\n
Hey Jude, don't make it bad\n
Take a sad song and make it better\n
Remember to let her under your skin\n
Then you'll begin to make it\n
\n
BUT
The only input you are allowed to use to construct these four verses is this list of tokens:
"Hey Jude, don't"
" make it bad"
" be afraid"
" let me down"
"Take a sad song and make it better"
"You"
" were made to go out"
" and get her"
" have found her, now go"
"Remember to"
"The minute you"
" let her"
" into your heart"
" under your skin"
"Then"
" you"
" can start"
"'ll"
" begin"
" to make it"
" better"
Note that some tokens have a space preceded and that enclosing quotes are not part of the tokens. You are free to use any format for the list and to rearrange the order of the tokens.
Your generated output has to exactly match the above four verses. Note that\n
is used for newlines and an extra newline is added after each verse. You can use this file (MD5: 4551829c84a370fc5e6eb1d5c854cbec
) to check your output against.
You can use following railroad diagram to understand the structure of the verses (each element represents a token):
Shortest code in bytes wins. Happy golfing.
Just to make this clear: my understanding is that the tokens are passed to the program/function and do not contribute to the byte count. Is that correct? – Arnauld – 2018-02-19T16:01:59.777
@Arnauld Yes, that's correct. – arminb – 2018-02-19T16:02:34.083
47The part that goes Nah nah nah nah nah nah, nah nah nah, would have easier to compress. ^^ – Arnauld – 2018-02-19T16:14:54.230
1Given that the input is any ordering of a fixed set I think tagging as kolmogorov-complexity makes sense. I've added it, if people disagree then just remove it :) – Jonathan Allan – 2018-02-19T16:17:36.063
3
@Arnauld Related :P
– James – 2018-02-19T16:20:39.78710
@Arnauld obligatory XKCD https://xkcd.com/851_make_it_better/
– Nathaniel – 2018-02-20T00:30:06.8633It must be hard to sing all those backslashes at the end of every line. – Tamás Sengel – 2018-02-20T10:36:46.900
@arminb what did you use to make that diagram? So pretty.... – bonh – 2018-02-20T14:31:35.490
2
@bonh railroad-diagrams
– arminb – 2018-02-20T15:03:03.5072Ruby: loop { puts 'na' } – AJFaraday – 2018-02-20T16:12:56.113
Possible duplicate of We're no strangers to code golf, you know the rules, and so do I
– FantaC – 2018-03-05T23:50:54.433You confusingly put two newlines at the end of each line of the song. I recommend you edit one out. – msh210 – 2018-03-06T21:45:11.817