Problem hidden
RESTRING - Rearrange String
You are given a string as an input.Rearrange the characters
of the string such that no character appears in its original position.
If the rearrangement is possible, print the rearranged string
else print 'Not possible'.
Input
The Input consist of string
Output
Output any possible rearrangement of the string.
If not possible print 'Not possible'.
Example
Input: aabccbadd Output: dcaabcdab
Added by: | Umang Malhotra |
Date: | 2016-03-23 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU JS-MONKEY |
Resource: | own |