{"problem":{"name":"F. Ironical Solution 1","description":{"content":"Diego wants to message his friend Ketzia, for this he will first grab a word and encode it as numbers and then apply some encryption to the numbers and send it to her. Ironically, after coming up with","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10240F"},"statements":[{"statement_type":"Markdown","content":"Diego wants to message his friend Ketzia, for this he will first grab a word and encode it as numbers and then apply some encryption to the numbers and send it to her. Ironically, after coming up with this solution he realized that this system has to send word by word, only works for words were every letter is in alphabetical order and also there are many chat services that are free and will encrypt messages securely so there was no need to invent this encryption system.\n\nIn order to encrypt Diego will first grab a word of $N$ characters and convert every character into its numerical ASCII (for example 'A' -> 65, '0' -> 48, 'a' -> 97). After that he will have exactly $N$ positive numbers.\n\nGiven those $N$ numbers, he will generate all possible $2^N$ subsets and then for each subset get the sum of all the numbers in the subset, he will then sort the sums and send them to Ketzia. She will decrypt the message by doing the inverse of the encryption steps.\n\nFor this particular problem, he will do the encryption of the message. \n\nAn integer $N$ $(1 <= N <= 20)$, the amount of characters that the word that Diego is sending to Ketzia has. The word will have its characters sorted in non-decreasing order by ASCII value.\n\nA single word of length $N$ containing only lower and upper case letters and numbers.\n\n$2^N$ numbers sorted in non-decreasing order in the same line, the encrypted word.\n\n## Input\n\nAn integer $N$ $(1 <= N <= 20)$, the amount of characters that the word that Diego is sending to Ketzia has. The word will have its characters sorted in non-decreasing order by ASCII value.A single word of length $N$ containing only lower and upper case letters and numbers.\n\n## Output\n\n$2^N$ numbers sorted in non-decreasing order in the same line, the encrypted word.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ N \\in \\mathbb{Z} $ with $ 1 \\leq N \\leq 20 $.  \nLet $ w = c_1 c_2 \\dots c_N $ be a string of length $ N $, where each $ c_i $ is a character with ASCII value $ a_i = \\text{ord}(c_i) $, and $ a_1 \\leq a_2 \\leq \\dots \\leq a_N $.  \n\nLet $ A = (a_1, a_2, \\dots, a_N) $ be the sequence of ASCII values.  \n\n**Constraints**  \n- $ 1 \\leq N \\leq 20 $  \n- $ a_i \\in \\mathbb{Z}^+ $ for all $ i \\in \\{1, \\dots, N\\} $  \n- $ a_1 \\leq a_2 \\leq \\dots \\leq a_N $  \n\n**Objective**  \nCompute the multiset of subset sums:  \n$$\nS = \\left\\{ \\sum_{i \\in I} a_i \\,\\middle|\\, I \\subseteq \\{1, 2, \\dots, N\\} \\right\\}\n$$  \nOutput the elements of $ S $ sorted in non-decreasing order.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10240F","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}