Quarta-feira, 2 de Dezembro de 2009

Tomorrow at 10h30pm, SAPO Codebits quiz show!

 

 

The qualification round is now over, with some great javascript hacking.

joao_sil won this final round with an amazing 76 stroke solution:

 

{
\]
\[
\+
-
\.
>
<
^
z
g
g
g
g
g
g
g
g
g
g


//
}
while(z){
z++;
z--;
e+='&#'+z;
i++;z=z?z:0;
i--;
a=[i=0];e=''
a[i]


 

 

Our thanks to Microsoft, for sponsoring the first prize which will be a brand new Xbox 360!

 

 

Here is the final rank. The first sixteen players are automatically qualified, in case of someone giving up, we will choose from the classification. Note that any player that is qualified will be able to choose any codebits contestant to be his team member, disregarding if he participated or not on the qualifications rounds.

 

Rank Score Nick
1 829.4 pcardoso
2 611.8 gh0std0g
3 610.8 fernandods
4 592.4 joao_sil
5 523.1 ppinheiro76
6 523.0 lneves
7 513.5 EDevil
8 500.9 defer
9 479.4 anjosc
10 459.4 nosuchuser
11 448.9 chbm
12 442.5 etaborda
13 413.6 pheres
14 384.2 nunonunes
15 354.2 trodrigues
16 345.2 pfandrade
17 340.6 phantas
18 325.7 ncorreia
19 323.9 jvarandas
20 323.3 acmpires
21 320.2 cdeath
22 314.2 jpescada
23 310.0 japc
24 305.6 semmais
25 302.1 dextro
26 295.7 rogeriopvl
27 291.7 Dawninha
28 291.7 cvalente
29 289.1 rfer
30 279.2 CrLf
31 273.8 Madril
32 247.4 pedro_mg

See you all tomorrow, don't forget to register in your calendar for the event!


publicado por joaovelhote às 19:51
link do post | comentar
|
5 comentários:
De Anónimo a 2 de Dezembro de 2009 às 21:09
I have an objection.

The problem states: "which you can use to initialize and to output the result to the 'e' variable."

In all programs the output variable 'e' will be something like: (for the first example)

e="SAPO Codebits 2009"

Which is e != 'SAPO Codebits 2009'

The browser displays it correctly because instead of assigning a dom text node to e, the innerHTML was used instead.

This can be checked by just evaluating the resulting code in a JS shell (firebug for example).

Another problem would be wrapping for negative numbers.

{bf}
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
. 
{/bf}


should result in e='~' and not e='&#-130' which is displayed as &#-130 by the browser.

This is a valid bf example.


De Anónimo a 2 de Dezembro de 2009 às 21:13
I meant to write: (escaping problems ironically)

In all programs the output variable 'e' will be something like: (for the first example)



e="&#83&#65&#80&#79&#32&#67&#111&#100&#101&#98&#105&#116&#115&#32&#50&#48&#48&#57"

Which is e != 'SAPO Codebits 2009'


De Diogo Ferreira a 2 de Dezembro de 2009 às 21:14
Actually you are right but wrap around isn't a requirement for a brainfuck interpreter, some have it some don't. By the way I could shave some more characters: z=z?z:0; == z=z||0, it was the string.fromcharcode that killed it.


De Anónimo a 2 de Dezembro de 2009 às 21:24
I disagree the wraparround was present in the original Aminet release

http://aminet.net/dev/lang/brainfuck-2.lha

Anyway, the entities issue is certainly not compliant.

I would like people to post their solutions so that we all learn something.


De Anónimo a 3 de Dezembro de 2009 às 10:58
I would but I can't see my submission anymore on the contest page.


Comentar post