Thread View: pl.comp.lang.perl
3 messages
3 total messages
Started by Boris
Sat, 30 Oct 2010 17:09
Code Golf -- SPOJ - NOP
Author: Boris
Date: Sat, 30 Oct 2010 17:09
Date: Sat, 30 Oct 2010 17:09
10 lines
1449 bytes
1449 bytes
Hi everyone, I found a very interesting problem in spoj. You can refer the problem description here: http://www.spoj.pl/problems/NOP/ I somehow reduced my solution to 42 bytes. But the shortest solution is 39 bytes (By Piotr Fusik ) Here is my solution. Any hints on further reduction ? $n+=~y///c&3for<>=~/(.*?)[A-Z]/g;print$n-3
Re: Code Golf -- SPOJ - NOP
Author: Maciej Misiak
Date: Sun, 31 Oct 2010 20:17
Date: Sun, 31 Oct 2010 20:17
17 lines
1523 bytes
1523 bytes
W dniu 2010-10-30 19:09, Boris pisze: > Hi everyone, I found a very interesting problem in spoj. > > You can refer the problem description here: http://www.spoj.pl/problems/NOP/ > > I somehow reduced my solution to 42 bytes. But the shortest solution > is 39 bytes (By Piotr Fusik ) > > Here is my solution. Any hints on further reduction ? > > $n+=~y///c&3for<>=~/(.*?)[A-Z]/g;print$n-3 Well, what is allowed? Command line switches? How is the length of the program counted? -- grizzley
Re: Code Golf -- SPOJ - NOP
Author: 0xF
Date: Tue, 02 Nov 2010 08:22
Date: Tue, 02 Nov 2010 08:22
6 lines
1440 bytes
1440 bytes
I'm not going to post my solution here. :) Score is file length, including the shebang line. :( More golfing tasks at http://www.spoj.pl/SHORTEN/ 0xF
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads