#P6994. [NEERC2014] Joke with permutation
[NEERC2014] Joke with permutation
题目描述
Joey had saved a permutation of integers from to in a text file. All the numbers were written as decimal numbers without leading spaces.
Then Joe made a practical joke on her: he removed all the spaces in the file.
Help Joey to restore the original permutation after the Joe's joke!
输入格式
The input file contains a single line with a single string -- the Joey's permutation without spaces.
The Joey's permutation had at least and at most numbers.
输出格式
Write a line to the output file with the restored permutation. Don’t forget the spaces!
If there are several possible original permutations, write any one of them.
题目大意
给出数字之间无分隔符的 的排列构成的字符串,将其还原为合法的排列。
保证 ,输入数据均保证有解。如有多解输出任一即可。
样例可能有助于你更好理解题意。
4111109876532
4 1 11 10 9 8 7 6 5 3 2
提示
Time limit: 1 s, Memory limit: 256 MB.
Thanks to checker provider:@Arcturus1350 .