303868: CF746B. Decoding
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Decoding
题意翻译
## **题目大意** Polycarp很想编码,这就是他编写Sveta编码信息的原因。他把中间字母称为单词中间的字母。如果单词的长度是偶数,则中间字母是两个中间字母的左边。在以下示例中,中间字母突出显示:con**t** est,i**n**fo。如果单词由单个字母组成,则根据上面的定义,这个字母是中间字母。 Polycarp以下列方式对每个单词进行编码:他写下单词的中间字母,然后将其删除并重复该过程,直到没有字母为止。例如,他将volga编码为logva。 你得到一个编码,你的任务是进行译码。 ### **输入格式:** 第一行包含正整数(1<=n<=2000)n代表编码字的长度。 第二行包含一个只由小写英文字母组成的字符串编码。 ### **输出格式:** 输出Polycarp进行编码的原单词输出Polycarp进行编码的原单词。题目描述
Polycarp is mad about coding, that is why he writes Sveta encoded messages. He calls the median letter in a word the letter which is in the middle of the word. If the word's length is even, the median letter is the left of the two middle letters. In the following examples, the median letter is highlighted: contest, info. If the word consists of single letter, then according to above definition this letter is the median letter. Polycarp encodes each word in the following way: he writes down the median letter of the word, then deletes it and repeats the process until there are no letters left. For example, he encodes the word volga as logva. You are given an encoding $ s $ of some word, your task is to decode it.输入输出格式
输入格式
The first line contains a positive integer $ n $ ( $ 1<=n<=2000 $ ) — the length of the encoded word. The second line contains the string $ s $ of length $ n $ consisting of lowercase English letters — the encoding.
输出格式
Print the word that Polycarp encoded.
输入输出样例
输入样例 #1
5
logva
输出样例 #1
volga
输入样例 #2
2
no
输出样例 #2
no
输入样例 #3
4
abba
输出样例 #3
baba