all stats

Kestrel's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #23

submitted at
0 likes

guesses
comments 1
razetime ΒΆ

single comment. simplistic and inefficient spaghetti. Kestrel probably


post a comment


bogopolynomialdivide.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# bogopolynomialdivide
import struct
import random

def entry(a, b):
	"inefficient, also doesnt work in some cases because floating point but that isnt my fault"
	def l(p,x):
		if len(p)==1:return p*x
		else:return x*(p+l(p[:-1],x))
	while True:	
		p,q=[],[]
		for i in range(len(a)-len(b)):q+=struct.unpack('f',random.randbytes(4))
		for i in range(random.randint(len(a))):p+=struct.unpack('f',random.randbytes(4))
		e=1
		for i in range(500):
			x = struct.unpack('f',random.randbytes(4))
			if l(a,x)!=l(b,x)*l(p,x)+l(q,x):e=0
		if e>0.3409:return p,q
yiff.jpg JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 249x158, components 3

round #21

submitted at
2 likes

guesses
comments 0

post a comment


submissive.ts ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// it used to be even more complicated, but even i couldn't handle 300 lines of pure spaghetti

const needs_more_closure = (() => {
    class linkedCell {
        value: number;
        north: linkedCell;
        east: linkedCell;
        south: linkedCell;
        west: linkedCell;
    };
    let border = new linkedCell;
    border.value = 1;
    let x: number, y: number, arr: linkedCell[][] = [], passarr: linkedCell[] = [];
    const marks: [
        (px: number) => ((py: number) => void),
        (cell: number) => number,
        (e: number[]) => number,
        (e: number[]) => number[][]
    ] = [
        (px: number) => ((py: number) => { x = px; y = py }),
        (cell: number) => {
            let me = new linkedCell;
            me.value = cell;
            me.north = border;
            me.east = border;
            me.south = border;
            me.west = border;
            if (passarr.length > 0) {
                let prev = passarr[passarr.length - 1];
                prev.east = me;
                me.west = prev;
            }
            passarr.push(me);
            return 0;
        },
        (e: number[]) => {
            passarr.map((a, b) => {
                if (arr.length > 0) {
                    let c = arr[arr.length - 1][b];
                    a.north = c;
                    c.south = a;
                }
            });
            arr.push([...passarr]);
            passarr = [];
            return 0;
        },
        (e: number[]) => {
            let d: number;
            arr[x][y].value = 2;
            do {
                d = 0
                for (let n of arr) {
                    for (let m of n) {
                        if (m.value == 0) {
                            if (m.north.value == 2 || m.east.value == 2 || m.south.value == 2 || m.west.value == 2) {
                                m.value = 2;
                                d = 1;
                            }
                        }
                    }
                }
            } while (d)
            return arr.map(n => n.map(m => [0, 1, 1][m.value]));
        }
    ]
    return marks;
})()

function entry(grid: boolean[][], x: number, y: number): boolean[][] {
    needs_more_closure[0](x)(y);
    return needs_more_closure[3]
        (grid.map(
            a => needs_more_closure[2]
                (a.map(
                    b => needs_more_closure[1](Number(b))
                ))
        ))
        .map(a => a.map(b => Boolean(b)));
}