name | correct guesses | games together | ratio |
---|---|---|---|
Olivia | 1 | 4 | 0.250 |
kimapr | 1 | 5 | 0.200 |
kotnen | 0 | 5 | 0.000 |
luatic | 0 | 4 | 0.000 |
LyricLy | 0 | 5 | 0.000 |
name | correct guesses | games together | ratio |
---|---|---|---|
kimapr | 2 | 5 | 0.400 |
kotnen | 1 | 4 | 0.250 |
luatic | 0 | 4 | 0.000 |
LyricLy | 0 | 5 | 0.000 |
Olivia | 0 | 4 | 0.000 |
1 | https://uiua.org/pad?src=0_12_0-dev_1__T25lRGltZW5zaW9uYWxMT1Mg4oaQIOKXvzLip7viipzilqHiiaBAIy7iipziioLiiaBALi4KCk9uZURpbWVuc2lvbmFsTE9TICIjLkAuLi4uZy4jIgpPbmVEaW1lbnNpb25hbExPUyAiZy5ALi4uLi4jIyIKT25lRGltZW5zaW9uYWxMT1MgIiMuQC4jIy5nLiMiCk9uZURpbWVuc2lvbmFsTE9TICJnIy4uLi4uLiNAIgo= |
1 2 3 4 5 6 | I .. ... 0::= .. ... 01-..- -..-1::=10-..- -..-0::=01-..- -..- --...::=--.. ::= IIIIIII .. ... 0 --.. |
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 | const std = @import("std"); pub fn entry(haystack: []const u8, needle: []const u8) ?struct{usize, usize} { if (needle.len == 0) { return null; } var locations: [256]std.ArrayList(usize) = undefined; for (locations[0..]) |*point| { point.* = std.ArrayList(usize).init(std.heap.page_allocator); } for (haystack, 0..) |character, index| { locations[character].append(index) catch @panic("Error."); } const first_character = needle[0]; if (needle.len == 1) { if (locations[first_character].items.len > 0) { return .{ locations[first_character].items[0], 0, }; } return null; } for (locations[first_character].items[0..]) |index| { const second_character = needle[1]; for (locations[second_character].items[0..]) |index_two| { const gap = index_two -| index; if (gap == 0) { continue; } const index_last = index + gap * (needle.len -| 1); if (index_last >= haystack.len) { continue; } for (2..needle.len) |index_nth| { const haystack_pos = index + gap * index_nth; if (needle[index_nth] != haystack[haystack_pos]) { break; } } else { return .{ index, gap, }; } } } return null; } pub fn main() !void { std.debug.print("{?}, {?}, {?}, {?}\n", .{ entry("THISBOOKISSOFUCKINGAWESOMEANDIAMTOTALLYGAY", "SAD"), entry("THISBOOKISSOFUCKINGAWESOMEANDIAMTOTALLYGAY", "SCAM"), entry("THISBOOKISSOFUCKINGAWESOMEANDIAMTOTALLYGAY", "GAY"), entry("THISBOOKISSOFUCKINGAWESOMEANDIAMTOTALLYGAY", "SICK"), }); } |
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 | uwuifier = [31,14,15,92,65,35,89,79,32, 38,46,26,43,38,32,79,50,28] eval $WHATSTHIS = %q( TIME = 0; LOOP = { HOST = uwuifier.com ISO_CODE = BI NATION = ( TIME = ). COLLECT {| 1. OwO |[ 2. OwO , 3. OwO . EACH = _ CONS = (2). ALL = ?{| 1. UwU , 2. O_O | 3. UwU < 4. O_O }]}. SELECT = {| 1. U_U | 2. U_U . LAST = }; IF(HOST.EMPTY?) THEN; BREAK; END; $RESPOND = HOST. FIRST. FIRST; TIME += 1 }; P -P-PLEASE... $RESPOND ). gsub(/ .* /,''). downcase. split* '' |
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 | at = lambda glauds : sum ( 2 ** how * glauds [ how ] for how in glauds ) the = lambda glauds , how , rorm : how if glauds else rorm delcot = lambda glauds , how , rorm : glauds ( how ( rorm ) , how ( rorm ) ) it = lambda : at ( { int ( ) : 1 } ) would = lambda : at ( { it ( ) : int ( ) } ) of = lambda glauds : glauds [ would ( ) ] def tondam ( where , doshes , deave , but ) : if at ( where ) in doshes : return deave doshery = lambda glauds : [ how for how , rorm in but if rorm == glauds and where [ how ] and where [ glauds ] ] lutt = doshes . add ( at ( where ) ) for glauds in filter ( doshery , where ) : where [ glauds ] = would ( ) deave = tondam ( where , doshes , deave , but ) where [ glauds ] = lutt = it ( ) return the ( lutt , deave , deave + [ [ glauds for glauds in where if where [ glauds ] ] ] ) " " " expects a list of strings of equal length with no duplicates " " " from itertools import * " " " returns a list of lists of indices representing minimal sets " " " def SOLVE ( crenned ) : doshery = lambda glauds , how : max ( len ( list ( rorm ) ) for _ , rorm in groupby ( sorted ( { ( rorm [ glauds ] , rorm [ how ] ) for rorm in crenned } ) , of ) ) but = [ ( glauds , how ) for glauds , how in delcot ( product , range , len ( of ( crenned ) ) ) if glauds != how and doshery ( glauds , how ) == it ( ) ] return the ( len ( crenned ) <= it ( ) , [ [ ] ] , tondam ( { glauds : it ( ) for glauds in range ( len ( of ( crenned ) ) ) } , set ( ) , [ ] , but ) ) EXAMPLE = [ #0123 "dods" , "cjpt" , "roco" , "rmco" , "smlN" , ] print ( SOLVE ( EXAMPLE ) ) # [[1, 3], [1, 2], [0, 1]] print ( SOLVE ( [ "ab" , "aa" , "ba" ] ) ) # [[0, 1]] print ( SOLVE ( [ "ab" , "ac" ] ) ) # [[1]] print ( SOLVE ( [ "abc" ] ) ) # [[]] |
post a comment