Leapfrogging

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Each input line is a sequence from 1 to 9 in random order.

If starting from position 0, output should be: which direction a jump is (either < or >) and how far a jump is to leapfrog over the next number. example input:

132

Visualizing each step would look like:

starting from pos 0:

_132

So to jump over '1' right (>) by one gives you:

1_32 (temp output = '>1' )

Now to jump past 2 you have jump right by 2:

132_ (temp output = '>1>2' )

Now jump past 3, you have to change the direction to left (<) and jump 2:

1_32 (temp ouput = '>1>2<2')

and that's it. Output for '132' is '>1>2<2'.

NOTE: each input line and each output line should be terminated by a newline (this includes the last one.)

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

132

Sample output:

>1>2<2

Sample input:_

214365879

Sample output:

>2<2>4<2>4<2>4<2>3

Sample input:_

162854973
142956837
952386417
193678524
764238591
752934186
285743619
954837621
961528734
278631549

Sample output:

>1>2>6<4<1<3>7<5>4
>1>2>5<7>4>1>3<3<3
>8<6>2>3<6>5>3<5<4
>1>7<6>7<3<3>2>1<5
>9<6>2<3>5<6<1>6>2
>7<5>3>1<5>8<9>8<5
>8<8>6<2<2>5<4<2>8
>9<2<3<2<1>6<2<2<3
>3>2>3>1<6<2>6<2<5
>6<6>5>3<2<3<2>2>6

Ranking

Perl _

RankUserSizeTimeDateStatistics
1tails720.03602014/11/23 00:48:400B / 22B / 43B

Python _

RankUserSizeTimeDateStatistics
1leonid1060.08912014/11/14 04:15:200B / 53B / 42B
2llhuii1060.08822014/11/21 22:54:420B / 50B / 54B
3whatisgolf1060.09002014/11/23 07:07:180B / ?B / ?B
4twobit1070.11352014/11/13 08:09:180B / 54B / 42B
5rolf1080.09522014/11/23 00:33:290B / 55B / 42B
6xsot1120.10992014/11/21 23:20:440B / 57B / 53B

Python3 _

RankUserSizeTimeDateStatistics
1llhuii1130.15022014/11/21 23:04:240B / 53B / 52B

JavaScript _

RankUserSizeTimeDateStatistics
1_nderscore910.04492014/11/12 04:39:540B / 41B / 50B

Lua _

RankUserSizeTimeDateStatistics
1twobit1250.03332014/11/14 08:30:190B / 73B / 39B
2AndoDaan5000.03362014/11/10 09:04:580B / ?B / ?B

C _

RankUserSizeTimeDateStatistics
1llhuii1000.03232014/11/18 09:49:140B / 47B / 53B
2tails1030.03242014/11/18 01:16:320B / 53B / 50B
3twobit1090.03202014/11/13 22:21:570B / 55B / 54B
4whatisgolf1130.03202014/11/16 06:55:150B / ?B / ?B
5chocobi1240.03202014/11/11 16:11:450B / 64B / 60B

Haskell _

RankUserSizeTimeDateStatistics
1int-e1140.03602014/11/21 21:21:110B / 61B / 50B
2henkma1200.03652014/11/15 00:08:230B / 63B / 52B
3oerjan1360.03382014/11/11 23:49:260B / 62B / 71B
4int-e (henkma)1130.03482014/11/24 11:06:180B / 60B / 49B

AWK _

RankUserSizeTimeDateStatistics
1teebee610.03312014/11/17 04:12:540B / 27B / 33B
2llhuii610.03202014/11/17 23:11:590B / ?B / ?B

xgawk _

RankUserSizeTimeDateStatistics
1teebee610.04992014/11/17 09:13:170B / 27B / 33B
2llhuii610.03232014/11/17 23:12:060B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1tails400.09122014/11/22 22:29:110B / 8B / 32B

Burlesque _

RankUserSizeTimeDateStatistics
1fizzie500.06612014/11/17 03:15:400B / 28B / 22B
2AndoDaan1260.05042014/11/12 02:59:320B / 51B / 75B

Language Ranking_

RankLangUserSizeScore
1GolfScripttails4010000
2Burlesquefizzie508000
3AWKteebee616557
4xgawkteebee616557
5Perltails725555
6JavaScript_nderscore914395
7Cllhuii1004000
8Pythonleonid1063773
9Python3llhuii1133539
10Haskellint-e (henkma)1133539
11Luatwobit1253200

return top