SORTING - Sorting is easy
try your luck
in brainfuck
For those who don't know that brainfuck is a programming language: Take a look at the converter to C. It will ignore every unknown command, therefore submitting a program in any other language won't necessarily lead to compile error, but certainly not to Accepted.
Input
The input consists of a line of up to 1000 uppercase letters, terminated with a '\n' character (ASCII value 10).
Output
The output should contain a line consisting of the same characters as the input line, but in non-descending order.
Example
Input: BRAINFUCK Output: ABCFIKNRU
hide comments
Rafail Loizou:
2020-09-02 20:53:52
[BEFORE] I solved it but with more that 500 characters of code which is the source limit.I tried to make the code smaller but I can't go under 700 characters of code. For a BF problem shouldn't the source limit be higher?
|
|
Vamsi Krishna Avula:
2014-12-12 09:13:37
Its easier than I expected and of course had a good time debugging. |
|
Martijn Muijsers:
2014-01-09 02:24:47
Boom AC in one go! Thinking about it, writing it and debugging it all took me a long time, and I learned a lot! :) |
|
Mitch Schwartz:
2013-08-18 14:05:14
I've seen it also on http://www.spoj.com/SHORTEN/problems/ODDBF/ , maybe it's a bug on SPOJ that happens very rarely. |
|
ওয়াসী (Wasi):
2013-08-18 13:26:01
Strange! the problem setter is the best solver. I've never seen this type of thing before.I've tried to solve my own problem FIZZBUZZ(though a tutorial one :P) but my solution didn't appear in the best solver list.
|
|
Jitesh:
2011-11-03 10:17:36
Thnx.....
|
|
Adrian Kuegel:
2011-11-02 14:29:57
you don't print the 'Z's |
|
Jitesh:
2011-11-02 07:38:57
Firstly i got a TLE n now its giving me a WA....Can any one give some test cases...
|
|
Adrian Kuegel:
2010-08-23 10:55:13
you need to use brainfuck (check wikipedia if you don't know about it) |
|
BACK:
2010-08-22 08:28:01
which language have 2 use... |
Added by: | Adrian Kuegel |
Date: | 2004-11-04 |
Time limit: | 1s |
Source limit: | 500B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | BF |
Resource: | own problem |