{"problem":{"name":"044. Yoda Translator","description":{"content":"Yoda tends to confuse people with his irregular syntax. Write a program that takes in a string and switches the first half of the words with the second half. A line will contain a string. For the in","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269044"},"statements":[{"statement_type":"Markdown","content":"Yoda tends to confuse people with his irregular syntax. Write a program that takes in a string and switches the first half of the words with the second half.\n\nA line will contain a string.\n\nFor the input, your program must print that string with the first and second half of the words switched.\n\nAssume the input will always have an even number of words.\n\n## Input\n\nA line will contain a string.\n\n## Output\n\nFor the input, your program must print that string with the first and second half of the words switched.\n\n[samples]\n\n## Note\n\nAssume the input will always have an even number of words.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ S $ be a string consisting of $ 2n $ words (for some $ n \\in \\mathbb{Z}^+ $), separated by single spaces.  \nLet $ W = (w_1, w_2, \\dots, w_{2n}) $ be the sequence of words in $ S $, where each $ w_i $ is a non-empty substring of $ S $ delimited by spaces.\n\n**Constraints**  \n1. The number of words in $ S $ is even: $ |W| = 2n $ for some $ n \\geq 1 $.  \n2. Words are separated by exactly one space.  \n3. No leading or trailing spaces in input.\n\n**Objective**  \nConstruct a new string $ S' $ by swapping the first half of words with the second half:  \n$$ S' = \\text{join}\\left( (w_{n+1}, w_{n+2}, \\dots, w_{2n}, w_1, w_2, \\dots, w_n), \\text{ } \\right) $$  \nwhere $ \\text{join}(L, \\text{ }) $ concatenates the list $ L $ of words with single spaces between them.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269044","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}