name | correct guesses | games together | ratio |
---|---|---|---|
Olivia | 1 | 4 | 0.250 |
LyricLy | 0 | 4 | 0.000 |
name | correct guesses | games together | ratio |
---|---|---|---|
LyricLy | 4 | 4 | 1.000 |
razetime | 3 | 4 | 0.750 |
Palaiologos | 2 | 4 | 0.500 |
Olivia | 2 | 5 | 0.400 |
1 2 3 4 5 | import itertools entry = lambda x, y: max((("".join(x[i + o] if x[i + o] == y[j + o] else "\0" for o in range(min(len(x) - i, len(y) - j))).split("\0")[0]) for i, j in itertools.product(range(len(x)), range(len(y)))), key=len, default="") if __name__ == "__main__": print(entry(input("1: "), input("2: "))) |
1 | entry = lambda a:not{...for b in range(2,a//2) if a%b==0} |
1 2 3 4 | d,c,entry = ord,chr,lambda a: int(b(b(list(a),[c(42),c(47)],(lambda a,b,c:a*b if d(c)==42 else a//b)),[c(43),c(45)],(lambda a,b,c:a+b if d(c)==43 else a-b))[0]) def b(a,b,c): while(d:=min((a for a,c in enumerate(a) if c in b),default=-1))!=-1:a=a[:d-1]+[c(int(a[d-1]),int(a[d+1]),a[d])]+a[d+2:] return a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Example of input that becomes smaller: b'aaaaaaaaaaaa' def compress(data: bytes) -> bytes: first,pairs=None,[] for byte in data:first=byte if first is None else pairs.append((first,byte)) counts=[(pair,pairs.count(pair)) for pair in set(pairs)] counts.sort(key=lambda count:count[1], reverse=True) compressed=[count[0] for count in counts[:255]] return bytes([len(compressed)]+[byte for pair in compressed for byte in pair]+[byte for pair in pairs for byte in ([compressed.index(pair)+1] if pair in compressed else tuple([0])+pair)]+([0, first]*(first!=None))) def decompress(data: bytes) -> bytes: first,compressed,literal,out=None,[],0,[] for byte in data[1:(data[0]*2+1)]: first=byte if first is None else compressed.append((first, byte)) for byte in data[(data[0]*2+1):]: if literal: _,literal=out.append(byte),(literal+1)%3 elif byte==0:literal=1 else:out+=list(compressed[byte-1]) return bytes(out) |
1 2 3 | def entry(haystack: str, needle: str) -> int: a,b,c,d,e=-1,len,range,needle,haystack return([b for b,c in [[f,b([f for g in c(b(d)) if e[f+g]==d[g]])==b(d)] for f in c(b(e)-b(d)-a)] if c]+[a])[0] |
Taking code from other server members that was written during the round is against the rules. Who originally authored this code?
I was the person who posted it in the server
post a comment