Ok, then we agree to count numbers as punctuation?
If so, my (in the mean time partly corrected) code will fail on some of the unofficial test cases:

Running Test 1 Encoding...Decoding...Done
Running Test 2 Encoding...Decoding...Done
Running Test 3 Encoding...Decoding...Done
Running Test 4 Encoding...Decoding...Done
Running Test 5 Encoding...Decoding...Done
Running Test 6 Encoding...failedDecoding...failedDone
Running Test 7 Encoding...failedDecoding...failedDone
Running Test 8 Encoding...Decoding...Done
Running Test 9 Encoding...Decoding...Done
Your solution failed 4 of 18 tests.

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 15
Speed = 2400 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/08 23:00:50.984
Processing End = 2007/08/08 23:00:51.000
Duration = 0000/00/00 00:00:00.016
KiXGolf Score = 426

Thank you for participating in KiXtart Golf!


Why it does fail on the "very long text" is a riddle to me, maybe because of the single character surrounded by single punctuation ... only God knows

On the other side I have code that works with the official test cases and is shorter:


Running Test 1 Encoding...Decoding...Done
Running Test 2 Encoding...Decoding...Done
Running Test 3 Encoding...Decoding...Done
Running Test 4 Encoding...Decoding...Done
Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 15
Speed = 2400 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/08 23:06:32.234
Processing End = 2007/08/08 23:06:32.234
Duration = 0000/00/00 00:00:00.000
KiXGolf Score = 421

Thank you for participating in KiXtart Golf!


This dies miserably on array reference out of bound if Blocksize >= 10
It's getting chaotic, no?

Wait, there's more ...

My ammended code passes the official results as well, is safe for Blocksize >= 10, but has a severe problem with numbers as 'punctuation':


Running Test 1 Encoding...Decoding...Done
Running Test 2 Encoding...Decoding...Done
Running Test 3 Encoding...Decoding...Done
Running Test 4 Encoding...Decoding...Done
Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 15
Speed = 2400 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/08 23:10:27.109
Processing End = 2007/08/08 23:10:27.109
Duration = 0000/00/00 00:00:00.000
KiXGolf Score = 426

Thank you for participating in KiXtart Golf!


The green is getting muddy, it's nearly bed time, I haven't got a change to provide a working solution as the rules aren't clear, I plead for getting it straight and add another 24 hrs to the private round ;\)

btw. You guys are insane ... How do you do this? \:o


Edited by Jochen (2007-08-08 11:31 PM)
Edit Reason: meant numbers as punctuation
_________________________