Cartesian product
{1,2,3,4,5} X {1,2,3,4,5}
Start file
End file
1 1 1 2 1 3 1 4 1 5 2 1 2 2 2 3 2 4 2 5 3 1 3 2 3 3 3 4 3 5 4 1 4 2 4 3 4 4 4 5 5 1 5 2 5 3 5 4 5 5
View Diff
1c1,25 < --- > 1 1 > 1 2 > 1 3 > 1 4 > 1 5 > 2 1 > 2 2 > 2 3 > 2 4 > 2 5 > 3 1 > 3 2 > 3 3 > 3 4 > 3 5 > 4 1 > 4 2 > 4 3 > 4 4 > 4 5 > 5 1 > 5 2 > 5 3 > 5 4 > 5 5
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 56 remaining solutions by signing in and submitting your own entry
#57 Trevor Powell / @DoomedBunnies - Score: 38 - 03/20/13 @ 17:13
i1 1<Esc>qqYpl<C-A>q3@qqq4k5Y}p<C-A>j<C-A>j<C-A>j<C-A>j<C-A>q3@qZZ
0 comments
#58 Renat Aksitov / @Korvin79 - Score: 39 - 02/01/12 @ 01:28
i1 1<Esc>qzYp$<C-A>q3@zqz4-5Y4<NL>p<C-A><NL><C-A><NL><C-A><NL><C-A><NL><C-A>q3@zZZ
0 comments
#59 drio / @drio - Score: 44 - 01/16/11 @ 09:06
i1 1<Esc>qqYp<C-A>q3@qggqqYp$<C-A>q3@qj4@qj4@qj4@qj4@qZZ
0 comments
#60 dw jdder / @dwjdder - Score: 45 - 01/11/11 @ 07:43
i <Esc>:%s:.:& 1\r& 2\r& 3\r& 4\r& 5:|%s: <CR>@:ZZZ
0 comments
#61 William Shackleton / @wshackleton - Score: 49 - 01/04/11 @ 09:00
!!echo {1,2,3,4,5}" "{1,2,3,4,5}x<CR>:s/x /\r/g<CR>$xZZ
0 comments
#62 Avinash Baliga / @avinashbaliga - Score: 49 - 03/27/11 @ 21:11
i1 1<Esc>qqYpw<C-A>q3@qo2 1<Esc>4@qo3 1<Esc>4@qo4 1<Esc>4@qo5 1<Esc>4@qZZ
0 comments
#63 Ricardo Rey / @Changowero - Score: 51 - 06/22/11 @ 08:43
!!echo {1,2,3,4,5}" "{1,2,3,4,5}x<CR>:s/x /|<BS>\r/g<CR>$xZZ
0 comments
#64 sorami / @boredoms - Score: 53 - 04/30/11 @ 16:11
i1 1<CR>2 1<CR>3 1<CR>4 1<CR>5 1<C-C><C-C>ggqayypw<C-A>q3@aj4@aj4@aj4@aj4@aZZ
0 comments
#65 Christopher Brew / @Seph1rothVII - Score: 57 - 01/12/12 @ 12:56
i1 1<Esc>Y24Pllqqj<C-A>j2.j3.j4.jq4@qggqq5j<C-A>5j2.5j3.5j4.19kq4@qZZ
0 comments
#66 無ん垢の叫び / @john_ababa - Score: 58 - 02/24/12 @ 02:23
i1 1<Esc>Y4p$r2jr3jr4jr5ygg4P5j<C-V>5jkr25j<C-V>4jr35j<C-V>4jr45j<C-C><C-C><C-V>5jr5ZZ
0 comments
#67 Francisco Dibar / @frandibar - Score: 72 - 01/10/11 @ 21:12
:for i in range(1,5)|for j in range(1,5)|pu=i.' '.j|endfor|endfor<CR>:1d|x<CR>
0 comments
#68 Jan Wedekind / @wedesoft - Score: 104 - 07/13/12 @ 12:16
i12345<Esc>^q1ia<Esc>llq4@1Y4pk:.s/a/1/g<CR>j:<Up><Left><Left><BS>2<CR><Down>:<Up><Left><Left><BS>3<CR><Down>:<Up><Left><Left><BS>4<CR><Down>:<Up><Left><Left><BS>5<CR>1G:%s/\(.\)\(.\)/\1 \2\r/g<CR>:g/^$/d<CR>:wq<CR>
0 comments
#69 not so punk :] / @notsopunk - Score: 128 - 06/19/11 @ 03:36
a1 1<Esc>qqyyP<Esc>uq<Esc><Esc>qqyypw<C-A><Esc>q3@q:-4:d<CR><Esc>uG<Esc>uuuuuuuuuuuuuuuuua1 1<Esc>qqYpl<C-A>q3@qqqy4-Gp<Esc>u<Esc><Esc><Esc>a1 1<Esc>qqYpll<C-A>q3@qqqy4-Gp<C-A>+.+.+.+.$q3@qZZ
0 comments
#70 Ayman Farhat / @aymanfarhat - Score: 157 - 05/05/13 @ 08:33
1i1 1<CR><BS><CR>1 2<CR>1 3<CR>14<BS> 4<Esc>v<Up><Up><Up><Up><Up><Left><Left><Left>di:<BS><BS><Esc>:set a<BS>paste<CR>i1 1<CR>1 2<CR>1 3<CR>1 4<CR>1 5<CR>2 1<CR>2 2<CR>2 3<CR>2 4<CR>2 5<CR>3 1<CR>3 2<CR>3 3<CR>3 4<CR>3 5<CR>4 1<CR>4 2<CR>4 3<CR>4 4<CR>4 5<CR>5 1<CR>5 2<CR>5 3<CR>5 4<CR>5 5<Esc>:w<CR>:q<CR>
0 comments
VimGolf