code "def zero(items, left, right): if items[0] == 'E': return left if items[0] == 'HAXE': return right def four(items, left, middle, right): if items[4] == 1999: return left if items[4] == 2017: return middle if items[4] == 1989: return right def three(items, left, right): if items[3] == 1989: return left if items[3] == 1973: return right def two(items, left, right): if items[2] == 'MQL5': return left if items[2] == 'JFLEX': return right def one(items, left, middle, right): if items[1] == 1986: return left if items[1] == 2007: return middle if items[1] == 2002: return right def main(items): return one(items, three(items, four(items, 0, 1, zero(items, 2, 3)), four(items, 4, 5, zero(items, 6, 7))), three(items, two(items, zero(items, 8, 9), 10), 11), 12)" "tree = [-1, 0, {'TLA': [9], 'TXL': [-1, 2, {'ADA': [8], 'MUF': [7]}], 'JSON': [-1, 1, {1989: [6], 1962: [-1, 4, {'IDRIS': [5], 'GOLO': [-1, 3, {'EBNF': [4], 'LEX': [3]}]}], 1959: [-1, 3, {'EBNF': [-1, 2, {'ADA': [2], 'MUF': [1]}], 'LEX': [0]}]}]}] def main(x): cur = tree while True: cur = cur[2][x[cur[1]]] if cur[0] > -1: return cur[0]" "def main(x): match x[3]: case 'VUE': match x[1]: case 'OPA': match x[0]: case 1988: return 0 case 1997: return 1 case 'VUE': return 2 case 'STATA': return 3 case 'COQ': match x[1]: case 'OPA': return 4 case 'VUE': return 5 case 'STATA': match x[2]: case 1982: return 6 case 1961: return 7 case 2016: return 8 case 'ANTLR': match x[1]: case 'OPA': return 9 case 'VUE': return 10 case 'STATA': return 11" "def main(x): if x[3] == 'DIFF': return func1(x) elif x[3] == 'CHUCK': return func2(x) elif x[3] == 'HTTP': return func3(x) def func1(x): if x[4] == 'BOO': if x[1] == 'SHEN': return 0 else: return 1 elif x[4] == 'COOL': return 2 elif x[4] == 'GENIE': return 3 def func2(x): if x[4] == 'BOO': return 4 elif x[4] == 'COOL': if x[1] == 'SHEN': if x[2] == 'OPAL': return 5 else: return 6 elif x[1] == 'YACC': return 7 elif x[4] == 'GENIE': return 8 def func3(x): if x[2] == 'OPAL': return 9 else: return 10" "def main(x): x1b = {2000: 1, 1965: 2, 2003: 3} x2 = {2013: 0, 1969: x1b[x[1]], 1994: 4} x3 = {'ROUGE': 6, 'MINID': 7, 'NU': 8} x1a = {2000: 5, 1965: x3[x[3]], 2003: 9} x0 = {'J': x2[x[2]], 'E': x1a[x[1]], 'LLVM': 10} x4 = {1961: x0[x[0]], 1984: 11, 1989: 12} return x4[x[4]]" "def three(items, left, middle, right): if items[3] == 'VCL': return left if items[3] == 'XPROC': return middle if items[3] == 'VUE': return right def one(items, left, right): if items[1] == 'ZIMPL': return left if items[1] == 'ECL': return right def zero(items, left, middle, right): if items[0] == 'DM': return left if items[0] == 'SCALA': return middle if items[0] == 'JAVA': return right def two(items, left, right): if items[2] == 1974: return left if items[2] == 1971: return right def main(items): return zero(items, two(items, one(items, 0, 1), three(items, 2, 3, 4)), 5, one(items, 6, three(items, 7, 8, 9)))" "def main(x): if x[3] == 1983: return 9 if x[2] == 1983: return 4 elif x[2] == 1971: if x[1] == 'STAN': return 0 else: if x[4] == 2003: return 1 elif x[4] == 2002: return 2 return 3 elif x[1] == 'SHELL': return 8 else: if x[4] == 2003: return 5 elif x[4] == 2002: return 6 return 7" "def main(items): return first(items) def first(x): if x[0] == 'ELM': return two(x) if x[0] == 'JULIA': return 8 if x[0] == 'SAS': return 9 def two(x): if x[1] == 1980: return three(x) if x[1] == 2007: return 7 def three(x): if x[2] == 1972: return 0 if x[2] == 2000: return four(x) if x[2] == 2013: return five(x) def four(x): if x[3] == 'CMAKE': return 1 if x[3] == 'MAX': return 2 if x[3] == 'BLADE': return 3 def five(x): if x[3] == 'CMAKE': return 4 if x[3] == 'MAX': return 5 if x[3] == 'BLADE': return 6" "import math def fore(items, left, right): if items[4] == 1981: return left if items[4] == 1964: return right def three(items, left, right): if items[3] == 'ORG': return left if items[3] == 'OPA': return right def tho(items, left, right): if items[2] == 2008: return left if items[2] == 1970: return right def one(items, left, right): if items[1] == 1987: return left if items[1] == 2006: return right def zero(items, left, right): if items[0] == 1961: return left if items[0] == 1986: return right def main(items): return fore(items, one(items, zero(items, 0, tho(items, 1, 2)), tho(items, three(items, 3, 4), zero(items, 5, 6))), one(items, 7, zero(items, 8, three(items, 9, 10))))" "def main(x): if x[2] == 'RUST': if x[0] == 'SLIM': return 2 else: return 0 if x[1] == 'NINJA' else 1 elif x[2] == 'LESS': if x[3] == 1990: return 3 if x[1] == 'NINJA' else 4 else: return 5 if x[0] == 'PIKE' else 6 elif x[3] == 1990: return 7 if x[0] == 'PIKE' else 8 else: return 9" "def main(x): return tree(x, 0) def tree(x, step): global tree_point tree_data = [[[4, 'JSON5', 'step', 1], [4, 'P4', 'step', 2], [4, 'D', 'answer', 13]], [[2, 2002, 'step', 3], [2, 1987, 'step', 4]], [[1, 'KIT', 'step', 5], [1, 'GRACE', 'answer', 11], [1, 'PAWN', 'answer', 12]], [[3, 1968, 'answer', 0], [3, 2012, 'answer', 1], [3, 2006, 'step', 6]], [[1, 'KIT', 'answer', 5], [1, 'GRACE', 'answer', 6], [1, 'PAWN', 'step', 7]], [[2, 2002, 'answer', 9], [2, 1987, 'answer', 10]], [[1, 'KIT', 'answer', 2], [1, 'GRACE', 'answer', 3], [1, 'PAWN', 'answer', 4]], [[0, 1975, 'answer', 7], [0, 1961, 'answer', 8]]] for step_data in tree_data[step]: if x[step_data[0]] == step_data[1]: tree_point = step_data if tree_point[2] == 'answer': return tree_point[3] return tree(x, tree_point[3])" "def main(list_): if list_[2] == 2007: if list_[0] == 1971: if list_[3] == 'KRL': return 0 elif list_[3] == 'VUE': if list_[1] == 'SVG': return 1 else: return 2 else: return 3 elif list_[3] == 'KRL': if list_[1] == 'SVG': return 4 else: return 5 elif list_[3] == 'VUE': return 6 else: return 7 elif list_[0] == 1971: return 8 else: return 9" "def main(x): match (x[0], x[2]): case [1985, 'LFE']: match x[1]: case 'HAXE': return 0 case 'LFE': return 1 case 'LASSO': return 2 case [1985, 'WISP']: match x[1]: case 'HAXE': return 3 case 'LFE': return 4 case 'LASSO': return 5 case [1976, 'LFE']: match x[3]: case 1987: return 6 case 1996: return 7 case [1976, 'WISP']: match x[3]: case 1987: return 8 case 1996: return 9" "def main(x): if x[3] == 'SQL': if x[1] == 'TLA': return func1(x) elif x[1] == 'QML': return 3 elif x[1] == 'J': return func2(x) elif x[3] == 'LESS': return func3(x) def func1(x): if x[2] == 1999: return 0 elif x[2] == 1961: if x[0] == 'XML': return 1 elif x[0] == 'CLIPS': return 2 def func2(x): if x[4] == 'UNO': if x[0] == 'XML': return 4 elif x[0] == 'CLIPS': return 5 elif x[2] == 1999: return 6 elif x[2] == 1961: return 7 def func3(x): if x[1] == 'TLA': return 8 elif x[1] == 'QML': return 9 elif x[1] == 'J': return 10" "dict = {""[1966, 'SQLPL', 1977, 2000]"": 9, ""[2019, 'MQL4', 1977, 2000]"": 3, ""[2019, 'MQL4', 1964, 2000]"": 5, ""[1980, 'SQLPL', 1964, 1960]"": 7, ""[1980, 'MQL4', 2004, 1960]"": 0, ""[2019, 'MQL4', 2004, 2000]"": 1, ""[1966, 'MQL4', 2004, 1960]"": 2, ""[1966, 'MQL4', 1964, 2000]"": 6, ""[2019, 'SQLPL', 2004, 1960]"": 8, ""[1980, 'MQL4', 1964, 1960]"": 4} def main(arr): if str(arr) in dict: return dict[str(arr)] else: return str(arr)" "def main(lst): if lst[1] == 'RED': if lst[2] == 1980: if lst[0] == 1969: return 5 return 6 elif lst[2] == 1988: if lst[0] == 1969: return 7 return 8 return 4 elif lst[1] == 'PAWN': if lst[0] == 1969: if lst[2] == 1983: return 0 elif lst[2] == 1980: return 1 return 2 return 3 return 9" "def main(x): x0 = {'JFLEX': 1, 'SHEN': 2, 'PONY': 3} x0_1 = {'JFLEX': 4, 'SHEN': 5, 'PONY': 6} x3 = {'NIX': 9, 'ALLOY': 10} x3_1 = {'NIX': 0, 'ALLOY': x0[x[0]]} x4 = {'FANCY': 8, 'BISON': x3[x[3]]} x0_2 = {'JFLEX': x4[x[4]], 'SHEN': 11, 'PONY': 12} x2 = {'TCSH': x3_1[x[3]], 'TEX': x0_1[x[0]], 'ATS': 7} x1 = {'XML': x2[x[2]], 'URWEB': x0_2[x[0]]} return x1[x[1]]" "def main(x): match x[3]: case 'QML': return 12 case 'COQ': match x[0]: case 'HYPHY': return 11 case 'CHUCK': return 10 case 'LEAN': match x[1]: case 2001: return 7 case 2020: return 8 case 1973: return 9 case 'VALA': match x[1]: case 1973: return 6 case 2020: match x[2]: case 'GO': return 3 case 'LEAN': return 4 case 'RAML': return 5 case 2001: match x[2]: case 'GO': return 0 case 'LEAN': return 1 case 'RAML': return 2" "def main(items): if items[0] == 'DYLAN' or items[0] == 'RAML': return two(items) if items[0] == 'MUF': return 10 def two(items): if items[2] == 'LEX': return one(items) if items[2] == 'NGINX': return three_one(items) if items[2] == 'NCL': return three_one(items) def three_one(items): if items[0] == 'DYLAN' and items[2] == 'NGINX': return 2 if items[3] == 'R': return r(items) if items[3] == 'KRL': return krl(items) def r(items): if items[0] == 'DYLAN': return 3 if items[2] == 'NGINX': return 6 if items[2] == 'NCL': return 8 def krl(items): if items[0] == 'DYLAN': return 4 if items[2] == 'NGINX': return 7 if items[2] == 'NCL': return 9 def one(items): if items[0] == 'RAML': return 5 elif items[1] == 1972: return 0 elif items[1] == 1970: return 1" "x2Map = {2019: 12, 2012: 13, 1984: False} x13Map = {'STATA': 3, 'ECL': 4, 'OZ': {1969: 0, 1979: 2, 2003: 1}} x10Map = {'ECL': 11, 'STATA': {1992: 8, 2000: 9, 1985: 10}, 'OZ': {1992: 5, 2000: 6, 1985: 7}} def getX4(x4, x3, x0, x1): [map, nextX] = [x13Map, x3] if x4 == 1986 else [x10Map, x0] try: return map[x1][nextX] except Exception: return map[x1] def main(x): return x2Map[x[2]] or getX4(x[4], x[3], x[0], x[1])" "add_block = {1980: 0, 1996: 1, 1984: 2} def main(x): if x[2] == 'MUPAD': if x[3] == 1964: return add_block.get(x[1]) elif x[3] == 1990: if x[1] == 1980: return 3 elif x[1] == 1996: return 4 return 5 return 6 elif x[2] == 'ALLOY': if x[1] == 1980: return 8 elif x[1] == 1996: return 9 return 10 return 7" "def main(x: list) -> int: value1 = (x[1] == 'GDB') + 2 * (x[1] == 'M4') value3 = x[3] == 'NIM' if x[0] == 'OOC': return 6 elif x[0] == 'EJS': return 7 + value1 elif x[0] != 'LESS': return if x[4] == 'MTML': return value3 + 4 if x[3] == 'NIM': return 3 else: return value1" "class Tree: def __init__(self, root): self.root = root self.childs = [] def get_data(self): for child in self.childs: if child.condition == self.root: if len(child.childs) == 0: return child.data return child.get_childs() class Node: def __init__(self, data, condition): self.data = data self.condition = condition self.childs = [] def get_childs(self): for child in self.childs: if child.condition == self.data: if len(child.childs) == 0: return child.data result = child.get_childs() if result is not None: return result def main(list_of_data): function = Tree(list_of_data[4]) function.childs.append(Node(list_of_data[1], 2015)) function.childs.append(Node(11, 2012)) function.childs[0].childs.append(Node(list_of_data[3], 1998)) function.childs[0].childs.append(Node(5, 1966)) function.childs[0].childs.append(Node(list_of_data[3], 1999)) function.childs[0].childs[0].childs.append(Node(list_of_data[2], 'SQF')) function.childs[0].childs[0].childs.append(Node(list_of_data[2], 'XC')) function.childs[0].childs[0].childs.append(Node(4, 'EC')) function.childs[0].childs[2].childs.append(Node(6, 'SQF')) function.childs[0].childs[2].childs.append(Node(list_of_data[2], 'XC')) function.childs[0].childs[2].childs.append(Node(list_of_data[2], 'EC')) function.childs[0].childs[0].childs[0].childs.append(Node(0, 'XOJO')) function.childs[0].childs[0].childs[0].childs.append(Node(1, 'SQL')) function.childs[0].childs[0].childs[1].childs.append(Node(2, 'XOJO')) function.childs[0].childs[0].childs[1].childs.append(Node(3, 'SQL')) function.childs[0].childs[2].childs[1].childs.append(Node(7, 'XOJO')) function.childs[0].childs[2].childs[1].childs.append(Node(8, 'SQL')) function.childs[0].childs[2].childs[2].childs.append(Node(9, 'XOJO')) function.childs[0].childs[2].childs[2].childs.append(Node(10, 'SQL')) return function.get_data()" "class Tree: def __init__(self, root): self.root = root self.childs = [] def get_data(self): for child in self.childs: if child.condition == self.root: if len(child.childs) == 0: return child.data return child.get_childs() class Node: def __init__(self, data, condition): self.data = data self.condition = condition self.childs = [] def get_childs(self): for child in self.childs: if child.condition == self.data: if len(child.childs) == 0: return child.data result = child.get_childs() if result is not None: return result def main(list_of_data): function = Tree(list_of_data[0]) function.childs.append(Node(list_of_data[3], 1989)) function.childs.append(Node(11, 1962)) function.childs.append(Node(12, 1974)) function.childs[0].childs.append(Node(list_of_data[4], 'EQ')) function.childs[0].childs.append(Node(6, 'OX')) function.childs[0].childs.append(Node(list_of_data[1], 'DIFF')) function.childs[0].childs[0].childs.append(Node(0, 'DART')) function.childs[0].childs[0].childs.append(Node(list_of_data[1], 'TEXT')) function.childs[0].childs[0].childs.append(Node(list_of_data[2], 'HTTP')) function.childs[0].childs[2].childs.append(Node(list_of_data[4], 1979)) function.childs[0].childs[2].childs.append(Node(10, 1963)) function.childs[0].childs[0].childs[1].childs.append(Node(1, 1979)) function.childs[0].childs[0].childs[1].childs.append(Node(2, 1963)) function.childs[0].childs[0].childs[2].childs.append(Node(3, 'HTML')) function.childs[0].childs[0].childs[2].childs.append(Node(4, 'LASSO')) function.childs[0].childs[0].childs[2].childs.append(Node(5, 'R')) function.childs[0].childs[2].childs[0].childs.append(Node(7, 'DART')) function.childs[0].childs[2].childs[0].childs.append(Node(8, 'TEXT')) function.childs[0].childs[2].childs[0].childs.append(Node(9, 'HTTP')) return function.get_data()" "def main(x): if x[2] == 'AMPL': if x[4] == 1996: if x[0] == 'C++': return 0 elif x[0] == 'NUMPY': return {1996: 1, 1964: 2, 1982: 3}[x[1]] elif x[4] == 1997: return {'SQL': 4, 'MQL4': 5}[x[3]] elif x[4] == 2009: if x[3] == 'SQL': return {1996: 6, 1964: 7, 1982: 8}[x[1]] elif x[3] == 'MQL4': return {1996: 9, 1964: 10, 1982: 11}[x[1]] return {'SMT': 13, 'SMT': 12}[x[2]]" "def main(x): match x[3]: case 1989: match x[2]: case 'LUA': match x[0]: case 'CSS': return 0 case 'YACC': return 1 case 'KRL': return 2 case 'TEXT': match x[1]: case 1974: return 3 case 1992: return 4 case 2006: return 5 case 2008: match x[2]: case 'LUA': return 6 case 'TEXT': match x[0]: case 'CSS': return 7 case 'YACC': return 8 case 'KRL': return 9 case 2015: return 10" "import math def main(x): if x[3] == 'ELM': return 9 elif x[2] == 1985: if x[1] == 'X10': return 8 if x[1] == 'AWK': return 7 else: return 6 elif x[2] == 2002: if x[0] == 'IDL': return 5 if x[0] == 'X10': return 4 else: return 3 else: if x[0] == 'IDL': return 2 if x[0] == 'X10': return 1 else: return 0" "import math def main(x): if x[3] == 'ELM': return 9 elif x[2] == 1985: if x[1] == 'X10': return 8 if x[1] == 'AWK': return 7 else: return 6 elif x[2] == 2002: if x[0] == 'IDL': return 5 if x[0] == 'X10': return 4 else: return 3 else: if x[0] == 'IDL': return 2 if x[0] == 'X10': return 1 else: return 0" "import re x = [{2014: 8, 1990: 9, 1965: 'x[2]'}, {1986: 0, 2015: 1, 1960: 2}, {'GAMS': 'x[1]', 'VHDL': 'x[3]', 'LSL': 'x[4]'}, {1997: 3, 1984: 4}, {1986: 5, 2015: 6, 1960: 7}] def main(dataset, tree=x[0]): for i in range(len(dataset)): if dataset[i] in tree: if re.match('x\\[\\d\\]', str(tree[dataset[i]])) is None: return tree[dataset[i]] else: return main(dataset=dataset, tree=x[int(re.match('x\\[\\d\\]', str(tree[dataset[i]]))[0][2:3])])" "import re def main(x): test = ['1969 1991 \\d{4} 1967', '2011 1991 \\d{4} 1967', '1978 1991 \\d{4} 1967', '\\d{4} 1957 1988 1967', '\\d{4} 1957 2008 1967', '1969 \\d{4} 1988 2015', '1969 \\d{4} 2008 2015', '2011 \\d{4} \\d{4} 2015', '1978 \\d{4} \\d{4} 2015', '\\d{4} \\d{4} \\d{4} 1982'] for i in range(10): if re.fullmatch(test[i], ' '.join(map(str, x))): return i" "def main(x: list) -> int: if x[3] == 'MAKO': if x[0] == 1981: return 2 return 0 if x[4] == 2001 else 1 if x[2] == 1969: return 8 if x[0] == 1991 else 9 if x[1] == 'SAGE': return 3 if x[4] == 2001 else 4 if x[1] == 'ELM': return 5 return 6 if x[0] == 1991 else 7" "def main(x): if x[3] == 'LFE': return 14 if x[0] == 1958: return 13 if x[0] == 2019: if x[4] == 'LASSO': return 12 if x[1] == 1995: return 11 if x[1] == 2009: return 10 return 9 d = {1995: 6, 2009: 3, 1965: 0} d2 = {'OPA': 0, 'ASP': 1, 'KRL': 2} return d[x[1]] + d2[x[2]]" "def X4(m): if m == 'NL': return 7 elif m == 'NCL': return 8 elif m == 'HAML': return 9 def lol(a, b): if a == 'VOLT' and b == 1970: return 0 elif a == 'VOLT' and b == 1998: return 1 elif a == 'YAML': return 2 elif a == 'GAP': return 3 def kek(a, b, c): if a == 'VOLT': return 4 elif a == 'YAML' and b == 1970: return 5 elif b == 1998 and a == 'YAML': return 6 elif a == 'GAP': return X4(c) def main(x): if x[2] == 'D': if x[3] == 'REBOL': return lol(x[1], x[0]) elif x[3] == 'EQ': return kek(x[1], x[0], x[4]) elif x[2] == 'EQ': return 10" "def main(x): if x[4] == 2004: if x[0] == 'PUG': if x[2] == 'INI': return 0 elif x[2] == 'PERL6': return 1 if x[1] == 'XML': return 2 return 3 return 4 if x[2] == 'INI': return 5 elif x[2] == 'PERL6': return 6 if x[3] == 'LIMBO': if x[1] == 'XML': return 7 return 8 return 9" "def choicex2(cond, x): if cond == 2015: return x elif cond == 2019: return x + 1 return x + 2 def choicex3(cond, x): if cond == 'XSLT': return x return x + 1 def main(x): if x[0] == 'ORG': if x[1] == 1967: if x[4] == 'CHUCK': return choicex2(x[2], 0) elif x[4] == 'CUDA': return 3 return choicex3(x[3], 4) elif x[1] == 1996: if x[4] == 'CHUCK': return choicex3(x[3], 6) elif x[4] == 'CUDA': return choicex2(x[2], 8) return 11 return 12" "b = ({2004: 4}, {1981: 0}, {1981: 1}, 0) c = ({2004: 4}, {1981: 0}, {1962: 1}, {1979: 2}, 1) d = ({2004: 4}, {1981: 0}, {1962: 1}, {1972: 2}, 2) e = ({2004: 4}, {1981: 0}, {1991: 1}, {'REBOL': 3}, 3) f = ({2004: 4}, {1981: 0}, {1991: 1}, {'NCL': 3}, 4) g = ({2004: 4}, {1981: 0}, {1991: 1}, {'C++': 3}, 5) h = ({2004: 4}, {1973: 0}, {1981: 1}, 6) i = ({2004: 4}, {1973: 0}, {1962: 1}, 7) j = ({2004: 4}, {1973: 0}, {1991: 1}, 8) k = ({1971: 4}, {'REBOL': 3}, {1981: 1}, {1981: 0}, 9) z = ({1971: 4}, {'REBOL': 3}, {1981: 1}, {1973: 0}, 10) m = ({1971: 4}, {'REBOL': 3}, {1962: 1}, 11) o = ({1971: 4}, {'REBOL': 3}, {1991: 1}, 12) p = ({1971: 4}, {'NCL': 3}, 13) q = ({1971: 4}, {'C++': 3}, 14) a = [b, c, d, e, f, g, h, i, j, k, z, m, o, p, q] def main(func): for ii in a: ans = 0 for jj in range(len(ii) - 1): (key, val) = ii[jj].popitem() if key == func[val]: ans += 1 if ans == len(ii) - 1: return ii[-1]" "FREGE = 'FREGE' VCL = 'VCL' HTTP = 'HTTP' JAVA = 'JAVA' LEAN = 'LEAN' HY = 'HY' CHUCK = 'CHUCK' ROUGE = 'ROUGE' SHELL = 'SHELL' TOML = 'TOML' MIRAH = 'MIRAH' ZERO = 'zero' FIRST = 'first' SECOND = 'second' THIRD = 'third' FOURTH = 'fourth' first = {FREGE: THIRD, VCL: 9, HTTP: 10} second = {JAVA: FIRST, LEAN: SECOND} third = {HY: ZERO, CHUCK: 3, ROUGE: ZERO, SHELL: FIRST} fourth = {TOML: 0, MIRAH: 1, JAVA: 2, HY: 7, CHUCK: 8} def main(data): sol = first[data[4]] if final_solution(sol): return sol sol = second[data[3]] if final_solution(sol): return sol if sol == FIRST: sol = third[data[1]] elif sol == SECOND: sol = third[data[2]] if final_solution(sol): return sol prev_sol = sol if sol == FIRST: sol = fourth[data[1]] elif sol == ZERO: sol = fourth[data[0]] if data[3] == LEAN and (not prev_sol == FIRST): return sol + 4 return sol def final_solution(solution): return isinstance(solution, int)" "def main(x): if x[2] == 1999: if x[1] == 'XS': if x[0] == 1976: return 0 return 1 if x[0] == 1976: return 2 return 3 if x[1] == 'XS': if x[3] == 'VHDL': return 4 elif x[3] == 'CIRRU': return 5 return 6 if x[3] == 'VHDL': return 7 elif x[3] == 'CIRRU': return 8 return 9" "def main(x): paths = [{'FLUX', 2018, 'D', 'IO'}, {'FLUX', 2018, 'D', 'NINJA'}, {'FLUX', 2018, 'R', 'IO'}, {'FLUX', 2018, 'R', 'NINJA'}, {'FLUX', 1985}, {'FLUX', 1960}, {'RDOC', 2018}, {'RDOC', 1985, 'RUST', 'D'}, {'RDOC', 1985, 'RUST', 'R'}, {'RDOC', 1985, 'VUE', 'IO'}, {'RDOC', 1985, 'VUE', 'NINJA'}, {'RDOC', 1985, 'ABNF'}, {'RDOC', 1960}] for (i, path) in enumerate(paths): if set(path).issubset(set(x)): return i" "def main(x): dataset = {0: [1994, 'SCALA', 1973, '', 'EQ'], 1: [1994, 'HCL', 1973, '', 'EQ'], 2: [1994, '', 1989, 'ASN.1', 'EQ'], 3: [1994, '', 1989, 'NUMPY', 'EQ'], 4: [1994, '', 1989, 'KICAD', 'EQ'], 5: [1994, '', '', '', 'REXX'], 6: [1968, '', 1973, 'ASN.1', 'EQ'], 7: [1968, '', 1973, 'ASN.1', 'REXX'], 8: [1968, '', 1973, 'NUMPY', 'EQ'], 9: [1968, '', 1973, 'NUMPY', 'REXX'], 10: [1968, '', 1973, 'KICAD', ''], 11: [1968, '', 1989, '', '']} for i in dataset: match = 0 for j in range(5): if dataset[i][j] == '' or dataset[i][j] == x[j]: match += 1 if match == 5: return i" "def main(args): dict0 = {'LFE': 0, 'COOL': 1} dict1 = {'TOML': 2, 'TCL': 3, 'NU': dict0[args[0]]} dict11 = {'NU': 7, 'TOML': 8, 'TCL': 9} dict3 = {1982: 5, 2003: 6, 1965: dict11[args[1]]} dict2 = {1984: 4, 1961: dict1[args[1]], 1970: dict3[args[3]]} return dict2[args[2]]" "def main_third_layer(x): if x[2] == 2015: return 1 elif x[2] == 1964: return 2 elif x[2] == 1989: return 3 def alt_third_layer(x): if x[3] == 'LATTE': return 4 elif x[3] == 'RHTML': return 5 elif x[3] == 'JULIA': return 6 def main_second_layer(x): if x[1] == 'NCL': return 0 elif x[1] == 'EBNF': return main_third_layer(x) elif x[1] == 'NESC': return alt_third_layer(x) def alt_second_layer(x): if x[3] == 'LATTE': return 8 elif x[3] == 'RHTML': return 9 elif x[3] == 'JULIA': return 10 def first_layer(x): if x[4] == 2020: return main_second_layer(x) elif x[4] == 2003: return 7 elif x[4] == 2006: return alt_second_layer(x) def main(x): if x[0] == 'EC': return first_layer(x) elif x[0] == 'SHEN': return 11 elif x[0] == 'NESC': return 12 main(['SHEN', 'NESC', 1964, 'RHTML', 2006])" "def main(x): if x[2] == 'DYLAN': return lvl1(x) elif x[2] == 'CLEAN': return lvl2(x) else: return 13 def lvl1(x): if x[1] == 2001: return lvl11(x) elif x[1] == 2004: return lvl12(x) def lvl11(x): if x[3] == 1999: return 0 elif x[3] == 1962: return lvl112(x) elif x[3] == 1978: return 4 def lvl112(x): if x[0] == 1957: return 1 elif x[0] == 1968: return 2 elif x[0] == 1991: return 3 def lvl12(x): if x[0] == 1957: return 5 if x[0] == 1968: return 6 if x[0] == 1991: return 7 def lvl2(x): if x[4] == 1993: return 8 elif x[4] == 1977: return lvl22(x) elif x[4] == 2014: return 12 def lvl22(x): if x[3] == 1999: return 9 elif x[3] == 1962: return 10 elif x[3] == 1978: return 11" "def main(x): x_vals = [['TWIG', 'APEX'], ['NUMPY', 'VOLT', 'SQF'], [1974, 2010, 1995], [], [2009, 2005, 1986]] tree = (1, [(4, [(2, [(0, [0, 1]), (0, [2, 3]), 4]), (0, [(2, [5, 6, 7]), 8]), (2, [(0, [9, 10]), 11, 12])]), 13, 14]) node = tree while type(node) != int: (index, leaves) = node way = x_vals[index].index(x[index]) node = leaves[way] return node" "def main(x): res = 0 if x[0] == 'FLUX': return 6 if x[2] == 1961: res += 3 if x[3] == 'ASN.1': res += 1 if x[3] == 'BRO': res += 2 if x[0] == 'AMPL': if x[2] == 1959: if x[1] == 2014: return 7 if x[1] == 1977: return 8 else: return 9 return res" "def main(res): F = {2: {2019: {3: {'AWK': 3, 'HAXE': {0: {'CUDA': {4: {1984: 2, 1957: 1}}, 'JFLEX': 0}}, 'SQLPL': {4: {1984: {1: {'CUDA': 7, 'ASP': 6, 'XTEND': 5}}, 1957: 4}}}}, 2011: {1: {'ASP': 11, 'CUDA': 12, 'XTEND': {4: {1957: 8, 1984: {0: {'CUDA': 10, 'JFLEX': 9}}}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(res): F = {1: {'LESS': 11, 'NU': 10, 'DYLAN': {2: {1987: 9, 1979: {0: {'COQ': {3: {'HAXE': 0, 'TEA': 1, 'IDL': 2}}, 'VUE': {3: {'IDL': 5, 'TEA': 4, 'HAXE': 3}}, 'XTEND': {3: {'HAXE': 6, 'TEA': 7, 'IDL': 8}}}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(res): F = {1: {2008: 10, 2012: {0: {'OX': {4: {1972: {2: {'KRL': 7, 'NIT': 8, 'J': 9}}, 1967: {3: {2018: 6, 1976: 5}}}}, 'HLSL': 4, 'OPAL': {3: {1976: {4: {1972: 1, 1967: 0}}, 2018: {4: {1967: 2, 1972: 3}}}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "from typing import Union class OutEdge: pass class TreeNode: def __init__(self, value: Union[int, str], edges: list[OutEdge]=[]): self.value = value self.edges = edges def count_value(self): if len(self.edges) == 0: return self.value next = [e.target for e in self.edges if e.id == self.value][0] return next.count_value() class OutEdge: def __init__(self, target: TreeNode, id: Union[int, str]): self.target = target self.id = id def main(x: list[Union[str, int]]) -> int: leaves = [TreeNode(i) for i in range(10)] node_x2_first = TreeNode(x[2], [OutEdge(leaves[2], 2015), OutEdge(leaves[3], 1965)]) node_x0_first = TreeNode(x[0], [OutEdge(leaves[0], 'XPROC'), OutEdge(leaves[1], 'JAVA'), OutEdge(node_x2_first, 'ARC')]) node_x2_second = TreeNode(x[2], [OutEdge(leaves[5], 2015), OutEdge(leaves[6], 1965)]) node_x0_second = TreeNode(x[0], [OutEdge(leaves[7], 'JAVA'), OutEdge(leaves[8], 'ARC'), OutEdge(node_x2_second, 'XPROC')]) node_x4 = TreeNode(x[4], [OutEdge(node_x0_first, 2014), OutEdge(leaves[4], 1986), OutEdge(node_x0_second, 1967)]) node_x1 = TreeNode(x[1], [OutEdge(node_x4, 1983), OutEdge(leaves[9], 1973)]) return node_x1.count_value()" "def main(args): dict0 = {'HAXE': 0, 'REXX': 1, 'TXL': 2} dict1 = {'AWK': 6, 'ASP': 7, 'POD': 8} dict2 = {2020: 9, 1959: 10, 1987: 11} dict12 = {2020: dict0[args[2]], 1959: 3, 1987: 4} dict22 = {'HAXE': 5, 'REXX': dict1[args[3]], 'TXL': dict2[args[1]]} dict3 = {1974: dict12[args[1]], 1960: dict22[args[2]]} return dict3[args[0]]" "def main(res): F = {2: {'LLVM': {1: {2019: 11, 1977: 10, 1996: {3: {1986: 7, 1980: 8, 1985: 9}}}}, 'STATA': {0: {'OPA': 6, 'ASP': {3: {1986: 3, 1980: 4, 1985: 5}}, 'PAWN': {1: {1996: 0, 1977: 1, 2019: 2}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(res): F = {3: {2019: 9, 2015: {1: {2016: 8, 1986: 7, 2006: {0: {2019: 6, 1991: 5, 1975: 4}}}}, 1990: {2: {2008: 3, 1958: {0: {1975: 0, 1991: 1, 2019: 2}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(a): d1 = {1973: 0, 2000: 1} d2 = {1985: 2, 1970: 3} d3 = {1960: d1[a[3]], 1964: d2[a[1]], 1980: 4} d4 = {1960: 5, 1964: 6, 1980: 7} d5 = {1973: 8, 2000: 9} d6 = {1985: d4[a[0]], 1970: d5[a[3]]} d7 = {2004: d3[a[0]], 2013: d6[a[1]], 1990: 10} return d7[a[2]]" "def ch0(arr, lvl): if arr[0] == 'LOGOS': fl = True return 6 if lvl == 3 else ch3(arr, lvl + 1, fl) elif arr[0] == 'XSLT': fl = False return 7 if lvl == 3 else ch3(arr, lvl + 1, fl) elif arr[0] == 'MUPAD': return 8 if lvl == 3 else 4 else: return -1 def ch1(arr): if arr[1] == 'HYPHY': return 9 elif arr[1] == 'AWK': return 10 elif arr[1] == 'HACK': return 11 else: return -1 def ch2(arr): if arr[2] == 'MINID': return 5 elif arr[2] == 'RUST': return ch0(arr, 2) elif arr[2] == 'OOC': return ch3(arr, 2, True) else: return -1 def ch3(arr, lvl, fl): if arr[3] == 'JSON': return (0 if fl else 2) if lvl == 3 else ch0(arr, lvl + 1) elif arr[3] == 'KIT': return (1 if fl else 3) if lvl == 3 else ch1(arr) else: return -1 def main(arr): return ch2(arr)" "def main(x): if x[1] == 'PONY': if x[0] == 'PERL': if x[2] == 1968: return 0 else: return 1 elif x[0] == 'SQLPL': return 2 elif x[3] == 1969: return 3 else: return 4 elif x[1] == 'JULIA': return 5 elif x[2] == 1990: return 9 elif x[0] == 'PERL': return 6 elif x[0] == 'SQLPL': return 7 else: return 8" "def main(x): match x[0]: case 1989: match x[3]: case 'NINJA': match x[2]: case 1991: return 4 case 1966: return 3 case 1975: match x[1]: case 'APL': return 0 case 'FANCY': return 1 case 'KIT': return 2 case 'LEX': match x[4]: case 'GDB': return 8 case 'TCSH': return 9 case 'FISH': match x[1]: case 'APL': return 5 case 'FANCY': return 6 case 'KIT': return 7 case 2008: return 10" "def main(x): ans = [[x[0], 'TEA', 2015, 2010, x[4]], [1995, 'TEA', 1968, 2010, x[4]], [2008, 'TEA', 1968, 2010, x[4]], [1993, 'TEA', 1968, 2010, x[4]], [x[0], 'TEA', 2017, 2010, 1987], [x[0], 'TEA', 2017, 2010, 1969], [x[0], 'TEA', 2017, 2010, 1988], [x[0], 'SMALI', x[2], 2010, x[4]], [x[0], x[1], x[2], 1976, x[4]], [x[0], x[1], x[2], 1961, 1987], [x[0], x[1], x[2], 1961, 1969], [x[0], x[1], x[2], 1961, 1988]] return ans.index(x)" "def main(x): if x[2] == 1982: if x[0] == 'CMAKE': if x[1] == 'CIRRU': match x[4]: case 'ECL': return 0 case 'GOSU': return 1 return 2 if x[3] == 1982: return 3 return 4 if x[0] == 'LESS': if x[1] == 'CIRRU': if x[3] == 1982: return 6 return 7 if x[3] == 1982: return 8 return 9 return 5 return 10" "def zero(arr, word): if word == 'SMALI': if arr[0] == 'XPROC': return 7 elif arr[0] == 'OPAL': return 8 elif word == 'HTTP': if arr[0] == 'XPROC': return two(arr, arr[0]) elif arr[0] == 'OPAL': return 12 def one(arr, word): if arr[1] == 'ALLOY': return two(arr, arr[1]) elif arr[1] == 'SMALI' or 'HTTP': return zero(arr, arr[1]) def two(arr, word): if word == 'XPROC': if arr[2] == 1994: return 9 elif arr[2] == 1982: return 10 elif arr[2] == 2003: return 11 elif word == 'ALLOY': if arr[2] == 1994: return three(arr, arr[2]) elif arr[2] == 1982: return 3 elif arr[2] == 2003: return three(arr, arr[2]) def three(arr, word): if word == 1994: if arr[3] == 'TEXT': return 0 elif arr[3] == 'BLADE': return 1 elif arr[3] == 'PAN': return 2 elif word == 2003: if arr[3] == 'TEXT': return 4 elif arr[3] == 'BLADE': return 5 elif arr[3] == 'PAN': return 6 def main(arr): word = '' return one(arr, word)" "def main(x): dict0_l = {'AWK': 3, 'AMPL': 4, 'APL': 5} dict0_r = {'AWK': 7, 'AMPL': 8, 'APL': 9} dict2_r = {'GENIE': dict0_r[x[0]], 'SMT': 10} dict2_l = {'GENIE': 0, 'SMT': 1} dict4_r = {2011: dict2_r[x[2]], 1963: 11} dict4_lu = {2011: dict2_l[x[2]], 1963: 2} dict4_ld = {2011: dict0_l[x[0]], 1963: 6} dict3 = {2006: dict4_lu[x[4]], 2020: dict4_ld[x[4]]} dict1 = {2014: dict3[x[3]], 1969: dict4_r[x[4]]} return dict1[x[1]]" "def x4(x): if x[4] == 'LLVM': return 11 elif x[4] == 'XS': return 10 elif x[4] == 'APL': return x0(x) def x0(x): if x[0] == 1960: return 9 elif x[0] == 2005: return x2(x) elif x[0] == 1988: return x2(x) def x2(x): if x[0] == 1988: if x[2] == 'XTEND': return 0 elif x[2] == 'CSS': return x1(x) elif x[2] == 'COQ': return x3(x) elif x[0] == 2005: if x[2] == 'XTEND': return 5 elif x[2] == 'CSS': return x3(x) elif x[2] == 'COQ': return 8 def x1(x): if x[1] == 1982: return 1 elif x[1] == 1996: return 2 def x3(x): if x[2] == 'COQ': if x[3] == 'MINID': return 3 elif x[3] == 'CLIPS': return 4 elif x[2] == 'CSS': if x[3] == 'MINID': return 6 elif x[3] == 'CLIPS': return 7 def main(x): return x4(x)" "def main(x): if x[3] == 1995: return x2(x) elif x[3] == 2014: return 6 elif x[3] == 2020: return x1_1(x) def x0(x): if x[0] == 'SQL': return 0 elif x[0] == 'URWEB': return 1 elif x[0] == 'NIX': return 2 def x1_1(x): if x[1] == 1995: return 7 elif x[1] == 1957: return 8 elif x[1] == 1986: return 9 def x1_2(x): if x[1] == 1995: return 3 elif x[1] == 1957: return 4 elif x[1] == 1986: return 5 def x2(x): if x[2] == 2000: return x0(x) elif x[2] == 1975: return x1_2(x) main(['NIX', 1995, 2000, 2014])" "def main(x): if x[1] == 1970: return x2_2(x) elif x[1] == 2006: return x0_2(x) elif x[1] == 2008: return 10 def x2_2(x): if x[2] == 'GLYPH': return x3_3_1(x) elif x[2] == 'BLADE': return x0_3(x) def x3_3_1(x): if x[3] == 'CLICK': return 0 elif x[3] == 'CLEAN': return 1 elif x[3] == 'DIFF': return 2 def x0_3(x): if x[0] == 'XSLT': return 3 elif x[0] == 'STATA': return 4 def x0_2(x): if x[0] == 'XSLT': return x2_3(x) elif x[0] == 'STATA': return x3_3_2(x) def x2_3(x): if x[2] == 'GLYPH': return 5 elif x[2] == 'BLADE': return 6 def x3_3_2(x): if x[3] == 'CLICK': return 7 elif x[3] == 'CLEAN': return 8 elif x[3] == 'DIFF': return 9 main(['STATA', 1970, 'GLYPH', 'CLICK'])" "def main(x): match x[1]: case 2018: match x[3]: case 1965: match x[2]: case 2020: return 0 case 2005: return 1 case 1976: return 2 case 1985: return 3 case 1994: return 4 case 1966: match x[3]: case 1965: match x[2]: case 2020: return 5 case 2005: return 6 case 1976: return 7 case 1985: match x[2]: case 2020: return 8 case 2005: return 9 case 1976: return 10 case 1994: return 11" "def main(x): match x[3]: case 1987: match x[0]: case 'PHP': return 3 case 'SCAML': match x[2]: case 'NL': return 0 case 'REBOL': return 1 case 'YACC': return 2 case 2009: match x[1]: case 'COQ': return 9 case 'M4': match x[0]: case 'SCAML': return 7 case 'PHP': return 8 case 'SQL': match x[2]: case 'NL': return 4 case 'REBOL': return 5 case 'YACC': return 6 case 1960: return 10" "def main(x): match x[4]: case 1986: return 10 case 1974: return 9 case 1963: match x[2]: case 'PHP': return 2 case 'SCSS': match x[0]: case 1995: return 1 case 2015: return 0 case 'LOGOS': match x[0]: case 2015: match x[3]: case 'CLICK': return 3 case 'HACK': return 4 case 'SAS': return 5 case 1995: match x[3]: case 'CLICK': return 6 case 'HACK': return 7 case 'SAS': return 8" "def main(arr: list) -> int: if arr[2] == 2018: step2 = arr[0] cob = arr[1] == 'COBOL' step4 = arr[4] if step2 == 1978: if cob: step4 = arr[3] if step4 == 'IDRIS': return 4 elif step4 == 'ABAP': return 5 else: return 6 else: return 7 add_res = 0 if step2 == 1957 else 8 if cob: if step4 == 'XS': return 0 + add_res elif step4 == 'MAX': return 1 + add_res else: return 2 + add_res else: return 3 + add_res return 12" "class Tree: def __init__(self, root): self.root = root self.childs = [] def get_data(self): for child in self.childs: if child.condition == self.root: if len(child.childs) == 0: return child.data return child.get_childs() class Node: def __init__(self, data, condition): self.data = data self.condition = condition self.childs = [] def get_childs(self): for child in self.childs: if child.condition == self.data: if len(child.childs) == 0: return child.data result = child.get_childs() if result is not None: return result def main(list_of_data): function = Tree(list_of_data[4]) function.childs.append(Node(list_of_data[1], 1971)) function.childs.append(Node(12, 1958)) function.childs[0].childs.append(Node(list_of_data[2], 2005)) function.childs[0].childs.append(Node(list_of_data[0], 1967)) function.childs[0].childs[0].childs.append(Node(list_of_data[0], 1969)) function.childs[0].childs[0].childs.append(Node(list_of_data[0], 2011)) function.childs[0].childs[0].childs.append(Node(6, 2020)) function.childs[0].childs[1].childs.append(Node(7, 1981)) function.childs[0].childs[1].childs.append(Node(list_of_data[2], 1986)) function.childs[0].childs[1].childs.append(Node(11, 2008)) function.childs[0].childs[0].childs[0].childs.append(Node(0, 1981)) function.childs[0].childs[0].childs[0].childs.append(Node(1, 1986)) function.childs[0].childs[0].childs[0].childs.append(Node(2, 2008)) function.childs[0].childs[0].childs[1].childs.append(Node(3, 1981)) function.childs[0].childs[0].childs[1].childs.append(Node(4, 1986)) function.childs[0].childs[0].childs[1].childs.append(Node(5, 2008)) function.childs[0].childs[1].childs[1].childs.append(Node(8, 1969)) function.childs[0].childs[1].childs[1].childs.append(Node(9, 2011)) function.childs[0].childs[1].childs[1].childs.append(Node(10, 2020)) return function.get_data()" "def x_0(x0, x1): if x1 == 'RDOC': if x0 == 2000: return 0 elif x0 == 2005: return 1 else: return 2 elif x0 == 2000: return 6 elif x0 == 2005: return 7 else: return 8 def main(x): if x[2] == 'FLUX': if x[1] == 'RDOC': return x_0(x[0], x[1]) elif x[1] == 'LATTE': if x[3] == 'SASS': return 3 elif x[3] == 'VCL': return 4 else: return 5 else: return x_0(x[0], x[1]) return 9" "def get_x0(x): return {x == 'MESON': 0, x == 'EDN': 1}[True] def get_x1(x, value1, value2, value3): return {x == 'MQL4': value1, x == 'BOO': value2, x == 'TERRA': value3}[True] def get_x2(x, value1, value2): return {x == 'TCSH': value1, x == 'SHEN': value2}[True] def get_x3(x, value1, value2, value3): return {x == 2012: value1, x == 1988: value2, x == 2019: value3}[True] def main(x): res = get_x3(x[3], get_x1(x[1], get_x0(x[0]), get_x2(x[2], 2, 3), get_x2(x[2], 4, 5)), get_x2(x[2], 6, 7), get_x2(x[2], get_x1(x[1], 8, 9, 10), 11)) return res" "def main(x): adr = {0: 3, 1994: {0: 1, 1958: {0: 4, 'SHELL': {0: 5}, 'LEAN': {0: 0, 2004: {0: 6}, 1979: {0: 7}, 1992: {0: 8}}}, 1959: {0: 0, 2004: {0: 4, 'SHELL': {0: 9}, 'LEAN': {0: 10}}, 1979: {0: 11}, 1992: {0: 4, 'SHELL': {0: 12}, 'LEAN': {0: 13}}}}, 2012: {0: 2, 1983: {0: 1, 1958: {0: 0, 2004: {0: 14}, 1979: {0: 15}, 1992: {0: 16}}, 1959: {0: 17}}, 1962: {0: 18}}, 2000: {0: 19}} buf = adr while 1: if buf[0] > 4: return buf[0] - 5 buf = buf[x[buf[0]]]" "def main(x): adr = {0: 4, 2013: {0: 0, 1980: {0: 1, 'C': {0: 5}, 'E': {0: 2, 'CSV': {0: 6}, 'SCALA': {0: 7}, 'TCL': {0: 8}}, 'SAGE': {0: 2, 'CSV': {0: 9}, 'SCALA': {0: 10}, 'TCL': {0: 11}}}, 1974: {0: 3, 1991: {0: 1, 'C': {0: 12}, 'E': {0: 13}, 'SAGE': {0: 14}}, 1992: {0: 15}, 1962: {0: 16}}, 2008: {0: 17}}, 1969: {0: 18}, 2014: {0: 19}} buf = adr while 1: if buf[0] > 4: return buf[0] - 5 buf = buf[x[buf[0]]]" "def main(x): ans = {'ANTLR': {1969: {2007: 0, 1984: 1, 1979: 2}, 1989: 3}, 'REBOL': {1969: 4, 1989: {2007: 5, 1984: 6, 1979: 7}}, 'EC': {1969: 8, 1989: 9}} try: return ans[x[1]][x[0]][x[2]] except TypeError: return ans[x[1]][x[0]]" "def main(x): return f2(x) def f0_1(x): if x[0] == 'SLASH': return 0 elif x[0] == 'DM': return 1 elif x[0] == 'IDL': return 2 def f0_2(x): if x[0] == 'SLASH': return f3_1(x) elif x[0] == 'DM': return f3_2(x) elif x[0] == 'IDL': return 10 def f4(x): if x[4] == 1969: return 3 elif x[4] == 1961: return f0_1(x) def f1(x): if x[1] == 'HTML': return f4(x) elif x[1] == 'SQL': return f0_2(x) def f2(x): if x[2] == 2012: return 11 elif x[2] == 1969: return 12 elif x[2] == 2001: return f1(x) def f3_1(x): if x[3] == 'IDRIS': return 4 elif x[3] == 'SCALA': return 5 elif x[3] == 'MINID': return 6 def f3_2(x): if x[3] == 'IDRIS': return 7 elif x[3] == 'SCALA': return 8 elif x[3] == 'MINID': return 9" "def x1(x): if x[1] == 1986: return 9 elif x[1] == 1994: return 8 def x02(x): if x[0] == 2017: return 7 elif x[0] == 1963: return 6 elif x[0] == 1994: return 5 def x01(x): if x[0] == 1963: return 2 elif x[0] == 2017: if x[1] == 1994: return 3 elif x[1] == 1986: return 4 elif x[0] == 1994: if x[1] == 1986: return 1 elif x[1] == 1994: return 0 def x4(x): if x[4] == 2000: return x02(x) elif x[4] == 1991: return x1(x) def x3(x): if x[3] == 'APEX': return 10 elif x[3] == 'ATS': return x4(x) elif x[3] == 'STATA': return x01(x) def x2(x): if x[2] == 'EQ': return 12 elif x[2] == 'URWEB': return 11 elif x[2] == 'PIKE': return x3(x) def main(x): return x2(x)" "def main(f): return f1(f) def f01(f): if f[0] == 'CSON': return 0 elif f[0] == 'STON': return 1 elif f[0] == 'MUPAD': return 2 def f02(f): if f[0] == 'CSON': return 3 elif f[0] == 'STON': return 4 elif f[0] == 'MUPAD': return 5 def f03(f): if f[0] == 'CSON': return 6 elif f[0] == 'STON': return 7 elif f[0] == 'MUPAD': return 8 def f1(f): if f[1] == 'NUMPY': return 10 elif f[1] == 'MESON': return f2(f) def f2(f): if f[2] == 1989: return f01(f) elif f[2] == 1990: return f3(f) def f3(f): if f[3] == 1964: return f02(f) elif f[3] == 2009: return f03(f) elif f[3] == 1984: return 9" "def main(x): match x[2]: case 2019: return 7 case 1963: match x[1]: case 2019: match x[3]: case 2017: return 0 case 1968: return 1 case 1970: return 2 case 1970: match x[3]: case 2017: return 3 case 1968: return 4 case 1970: match x[0]: case 'SELF': return 5 case 'RUST': return 6 case 2015: match x[3]: case 2017: match x[0]: case 'SELF': match x[1]: case 2019: return 8 case 1970: return 9 case 'RUST': return 10 case 1968: return 11 case 1970: return 12" "def main(x): slov_1975_SLASH = {'TWIG': 0, 'EBHF': 1, 'ARC': 2} slov_1975_SAS = {'YAML': 3, 'NINJA': 4, 'QMAKE': 5} slov_1979_TWIG = {'YAML': 7, 'NINJA': 8, 'QMAKE': 9} slov_all = {'EBNF': 10, 'ARC': 11, 1968: 12} if int(x[2]) == 1975: if x[0] == 'SLASH': return slov_1975_SLASH.get(x[1]) elif x[0] == 'SAS': return slov_1975_SAS.get(x[3]) return 6 elif int(x[2]) == 1979: if x[1] == 'TWIG': return slov_1979_TWIG.get(x[3]) else: return slov_all.get(x[1]) else: return 12" "def main(x): if x[2] == 2011: if x[3] == 2013: return layer_2013(x) elif x[3] == 1983: return layer_1983(x) else: return 10 else: return 11 def layer_2013(x): if x[0] == 1968: if x[1] == 2004: return 0 else: return 1 elif x[0] == 1979: return 2 elif x[4] == 'XOJO': return 3 elif x[4] == 'NGINX': return 4 else: return 5 def layer_1983(x): if x[4] == 'XOJO': return 6 elif x[4] == 'NGINX': return 7 elif x[1] == 2004: return 8 else: return 9" "def func_23(x): if x[2] == 1961: return 1 else: return 2 def func_33(x): if x[3] == 'MUF': return 3 else: return 4 def func_43(x): if x[4] == 1961: return 0 elif x[4] == 2006: return func_23(x) else: return func_33(x) def func_21(x): if x[2] == 1961: return 8 else: return 9 def func_41(x): if x[4] == 2006: return 10 elif x[4] == 1962: return 11 else: return func_21(x) def func_32(x): if x[3] == 'MUF': return 5 else: return 6 def func_22(x): if x[2] == 2007: return 7 else: return func_32(x) def func_1(x): if x[1] == 'NSIS': return func_22(x) elif x[1] == 'TXL': return func_41(x) else: return func_43(x) def main(x): if x[0] == 'OOC': return 12 else: return func_1(x)" "def main(x): match x[0]: case 'GOLO': match x[2]: case 1969: match x[1]: case 2010: return 0 case 1975: return 1 case 1962: return 2 case 1993: match x[1]: case 2010: return 3 case 1975: return 4 case 1962: return 5 case 1967: return 6 case 'PERL': match x[1]: case 2010: return 7 case 1962: return 11 case 1975: match x[2]: case 1969: return 8 case 1993: return 9 case 1967: return 10 case 'OX': return 12" "def main(x): if x[2] == 1973: return right(x) elif x[2] == 2007: return middle(x) elif x[2] == 1971: return 12 def right(x): if x[3] == 'C': if x[1] == 'ELM': return 0 elif x[1] == 'ABAP': return 1 elif x[1] == 'TCSH': return 2 elif x[3] == 'MUPAD': if x[0] == 1982: return 3 elif x[0] == 2008: return 4 elif x[0] == 1992: return 5 def middle(x): if x[0] == 1982: if x[3] == 'C': return 6 elif x[3] == 'MUPAD': return 7 elif x[0] == 2008: return 8 elif x[0] == 1992: if x[1] == 'ELM': return 9 elif x[1] == 'ABAP': return 10 elif x[1] == 'TCSH': return 11" "s = {1979: {'ZIMPL': {1969: 0, 1980: 1, 1957: 2}, 'METAL': {1969: 3, 1980: 4, 1957: 5}, 'PLSQL': {1969: 6, 1980: 7, 1957: 8}}, 1980: {1969: {'ZIMPL': 9, 'METAL': 10, 'PLSQL': 11}, 1980: 12, 1957: 13}} def main(path): s1 = s[path[1]] if path[1] == 1979: s2 = s1[path[2]] direction = 1 elif path[1] == 1980: s2 = s1[path[0]] direction = 0 if isinstance(s2, int): return s2 if direction == 1: return s2[path[0]] else: return s2[path[2]]" "def choicex2(cond, x): if cond == 2004: return x elif cond == 1983: return x + 1 def choicex3(cond, x): if cond == 1986: return x elif cond == 1985: return x + 1 def main(x): if x[1] == 'OCAML': if x[2] == 1978: return choicex2(x[0], 0) elif x[2] == 2011: if x[4] == 'CMAKE': return choicex3(x[3], 2) return 4 return 5 elif x[1] == 'HCL': if x[2] == 1978: if x[3] == 1986: return choicex2(x[0], 6) elif x[3] == 1985: return choicex2(x[0], 8) elif x[2] == 2011: return 10 return 11 return 12" "def main(x): slov_1966_1966 = {'VCL': 0, 'CSV': 1, 'METAL': 2} slov_1971_1966 = {'VCL': 5, 'CSV': 6, 'METAL': 7} slov_1971_2011 = {'VCL': 8, 'CSV': 9, 'METAL': 10} slov_all = {1962: 11, 2010: 12} if int(x[2]) == 1966: if x[0] == 1966: return slov_1966_1966.get(x[1]) elif x[0] == 2011: return 3 return 4 elif int(x[2]) == 1971: if x[0] == 1966: return slov_1971_1966.get(x[1]) elif x[0] == 2011: return slov_1971_2011.get(x[1]) else: return 11 else: return 12" "def main(x): pathes = [{2016, 'FLUX', 'PHP', 2004}, {2016, 'FLUX', 'PHP', 1971}, {2016, 'FLUX', 'COOL'}, {2016, 'PONY'}, {1986, 2004, 'PHP'}, {1986, 2004, 'COOL'}, {1986, 1971, 'NGINX'}, {1986, 1971, 'GO', 'PHP'}, {1986, 1971, 'GO', 'COOL'}, {1986, 1971, 'RED'}, {1998}] x = set(x) for (i, path) in enumerate(pathes): if path <= x: return i" "GRAPH = [1, {1992: [0, {2006: [2, {1991: 0, 1972: 1, 2002: 2}], 2020: 3}], 1969: [3, {1964: [0, {2006: 4, 2020: 5}], 1975: [2, {1991: 6, 1972: 7, 2002: 8}], 1957: [2, {1991: 9, 1972: 10, 2002: 11}]}], 2007: 12}] def main(x: list): deeper_graph = GRAPH while type(deeper_graph) is not int: deeper_graph = deeper_graph[1][x[deeper_graph[0]]] return deeper_graph" "s = {1984: {1970: {'TLA': 0, 'JAVA': {'LIMBO': 1, 'COQ': 2}, 'GENIE': {2013: 3, 1985: 4}}, 1993: 5, 1977: 6}, 2004: {1970: {'LIMBO': {2013: 7, 1985: 8}, 'COQ': {'TLA': 9, 'JAVA': 10, 'GENIE': 11}}, 1993: 12, 1977: 13}} def main(path): s1 = s[path[0]] s1 = s1[path[1]] if path[1] == 1970 and path[0] == 1984: s1 = s1[path[2]] if path[2] == 'JAVA': s1 = s1[path[4]] elif path[2] == 'GENIE': s1 = s1[path[3]] elif path[1] == 1970 and path[0] == 2004: s1 = s1[path[4]] if path[4] == 'LIMBO': s1 = s1[path[3]] elif path[4] == 'COQ': s1 = s1[path[2]] return s1" "def choicex2(cond, x): if cond == 1996: return x elif cond == 1961: return x + 1 return x + 2 def choicex3(cond, x): if cond == 'ROFF': return x elif cond == 'KIT': return x + 1 return x + 2 def main(x): if x[1] == 'MAKO': if x[0] == 1983: if x[4] == 1957: return 0 elif x[4] == 1961: return 1 return 2 elif x[0] == 1961: if x[4] == 1957: return 3 elif x[4] == 1961: return choicex3(x[3], 4) elif x[4] == 1988: return choicex2(x[2], 7) return 10 return 11" "s = {1981: {1995: {'MUF': {1973: 0, 2009: 1}, 'INI': 2, 'STATA': {1973: 3, 2009: 4}}, 1957: {'TCL': {1973: 5, 2009: 6}, 'INI': 7, 'NIM': {1973: 8, 2009: 9}}}, 2008: 10} def main(path): s1 = s[path[0]] if path[0] == 1981: s1 = s1[path[2]] if path[2] == 1995: s1 = s1[path[3]] if path[3] == 'MUF' or path[3] == 'STATA': s1 = s1[path[1]] elif path[2] == 1957: s1 = s1[path[4]] if path[4] == 'TCL' or path[4] == 'NIM': s1 = s1[path[1]] return s1" "def x_1(x): if x == 'OPAL': return 0 if x == 'HTML': return 1 return 2 def x_2(x): if x == 'OPAL': return 4 if x == 'HTML': return 5 return 6 def main(x): if x[1] == 2015: if x[4] == 'NIT': return 3 return x_1(x[0]) if x[1] == 2009: if x[3] == 1991: return 7 return x_2(x[0]) if x[2] == 1979: return 10 if x[3] == 1999: return 8 return 9" "def x_0(x): if x == 'PIC': return 3 else: return 4 def x_1(x): if x == 'PIC': return 0 return 1 def x_2(x): if x == 1964: return 6 else: return 7 def x_3(x1, x2): if x1 == 2019: return x_1(x2) if x1 == 1969: return 2 def main(x): if x[1] == 'YANG': if x[2] == 1964: return x_3(x[4], x[3]) if x[2] == 1995: return x_0(x[3]) if x[1] == 'BLADE': if x[0] == 1980: if x[4] == 2019: return 5 return x_2(x[2]) if x[0] == 1976: return 8 if x[3] == 'PIC': return 9 else: return 10 else: return 11" "def x3(x): if x[3] == 1967: return 11 elif x[3] == 1999: return x0(x) def x0(x): if x[0] == 1962: return 10 elif x[0] == 1982: return x12(x) elif x[0] == 1973: return x1(x) def x1(x): if x[1] == 2017: if x[2] == 'HY': return 0 elif x[2] == 'VCL': return 1 elif x[2] == 'EAGLE': return 2 elif x[1] == 2020: return 3 elif x[1] == 1970: return 4 def x12(x): if x[1] == 1970: if x[4] == 'FREGE': return 7 elif x[4] == 'STAN': return 8 elif x[4] == 'SASS': return 9 elif x[1] == 2020: return 6 elif x[1] == 2017: return 5 def main(x): return x3(x)" "def main(res): F = {3: {'LFE': {0: {'PLSQL': {1: {1959: 6, 1985: 5, 2017: 4}}, 'PIKE': 3, 'PERL': {1: {1959: 2, 1985: 1, 2017: 0}}}}, 'UNO': {1: {1959: 10, 1985: 9, 2017: {2: {2014: 8, 1982: 7}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(x): a = [1, {'PIKE': [0, {1993: [3, {1987: [2, {'EQ': 0, 'RUST': 1}], 2011: 2, 2016: [4, {1981: 3, 1965: 4, 2013: 4}]}], 1980: [4, {1981: [2, {'EQ': 6, 'RUST': 7}], 1965: [3, {1987: 8, 2011: 9, 2016: 10}], 2013: 11}], 2009: 12}], 'FANCY': 13}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(data): ans = {1969: {1988: {1963: 0, 1986: {'BRO': 1, 'XSLT': 2, 'DIFF': 3}, 1962: 4}, 1979: 5, 1958: 6}, 1990: 7, 1974: {'REXX': {1988: {1963: 8, 1986: 9, 1962: 10}, 1979: 11, 1958: 12}, 'LESS': 13, 'CUDA': 14}} if data[4] == 1969: data = [data[2], data[0], data[1], data[4]] elif data[4] == 1974: data = [data[0], data[1], data[3], data[4]] i = len(data) - 1 while isinstance(ans[data[i]], dict): ans = ans[data[i]].copy() i -= 1 return ans[data[i]]" "def main(x): tree = {1975: {'LASSO': {'SCAML': {'': {'XS': 0, 'JULIA': 1}}, 'XOJO': 2}, 'KICAD': 10}, 1970: {'LASSO': {'': {1987: {'XS': 3, 'JULIA': 4}, 2000: {'XS': 5, 'JULIA': 6}}}, 'KICAD': 10}, 1965: {'LASSO': {'SCAML': 7, 'XOJO': {1987: 8, 2000: 9}}, 'KICAD': 10}} for i in x: if i in tree.keys(): tree = tree[i] else: tree = tree[list(tree.keys())[0]] if isinstance(tree, int): return tree" "from typing import List tree = {'1995': {'2001': {'2012': 0, '1999': 1}, '1983': {'2012': 2, '1999': 3}, '2012': {'D': 4, 'TOML': 5, 'STAN': 6}}, '2004': {'D': 7, 'TOML': {'2012': 8, '1999': 9}, 'STAN': 10}} def main(arr: List) -> int: global tree step = tree while isinstance(step, int) is False: for item in arr[::-1]: key = str(item) if key in step.keys(): step = step[key] if isinstance(step, int): return step return step" "def x0(x): if x[0] == 2009: return 0 elif x[0] == 1971: return 1 elif x[0] == 1961: return 2 def x1(x): if x[1] == 'SQL': return 6 elif x[1] == 'NESC': return x1x3(x) def main(x): if x[2] == 'TOML': return 10 elif x[2] == 'ATS': return 11 elif x[2] == 'SCSS': return x4(x) def x1x3(x): if x[3] == 'FREGE': return 7 elif x[3] == 'SLIM': return 8 elif x[3] == 'MUPAD': return 9 def x4x3(x): if x[3] == 'FREGE': return x0(x) elif x[3] == 'SLIM': return 3 elif x[3] == 'MUPAD': return 4 def x4(x): if x[4] == 1988: return 5 elif x[4] == 1981: return x1(x) elif x[4] == 1998: return x4x3(x)" "def main(data: tuple): match data[3]: case 1987: return layer_1(data) case 1962: return 12 case 1994: return 13 def layer_1(data: tuple): match data[0]: case 'SELF': return layer_2(data) case 'WISP': return layer_3(data) def layer_2(data: tuple): match data[2]: case 'DM': return layer_4(data) case 'NINJA': return layer_5(data) case 'JAVA': return layer_6(data) def layer_3(data: tuple): match data[1]: case 'MQL4': return layer_7(data) case 'VCL': return 11 def layer_4(data: tuple): match data[4]: case 'ROFF': return 0 case 'ASP': return 1 case 'GASM': return 2 def layer_5(data: tuple): match data[1]: case 'MQL4': return 3 case 'VCL': return 4 def layer_6(data): match data[4]: case 'ROFF': return 5 case 'ASP': return 6 case 'GASM': return 7 def layer_7(data: tuple): match data[2]: case 'DM': return 8 case 'NINJA': return 9 case 'JAVA': return 10" "decision_tree = {'2003': 11, '1996': {'ECL': {'1972': {'1996': 0, '1992': 1}, '2010': 2, '2014': 3}, 'COOL': {'1972': {'1996': 4, '1992': 5}, '2010': 6, '2014': {'E': 7, 'SHELL': 8, 'XTEND': 9}}, 'YACC': 10}} def main(input_lst): small_tree = decision_tree while True: for i in input_lst: key = str(i) if key in small_tree.keys(): small_tree = small_tree[key] if isinstance(small_tree, int): return small_tree" "def main(x): x4a = {2000: 2, 2017: 3, 1989: 4} x2a = {'GRACE': 0, 'XOJO': 1, 'JAVA': x4a[x[4]]} x3a = {1964: 8, 1989: 9} x2b = {'GRACE': 7, 'XOJO': x3a[x[3]], 'JAVA': 10} x3b = {1964: x2a[x[2]], 1989: 5} x4b = {2000: 6, 2017: x2b[x[2]], 1989: 11} x0 = {1966: x3b[x[3]], 2012: x4b[x[4]]} return x0[x[0]]" "def main(x): d1 = {'LUA': 0, 'JFLEX': 1} d2 = {'LUA': 3, 'JFLEX': 4} d3 = {'LUA': 5, 'JFLEX': 6} d4 = {1970: 9, 2000: 10} if x[0] == 'UNO': if x[1] == 'YANG': return d1[x[3]] if x[1] == 'HY': return d2[x[3]] return 2 if x[0] == 'STATA': if x[1] == 'YANG': return d3[x[3]] if x[1] == 'STON': return 7 return 8 if x[0] == 'OZ': if x[3] == 'LUA': return d4[x[2]] return 11" "def main(f): dict_x1_1 = {'ind': 1, 'MQL4': 4, 'MUPAD': 5, 'GAMS': 6} dict_x1_2 = {'ind': 1, 'MQL4': 7, 'MUPAD': 8, 'GAMS': 9} dict_x2_1 = {'ind': 2, 'XBASE': 0, 'MAKO': 1} dict_x2_2 = {'ind': 2, 'XBASE': dict_x1_1, 'MAKO': dict_x1_2} dict_x3 = {'ind': 3, 'AGDA': dict_x2_1, 'XTEND': 2, 'ZIMPL': 3} dict_x0 = {'LLVM': dict_x3, 'FISH': dict_x2_2} step = dict_x0.get(f[0]) step = step.get(f[step.get('ind')]) if type(step) == dict: step = step.get(f[step.get('ind')]) return step" "def iterate_obj(to_iter, index_, input_arr): for key in to_iter: if key == 'index': index_ = to_iter['index'] if key == input_arr[index_]: result = to_iter[key] if isinstance(result, int): return result else: return iterate_obj(result, result['index'], input_arr) def main(input_arr): obj = {'index': 1, 1996: {'index': 0, 1973: {'index': 4, 2012: 0, 1978: 1}, 1998: 2, 2007: {'index': 3, 'GDB': {'index': 4, 2012: 3, 1978: 4}, 'R': {'index': 4, 2012: 5, 1978: 6}, 'FANCY': {'index': 2, 1964: 7, 2009: 8, 1957: 9}}}, 1987: 10, 2009: 11} return iterate_obj(obj, obj['index'], input_arr)" "def x2_up_up(f): if f[2] == 'MUPAD': return 0 elif f[2] == 'EDN': return 1 def x2_up_mid(f): if f[2] == 'MUPAD': return 2 elif f[2] == 'EDN': return 3 def x2_up_down(f): if f[2] == 'MUPAD': return 4 elif f[2] == 'EDN': return 5 def x3_down_up(f): if f[3] == 'MASK': return 6 elif f[3] == 'QML': return 7 elif f[3] == 'EBNF': return 8 def x3_down_down(f): if f[3] == 'MASK': return 9 elif f[3] == 'QML': return 10 elif f[3] == 'EBNF': return 11 def x3_up(f): if f[3] == 'MASK': return x2_up_up(f) elif f[3] == 'QML': return x2_up_mid(f) elif f[3] == 'EBNF': return x2_up_down(f) def x2_down(f): if f[2] == 'MUPAD': return x3_down_up(f) elif f[2] == 'EDN': return x3_down_down(f) def main(f): if f[1] == 'XBASE': return x3_up(f) elif f[1] == 'CLICK': return x2_down(f)" "import math def four(items, left, middle, right): if items[4] == 1958: return left if items[4] == 1982: return middle if items[4] == 1967: return right def three(items, left, right): if items[3] == 2001: return left if items[3] == 1975: return right def two(items, left, middle, right): if items[2] == 1994: return left if items[2] == 1989: return middle if items[2] == 1987: return right def one(items, left, middle, right): if items[1] == 2008: return left if items[1] == 2002: return middle if items[1] == 1961: return right def zero(items, left, right): if items[0] == 'HY': return left if items[0] == 'GOLO': return right def main(items): return one(items, four(items, three(items, two(items, 0, 1, 2), two(items, 3, 4, 5)), 6, zero(items, 7, 8)), 9, 10) a = main(['HY', 2002, 1987, 1975, 1958]) b = main(['GOLO', 2008, 1989, 2001, 1982])" "def main(x): match x[4]: case 2019: match x[1]: case 1995: match x[2]: case 'NIT': return 0 case 'ECL': return 1 case 1992: return 2 case 1963: return 3 case 1999: return 4 case 1994: match x[0]: case 1983: return 5 case 2020: match x[2]: case 'NIT': match x[1]: case 1995: return 6 case 1992: return 7 case 1963: return 8 case 'ECL': match x[1]: case 1995: return 9 case 1992: return 10 case 1963: return 11" "def main(x): array = [[x[0], 1965, 2015, x[3], 'PAN'], [x[0], 1965, 2015, x[3], 'LEX'], [x[0], 1965, 1967, x[3], x[4]], [x[0], 2012, 2015, x[3], x[4]], [1992, 2012, 1967, x[3], 'PAN'], [1990, 2012, 1967, x[3], 'PAN'], [1992, 2012, 1967, x[3], 'LEX'], [1990, 2012, 1967, x[3], 'LEX'], [x[0], 2005, 2015, 2017, x[4]], [x[0], 2005, 1967, 2017, x[4]], [x[0], 2005, x[2], 1993, x[4]]] if x in array: return array.index(x)" "def main(x): dict1 = {2010: 0, 1995: 1, 2016: 2} dict2 = {2010: 3, 1995: 4, 2016: 5} dict3 = {2010: 6, 1995: 7, 2016: 8} if x[0] == 'ZIMPL': if x[3] == 'STATA': return dict1.get(x[2]) elif x[3] == 'TOML': return dict2.get(x[2]) elif x[0] == 'GAMS': if x[1] == 1963: return dict3.get(x[2]) elif x[1] == 1994: return 9 return 10 return 11" "def main(x): match x[1]: case 2013: match x[3]: case 1974: match x[2]: case 'VOLT': return 0 return 1 case 1986: match x[2]: case 'VOLT': return 2 return 3 return 4 case 1970: match x[3]: case 1986: match x[0]: case 1998: return 6 case 1988: return 7 return 8 case 2014: match x[0]: case 1998: return 9 case 1988: return 10 return 11 return 5" "def main(x): if x[0] == 2011: if x[4] == 1961: dict1 = {1985: 0, 1958: 1, 1984: 2} return dict1[x[2]] else: return 3 elif x[0] == 1980: if x[4] == 1961: dict1 = {1985: 4, 1958: 5, 1984: 6} dict2 = {'J': dict1[x[2]], 'DYLAN': 7, 'XOJO': 8} return dict2[x[1]] else: dict1 = {'J': 9, 'DYLAN': 10, 'XOJO': 11} dict2 = {1985: dict1[x[1]], 1958: 12, 1984: 13} return dict2[x[2]] elif x[0] == 1993: return 14" "def choosex0(cond, x): if cond == 1975: return x elif cond == 2012: return x + 1 def choosex2(cond, x): if cond == 'HAML': return x elif cond == 'JSON5': return x + 1 def main(x): if x[3] == 1989: if x[1] == 2020: if x[2] == 'NSIS': return choosex0(x[0], 2) else: return choosex2(x[2], 0) elif x[1] == 2008: if x[2] == 'NSIS': return choosex0(x[0], 6) else: return choosex2(x[2], 4) elif x[3] == 2000: return 8 return 9" "def main(res): obj = {1: {'SQLPL': {4: {1981: {3: {1980: {0: {'RAML': 0, 'SASS': 1, 'HLSL': 2}}, 1981: {2: {'RED': 3, 'MUF': 4}}, 1967: 5}}, 1993: {3: {1980: {0: {'RAML': 6, 'SASS': 7, 'HLSL': 8}}, 1981: 9, 1967: 10}}, 2010: 11}}, 'COOL': 12}} while isinstance(obj, dict): index = int(*obj) obj = obj[index] key = res[index] obj = obj[key] return obj" "def main(x): dict1 = {'VUE': 0, 'GN': 1, 'MAX': 2} dict2 = {'VUE': 3, 'GN': 4, 'MAX': 5} dict3 = {'VUE': 6, 'GN': 7, 'MAX': 8} if (x[1] == 2008) & (x[0] == 1990): return 9 elif (x[1] == 2008) & (x[0] == 1960): return dict3[x[2]] elif (x[1] == 1979) & (x[0] == 1990): return dict2[x[2]] elif (x[1] == 1979) & (x[0] == 1960): return dict1[x[2]] else: pass" "DECISIONS = {'index': 1, 'HACK': {'index': 0, 2012: {'index': 2, 1958: 0, 1984: 1, 'other': {'index': 3, 'SAGE': 2, 'ATS': 3, 'other': 4}}, 'other': 5}, 'REBOL': {'index': 3, 'SAGE': {'index': 0, 2012: 6, 'other': {'index': 2, 1958: 7, 1984: 8, 'other': 9}}, 'ATS': 10, 'other': 11}, 'other': 12} def main(x): current_decision = DECISIONS current_index = None for _ in range(len(x)): current_index = current_decision['index'] if x[current_index] in current_decision: current_decision = current_decision[x[current_index]] else: current_decision = current_decision['other'] if isinstance(current_decision, int): return current_decision" "def main(x): dict1 = {'CHUCK': 0, 'VUE': 1} dict2 = {'CHUCK': 2, 'VUE': 3} dict3 = {2001: 4, 1969: 5, 1968: 6} dict4 = {2001: 7, 1969: 8, 1968: 9} dict0 = {'OX': dict1, 'SHEN': dict2, 'ZIMPL': dict3} if x[2] == 1998: if x[0] == 'OX': return dict1[x[1]] elif x[0] == 'SHEN': return dict2[x[1]] else: return dict3[x[3]] elif (x[2] == 1994) & (x[1] == 'VUE'): return 10 elif (x[2] == 1994) & (x[1] != 'VUE'): return dict4[x[3]] else: return 11" "import re def main(x): slov_XPROC_REXX_1995 = {'SAS': 1, 'JSX': 2, 'OOC': 3} slov_RAML_2011_WISP = {'SAS': 7, 'REXX': 6} slov_RAML_2011_DYLAN = {'SAS': 8, 'JSX': 9, 'OOC': 10} slov_all_1 = {1995: 11, 1984: 12, 'NIM': 13, 'SAS': 5} slov_XPROC_REXX = {1984: 4, 2011: 0} if x[2] == 'XPROC': if x[0] == 'REXX': if x[1] == 1995: return slov_XPROC_REXX_1995.get(x[4]) else: return slov_XPROC_REXX.get(x[1]) else: return slov_all_1.get(x[0]) elif x[2] == 'RAML': if x[1] == 2011: if x[3] == 'WISP': return slov_RAML_2011_WISP.get(x[0]) elif x[3] == 'DYLAN': return slov_RAML_2011_DYLAN.get(x[4]) else: return slov_all_1.get(x[1]) else: return slov_all_1.get(x[2])" "tree = {1996: {'X10': {'CIRRU': 0, 'GLSL': 1}, 'EBNF': {'CIRRU': 2, 'GLSL': 3}, 'POD': 4}, 1971: {'CIRRU': 5, 'GLSL': {'X10': 6, 'EBNF': 7, 'POD': 8}}, 1978: 9} def main(arr): direction = 0 s2 = None s1 = tree[arr[1]] if arr[1] == 1996: s2 = s1[arr[2]] direction = 0 elif arr[1] == 1971: s2 = s1[arr[3]] direction = 1 elif arr[1] == 1978: s2 = s1 if isinstance(s2, int): return s2 if direction == 1: return s2[arr[2]] else: return s2[arr[3]]" "def main(x): if x[0] == 'XBASE': return x1(x) elif x[0] == 'SWIFT': return x2(x) else: return 10 def x1(x): if x[1] == 2016: return y1(x) else: return y2(x) def y1(x): if x[2] == 1998: return 0 elif x[2] == 1991: return 1 else: return 2 def y2(x): if x[3] == 2007: return 3 elif x[3] == 1962: return 4 else: return 5 def x2(x): if x[3] == 2007: return 6 elif x[3] == 1962: return z1(x) else: return 9 def z1(x): if x[1] == 2016: return 7 else: return 8" "def main(listx): if listx[0] == 'APEX': if listx[1] == 1962: return func1(listx) elif listx[1] == 1975: return func2(listx) elif listx[1] == 1979: return func3(listx) elif listx[0] == 'KICAD': return 10 elif listx[0] == 'JULIA': return 11 def func1(listx): if listx[4] == 'YAML': if listx[3] == 1979: return 0 elif listx[3] == 2014: return 1 elif listx[4] == 'NSIS': return 2 def func2(listx): if listx[4] == 'YAML': if listx[3] == 1979: return 3 elif listx[3] == 2014: return 4 elif listx[4] == 'NSIS': if listx[2] == 1967: return 5 elif listx[2] == 1976: return 6 def func3(listx): if listx[2] == 1967: if listx[4] == 'YAML': return 7 elif listx[4] == 'NSIS': return 8 elif listx[2] == 1976: return 9" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n9_3 = Node(11, [], []) n9_2 = Node(10, [], []) n9_1 = Node(9, [], []) n9 = Node(x[3], [1972, 1982, 1994], [n9_1, n9_2, n9_3]) n8_3 = Node(8, [], []) n8_2 = Node(7, [], []) n8_1 = Node(6, [], []) n8 = Node(x[3], [1972, 1982, 1994], [n8_1, n8_2, n8_3]) n7_2 = Node(3, [], []) n7_1 = Node(2, [], []) n7 = Node(x[0], [2010, 1995], [n7_1, n7_2]) n6_2 = Node(1, [], []) n6_1 = Node(0, [], []) n6 = Node(x[0], [2010, 1995], [n6_1, n6_2]) n5 = Node(x[0], [2010, 1995], [n8, n9]) n4 = Node(x[1], ['TEXT', 'SCALA'], [n6, n7]) n3_1 = Node(12, [], []) n3 = Node(x[1], ['TEXT', 'SCALA'], [n5, n3_1]) n2_2 = Node(5, [], []) n2_1 = Node(4, [], []) n2 = Node(x[3], [1972, 1982, 1994], [n4, n2_1, n2_2]) n = Node(x[4], ['METAL', 'OZ'], [n2, n3]) while n: res = n n = n.find_next() return res.data" "def f12(x): if x[2] == 2013: return 7 if x[2] == 1969: return 8 return 9 def f1(x): if x[1] == 'HAXE': return f12(x) if x[1] == 'NSIS': return 10 return 11 def f21(x): if x[2] == 2013: return 0 if x[2] == 1969: return 1 return 2 def f22(x): if x[1] == 'HAXE': return 3 if x[1] == 'NSIS': return 4 return 5 def f2(x): if x[3] == 2018: return f21(x) if x[3] == 1968: return f22(x) return 6 def main(x): if x[0] == 'SLASH': return 12 if x[0] == 'EAGLE': return f1(x) return f2(x)" "def LEFTfirst(x): if x[0] == 1990: return LEFTsecondleft(x) else: return 4 def LEFTsecondleft(x): if x[2] == 'GO': return 0 else: return LEFTthirdright(x) def LEFTthirdright(x): if x[4] == 1981: return 1 elif x[4] == 1982: return 2 else: return 3 def RIGHTfirst(x): if x[1] == 2000: return RIGHTsecondleft(x) else: return RIGHTsecondright(x) def RIGHTsecondleft(x): if x[2] == 'GO': return 5 else: return RIGHTthirdright(x) def RIGHTthirdright(x): if x[0] == 1990: return 6 else: return 7 def RIGHTsecondright(x): if x[0] == 1990: return RIGHTthirdRIGHT(x) else: return 10 def RIGHTthirdRIGHT(x): if x[2] == 'GO': return 8 else: return 9 def f(x): if x[3] == 2020: return LEFTfirst(x) else: return RIGHTfirst(x) def main(x): return f(x)" "def main(x): if x[1] == 1979: return func1(x) if x[1] == 1978: return func2(x) if x[1] == 1967: return 10 def func1(x): if x[3] == 'SELF': return func1_1(x) if x[3] == 'TCL': return func1_2(x) def func2(x): if x[3] == 'SELF': return 7 if x[3] == 'TCL': return func2_1(x) def func1_1(x): if x[2] == 1960: return 0 if x[2] == 2012: return 1 def func1_2(x): if x[4] == 2002: return 2 if x[4] == 1977: return func1_2_1(x) if x[4] == 1976: return 6 def func1_2_1(x): if x[0] == 'TERRA': return 3 if x[0] == 'DART': return 4 if x[0] == 'ECL': return 5 def func2_1(x): if x[2] == 1960: return 8 if x[2] == 2012: return 9" "def main(ar, lv=0): match lv: case 0: return {'JSX': lambda : main(ar, 33), 'QMAKE': lambda : main(ar, 1), 'NIM': lambda : 11}[ar[0]]() case 1: return {1989: lambda : main(ar, 2), 1979: lambda : main(ar, 3), 1957: lambda : main(ar, 333)}[ar[1]]() case 2: return {1968: 5, 2017: 6}[ar[2]] case 3: return {'PERL6': 7, 'INI': 8}[ar[3]] case 333: return {'PERL6': 9, 'INI': 10}[ar[3]] case 111: return {1989: 2, 1979: 3, 1957: 4}[ar[1]] case 33: return {'PERL6': lambda : main(ar, 22), 'INI': lambda : main(ar, 111)}[ar[3]]() case 22: return {1968: 0, 2017: 1}[ar[2]] case _: raise Exception" "def x2(x): return 1 if x[2] == 1974 else 0 if x[2] == 1976 else None def x11(x): return 4 if x[1] == 'SCSS' else 3 if x[1] == 'HY' else 2 if x[1] == 'DIFF' else None def x3(x): return x11(x) if x[3] == 'APEX' else x2(x) if x[3] == 'PIC' else None def x33(x): return 6 if x[3] == 'APEX' else 5 if x[3] == 'PIC' else None def x1(x): return 8 if x[1] == 'SCSS' else 7 if x[1] == 'HY' else x33(x) if x[1] == 'DIFF' else None def x4(x): return 9 if x[4] == 'CLEAN' else x1(x) if x[4] == 'OZ' else x3(x) if x[4] == 'RAML' else None def main(x): return x4(x) if x[0] == 2013 else 10 if x[0] == 2009 else None" "def choicex2(cond, x): if cond == 1992: return x elif cond == 2001: return x + 1 elif cond == 2010: return x + 2 def choicex3(cond, x): if cond == 'PIKE': return x elif cond == 'ATS': return x + 1 elif cond == 'HYPHY': return x + 2 def main(x): if x[1] == 'BRO': if x[3] == 'R': return choicex2(x[2], 6) elif x[3] == 'CUDA': return choicex3(x[0], 9) elif x[1] == 'VOLT': if x[3] == 'R': return choicex2(x[2], 0) elif x[3] == 'CUDA': return choicex3(x[0], 3) return 12" "def choisex0(coond, x): if coond == 2000: return x elif coond == 1957: return x + 1 def choisex3(coond, x): if coond == 1990: return x elif coond == 2014: return x + 1 elif coond == 1995: return x + 2 def main(x): if x[2] == 'SLIM': if x[3] == 1990: return choisex0(x[0], 0) elif x[3] == 2014: return 2 elif x[3] == 1995: return 3 elif x[2] == 'C': return 4 elif x[2] == 'RDOC': if x[1] == 1960: return choisex0(x[0], 5) elif x[1] == 1991: return choisex3(x[3], 7) elif x[1] == 2000: return 10" "def choicex1(cond, x): if cond == 2016: return x elif cond == 1982: return x + 1 def choicex2(cond, x): if cond == 1962: return x elif cond == 1990: return x + 1 def choicx4(cond, x): if cond == 1958: return x elif cond == 1991: return x + 1 def main(x): if x[3] == 1974: if x[0] == 'SQL': return choicex1(x[1], 0) elif x[0] == 'IO': if x[1] == 2016: return choicex2(x[2], 2) elif x[1] == 1982: return choicex2(x[2], 4) elif x[0] == 'X10': if x[1] == 2016: return choicex2(x[2], 6) return 8 elif x[3] == 2002: return choicx4(x[4], 9) return 11" "def main(x): if x[1] == 'SQF': return 5 elif x[1] == 'XS': return xd4(x) else: return xu2(x) def xu2(x): if x[2] == 'MUF': return 3 elif x[2] == 'CIRRU': return 4 else: return xu4(x) def xu4(x): if x[4] == 'SQLPL': return 2 else: return x0(x) def x0(x): if x[0] == 1983: return 0 else: return 1 def xd4(x): if x[4] == 'LATTE': return 6 else: return x3(x) def x3(x): if x[3] == 2014: return 10 else: return xd2(x) def xd2(x): if x[2] == 'SQLPL': return 7 if x[2] == 'MUF': return 8 else: return 9" "def main(a): if a[3] == 'SMT': return smt(a) elif a[3] == 'EAGLE': return eagle(a) elif a[3] == 'FLUX': return 11 def smt(a): if a[3] == 'EAGLE': if a[0] == 'APEX': return last(a) elif a[0] == 'XTEND': return 8 elif a[0] == 'MAX': return 9 elif a[3] == 'SMT': if a[0] == 'APEX': return last(a) elif a[0] == 'XTEND': return 3 elif a[0] == 'MAX': return 4 def eagle(a): if a[2] == 1985: return 10 elif a[2] == 1962: return smt(a) def last(a): if a[3] == 'EAGLE': if a[1] == 1992: return 5 elif a[1] == 1980: return 6 elif a[1] == 1966: return 7 elif a[3] == 'SMT': if a[1] == 1992: return 0 elif a[1] == 1980: return 1 elif a[1] == 1966: return 2" "def main(x): dict1 = {'VHDL': 0, 'CUDA': 1, 'NSIS': 2} dict11 = {'VHDL': 3, 'CUDA': 4, 'NSIS': 5} dict2 = {2017: 6, 1972: 7} dict3 = {'TEA': dict1[x[1]], 'TEX': dict11[x[1]]} dict111 = {'VHDL': dict2[x[2]], 'CUDA': 8, 'NSIS': 9} dict0 = {1957: dict3[x[3]], 1975: dict111[x[1]], 1964: 10} return dict0[x[0]]" "def main(array): list = [{3: 2005, 2: 1996, 4: 'LASSO', 'value': 0}, {3: 2005, 2: 1996, 4: 'EAGLE', 'value': 1}, {3: 2005, 2: 1996, 4: 'C++', 0: 1965, 'value': 2}, {3: 2005, 2: 1996, 4: 'C++', 0: 1969, 'value': 3}, {3: 2005, 2: 1996, 4: 'C++', 0: 1990, 'value': 4}, {3: 2005, 2: 2002, 'value': 5}, {3: 2005, 2: 1963, 'value': 6}, {3: 1968, 0: 1965, 'value': 7}, {3: 1968, 0: 1969, 2: 1996, 'value': 8}, {3: 1968, 0: 1969, 2: 2002, 'value': 9}, {3: 1968, 0: 1969, 2: 1963, 'value': 10}, {3: 1968, 0: 1990, 'value': 11}, {3: 2014, 'value': 12}] for element in list: error = 0 for key in element: if key == 'value': continue if element[key] != array[key]: error = 1 if error == 0: return element['value']" "def x_0(x): if x == 'KICAD': return 0 elif x == 'TCSH': return 1 else: return 2 def x_3(x): if x == 1966: return 3 elif x == 1984: return 4 else: return 5 def main(x): if x[4] == 1962: if x[2] == 1998: return x_0(x[0]) elif x[1] == 'IDL': return x_3(x[3]) elif x[3] == 1966: a = 6 elif x[3] == 1984: a = 7 else: a = 8 elif x[4] == 2018: a = 9 else: a = 10 return a" "s = {'XC': {'KICAD': {'ARC': {'YACC': 0, 'PAN': 1, 'COQ': 2}, 'NSIS': {'YACC': 3, 'PAN': 4, 'COQ': 5}}, 'XPROC': 6, 'TEA': {'ARC': {'ADA': 7, 'STATA': 8}, 'NSIS': {'YACC': 9, 'PAN': 10, 'COQ': 11}}}, 'GOLO': 12} def main(path): if path[4] == 'GOLO': return s[path[4]] s1 = s[path[4]] if path[3] == 'XPROC': return s1[path[3]] if path[3] == 'TEA': s2 = s1[path[3]] if path[0] == 'ARC': s3 = s2[path[0]] return s3[path[2]] else: s3 = s2[path[0]] return s3[path[1]] elif path[3] == 'KICAD': s2 = s1[path[3]] s3 = s2[path[0]] return s3[path[1]]" "def main(x): d = {'PONY': 4, 'D': 5, 'OPAL': 6} if x[3] == 1968: if x[4] == 1972: if x[2] == 'ASP': if x[1] == 2007: return 0 return 1 return 2 return 3 elif x[3] == 1969: if x[1] == 2007: if x[4] == 1972: return d[x[0]] return 7 return 8 if x[1] == 2007: if x[2] == 'ASP': return 9 return 10 return 11" "def main(lis): tree = {1981: 11, 1998: 12, 2019: [4, {'SELF': 5, 'NIM': [1, {1975: 0, 2001: 1, 2016: [0, {'M4': 4, 'FREGE': 3, 'SLASH': 2}]}], 'CSON': [0, {'M4': 10, 'FREGE': 9, 'SLASH': [3, {1986: 6, 1967: 7, 1999: 8}]}]}]} a = lis[2] while isinstance(tree[a], list): b = a a = lis[tree[a][0]] tree = tree[b][1] return tree[a]" "s = {1981: {'OPA': {1964: {'NESC': 0, 'TXL': 1}, 2018: {'NESC': 2, 'TXL': 3}, 1963: {2006: 4, 1976: 5}}, 'SMT': {1964: 6, 2018: 7, 1963: {2006: 8, 1976: 9}}, 'NIM': 10}, 2002: 11, 1969: 12} def main(path: list): s1 = s[path[3]] if isinstance(s1, int): return s1 s2 = s1[path[2]] if isinstance(s2, int): return s2 s3 = s2[path[1]] if isinstance(s3, int): return s3 if path[1] == 1963: s4 = s3[path[4]] else: s4 = s3[path[0]] return s4" "def main(x): d1 = {'name': 'P1', 'source': x[0], 1971: 0, 1965: 1, 1984: 2} d2 = {'name': 'P2', 'source': x[0], 1971: 3, 1965: 4, 1984: 5} d3 = {'name': 'P3', 'source': x[0], 1971: 6, 1965: 7, 1984: 8} d4 = {'name': 'P4', 'source': x[3], 1971: 9, 1962: 10} d5 = {'name': 'P5', 'source': x[3], 1971: d1, 1962: d2} d6 = {'name': 'P6', 'source': x[1], 1958: d3, 2011: d4, 1968: 11} d7 = {'name': 'P7', 'source': x[2], 'XPROC': d5, 'VALA': d6, 'PIC': 12} pos = d7 while not isinstance(pos, int): pos = pos[pos['source']] return pos" "def main(x): counter = 0 if x[2] == 1989: if x[0] == 1976: return 4 if x[1] == 2020: return 3 if x[1] == 1965: return 2 if x[4] == 1980: return 0 return 1 if x[4] == 1980: return 5 if x[3] == 'YANG': counter = 2 if x[0] == 2017: return 6 + counter return 7 + counter" "def main(x): dict1 = {'COQ': 7, 'PHP': 8, 'SCAML': 9} dict2 = {'2002': 2, '1979': 3, '1969': 4} if x[3] == 'OCAML': if x[0] == 'TEX': if x[1] == 'COQ': return 0 elif x[1] == 'PHP': return 1 else: return dict2.get(str(x[4])) else: return 5 elif x[3] == 'TERRA': return dict1.get(x[1]) else: return 6" "def main(x): if x[1] == 'HAXE': return 14 elif x[2] == 2003: return f1(x) elif x[2] == 1960: return f2(x) else: return f3(x) def f1(x): if x[0] == 2005: if x[3] == 'R': return 0 else: return 1 elif x[0] == 1976: if x[3] == 'R': return 3 else: return 4 else: return 2 def f2(x): if x[0] == 2005: return 5 elif x[0] == 1976: return 8 elif x[3] == 'R': return 6 else: return 7 def f3(x): if x[0] == 1976: return 13 elif x[0] == 1959: return 12 elif x[4] == 1995: return 9 elif x[4] == 1957: return 10 else: return 11" "def f1(arr): if arr[1] == 1979: if arr[4] == 'PAN': return 0 elif arr[4] == 'IOKE': return 1 elif arr[1] == 1978: if arr[4] == 'PAN': return 2 elif arr[4] == 'IOKE': return 3 elif arr[1] == 2011: if arr[3] == 1978: return 4 elif arr[3] == 1958: return 5 def f2(arr): if arr[4] == 'IOKE': return 9 elif arr[4] == 'PAN': if arr[1] == 1979: return 6 elif arr[1] == 1978: return 7 elif arr[1] == 2011: return 8 def main(arr): if arr[2] == 2015: return 11 elif arr[2] == 1977: if arr[0] == 'HYPHY': return 10 elif arr[0] == 'DYLAN': return f2(arr) elif arr[0] == 'REBOL': return f1(arr)" "class TreeObj: def __init__(self, children, indexes, params): self.params = params self.res = None for (i, ind) in enumerate(indexes): if ind in params: self.res = children[i] def get_obj(self): if isinstance(self.res, int): return self.res return self.res.get_obj() def main(indexes): x_11 = TreeObj([0, 1, 2], ['COBOL', 'ALLOY', 'PUG'], indexes) x_12 = TreeObj([3, 4, 5], ['COBOL', 'ALLOY', 'PUG'], indexes) x_13 = TreeObj([9, 10, 11], ['COBOL', 'ALLOY', 'PUG'], indexes) x_31 = TreeObj([6, 7], [1970, 2012], indexes) x_21 = TreeObj([x_11, x_12, x_31], [2015, 2010, 2019], indexes) x_22 = TreeObj([8, x_13, 12], [2015, 2010, 2019], indexes) x_0 = TreeObj([x_21, x_22, 13], [1957, 1965, 2017], indexes) return x_0.get_obj()" "def f1(a, n): match a[n]: case 'YANG': return f1(a, 0) case 'HACK': return f1(a, 1) case 'HAML': return 4 case 'NL': return 3 case 1957: return 0 case 1980: return 1 case 1974: return 2 def f2(a, n): match a[n]: case 'CLEAN': return f2(a, 1) case 'TCSH': return f3(a, 3) case 'YANG': return f2(a, 0) case 'NL': return 8 case 1957: return 5 case 1980: return 6 case 1974: return 7 def f3(a, n): match a[n]: case 'HACK': return f3(a, 0) case 'HAML': return 12 case 1957: return 9 case 1980: return 10 case 1974: return 11 def f(a, n): match a[n]: case 'GO': return f1(a, 3) case 'SHEN': return f2(a, 4) def main(a): return f(a, 2)" "def choicex4(cond, x): if cond == 1987: return x return x + 1 def main(x): if x[1] == 2008: if x[0] == 1960: return 5 if x[2] == 'STATA': return 4 if x[2] == 'NESC': return choicex4(x[4], 2) return choicex4(x[4], 0) if x[4] == 2001: return 10 if x[2] == 'NIX': return 6 if x[2] == 'STATA': return 9 if x[0] == 1962: return 7 return 8" "def main(mass): if mass[0] == 'VALA': return f6(mass) elif mass[0] == 'KRL': return f7(mass) elif mass[0] == 'ANTLR': return 13 def f1(mass): if mass[2] == 2008: return 0 elif mass[2] == 1964: return 1 elif mass[2] == 2018: return 2 def f2(mass): if mass[3] == 2001: return 3 elif mass[3] == 1977: return 4 elif mass[3] == 1995: return 5 def f3(mass): if mass[3] == 2001: if mass[2] == 2008: return 7 elif mass[2] == 1964: return 8 elif mass[2] == 2018: return 9 def f4(mass): if mass[1] == 'NIX': return f1(mass) elif mass[1] == 'VUE': return f2(mass) def f5(mass): if mass[3] == 2001: return f3(mass) elif mass[3] == 1977: return 10 elif mass[3] == 1995: return 11 def f6(mass): if mass[4] == 1964: return f4(mass) elif mass[4] == 2003: return 6 def f7(mass): if mass[4] == 1964: return f5(mass) elif mass[4] == 2003: return 12 main(['KRL', 'NIX', 2008, 2001, 2003]) main(['VALA', 'VUE', 2008, 1977, 2003])" "def f(x): x1new = [x[1], x[2], x[0], x[3]] paths = {'PIKE': 14, 'CSS': 13, 'VUE': {'CHUCK': 12, 'YANG': {'COOL': 11, 'LEAN': 10, 'FISH': {1959: 9, 2020: 8, 2010: 7}}, 'PLSQL': {'COOL': {1994: 6, 2003: 5}, 'LEAN': {1994: 4, 2003: 3}, 'FISH': {1959: 2, 2020: 1, 2010: 0}}}} try: curr = paths[x1new[0]] i = 1 while type(curr) != int: curr = curr[x1new[i]] i += 1 except Exception: x1new = [x[1], x[2], x[0], x[4]] curr = paths[x1new[0]] i = 1 while type(curr) != int: curr = curr[x1new[i]] i += 1 return curr def main(x): return f(x)" "def main(lis): tree = {'SCAML': [3, {1967: [1, {1963: 0, 1967: 1, 1994: 2}], 2009: [0, {2019: 3, 1987: 4, 1975: 5}]}], 'MASK': [1, {1963: [0, {2019: 6, 1987: 7, 1975: 8}], 1967: 9, 1994: 10}]} a = lis[2] while isinstance(tree[a], list): b = a a = lis[tree[a][0]] tree = tree[b][1] return tree[a]" "def main(mass): if mass[1] == 2018: return f1(mass) elif mass[1] == 1978: return f2(mass) def f1(mass): if mass[3] == 'FREGE': return f3(mass) elif mass[3] == 'AGDA': return 3 def f2(mass): if mass[3] == 'FREGE': return f4(mass) elif mass[3] == 'AGDA': return f5(mass) def f3(mass): if mass[0] == 1967: return 0 elif mass[0] == 2018: return 1 elif mass[0] == 1995: return 2 def f4(mass): if mass[0] == 1967: return 4 if mass[0] == 2018: return 5 if mass[0] == 1995: return 6 def f5(mass): if mass[0] == 1967: return 7 if mass[0] == 2018: return 8 if mass[0] == 1995: return 9 main([1967, 2018, 1972, 'AGDA']) main([1967, 1978, 1987, 'FREGE'])" "def check1(x): if x[1] == 'D': return 0 elif x[1] == 'MTML': return 1 else: return 2 def check3(x): if x[3] == 'FANCY': return 0 elif x[3] == 'BOO': return 1 else: return 2 def main(x): if x[2] == 1993: ret = [[0, 1, 2], 3, 4] if check1(x) == 0: return ret[0][check3(x)] else: return ret[check1(x)] else: ret = [[5, 6, 7], 8, [9, 10, 11]] if check3(x) == 1: return ret[1] else: return ret[check3(x)][check1(x)]" "def main(x): if x[4] == 2009: if x[3] == 'TERRA': if x[0] == 'JSON5': return {1963: 0, 1962: 1}[x[2]] elif x[0] == 'NL': return 2 elif x[3] == 'QML': if x[1] == 'IDL': return {1963: 3, 1962: 4}[x[2]] elif x[1] == 'ALLOY': return {1963: 5, 1962: 6}[x[2]] elif x[1] == 'LEX': return {1963: 7, 1962: 8}[x[2]] elif x[4] == 1999: return {1963: 9, 1962: 10}[x[2]] return {1990: 11}[x[4]]" "import math import random import copy tree = {'ANTLR': {'M': {'MAX': {'SVG': 0, 'TEXT': 1}, 'PERL': 2, 'REXX': {'JULIA': 3, 'ATS': 4}}, 'LIMBO': {'JULIA': 5, 'ATS': 6}, 'AWK': 7}, 'STAN': 8, 'DART': {'MAX': {'M': 9, 'LIMBO': 10, 'AWK': 11}, 'PERL': 12, 'REXX': 13}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "import math import random import copy tree = {'BOO': {2017: {1985: {1958: 0, 2011: 1, 1970: 2}, 1999: {1958: 3, 2011: 4, 1970: 5}, 1973: 6}, 1971: 7}, 'VOLT': {1985: 8, 1999: 9, 1973: 10}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "import math import random import copy tree = {'CUDA': {'BISON': {'NUMPY': 0, 'PLSQL': 1, 'REXX': 2}, 'SELF': {'NUMPY': 3, 'PLSQL': 4, 'REXX': 5}, 'TEX': 6}, 'M': {1965: {'NUMPY': 7, 'PLSQL': 8, 'REXX': 9}, 2005: 10}, 'PAWN': 11} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "class Node: def __init__(self, branch='', value=-1, x_num=-1): self.branch = branch self.value = value self.x_num = x_num self.nodes = [] def add_node(self, branch='', value=-1, x_num=-1): self.nodes.append(Node(branch, value, x_num)) def create_tree(root): root.x_num = 4 root.add_node(branch='LEX', x_num=1) root.nodes[0].add_node(branch='XBASE', x_num=2) root.nodes[0].nodes[0].add_node(branch='LOGOS', x_num=0) root.nodes[0].nodes[0].nodes[0].add_node(branch='GENIE', value=0) root.nodes[0].nodes[0].nodes[0].add_node(branch='STON', value=1) root.nodes[0].nodes[0].add_node(branch='VHDL', value=2) root.nodes[0].nodes[0].add_node(branch='POD', value=3) root.nodes[0].add_node(branch='ASN.1', x_num=3) root.nodes[0].nodes[1].add_node(branch='OPA', x_num=0) root.nodes[0].nodes[1].nodes[0].add_node(branch='GENIE', value=4) root.nodes[0].nodes[1].nodes[0].add_node(branch='STON', value=5) root.nodes[0].nodes[1].add_node(branch='QML', value=6) root.nodes[0].nodes[1].add_node(branch='MQL5', value=7) root.add_node(branch='AWK', value=8) root.add_node(branch='FISH', x_num=3) root.nodes[2].add_node(branch='OPA', value=9) root.nodes[2].add_node(branch='QML', value=10) root.nodes[2].add_node(branch='MQL5', value=11) def count_tree(node, x): if node.x_num != -1: for next_node in node.nodes: if next_node.branch == x[node.x_num]: return count_tree(next_node, x) else: return node.value def main(x): root = Node() create_tree(root) return count_tree(root, x)" "def main(x): a123 = {2020: 0, 1968: 1, 1991: 2} a45 = {1963: 4, 1974: 5} a789 = {1998: 7, 1976: 8, 1958: 9} if x[3] == 'MQL4': if x[4] == 'RDOC': return a123.get(x[0]) elif x[4] == 'E': return 3 return a45.get(x[1]) if x[4] == 'RDOC': if x[0] == 2020: return 6 if x[0] == 1991: return 10 if x[0] == 1968: return a789.get(x[2]) elif x[4] == 'E': return 11 return 12" "def main(x): slov_2005_shell_lean = {'ADA': 9, 'FREGE': 10, 'GRACE': 11} slov_1994_lean = {'MINID': 4, 'SHELL': 5, 'CMAKE': 6} slov_1994_ragel_mind = {2016: 0, 1998: 1} def func1(lol: str): if lol == 'CMAKE': return 3 elif lol == 'SHELL': return 2 return slov_1994_ragel_mind.get(int(x[0])) def func2(lol: str): if lol == 'RAGEL': return 8 return slov_2005_shell_lean.get(x[3]) if int(x[1]) == 1994: if x[4] == 'RAGEL': return func1(x[2]) elif x[4] == 'LEAN': return slov_1994_lean.get(x[2]) elif int(x[1]) == 2005: if x[2] == 'MINID': return 7 elif x[2] == 'CMAKE': return 12 elif x[2] == 'SHELL': return func2(x[4])" "def main(array): def fu(array, val1, val2, key1, key2, i, val3, key3): temp = -2 d = dict([(key1, val1), (key2, val2), (key3, val3)]) for k in d: if array[i] == k: temp = d.get(k) return temp di = dict([('LOGOS', fu(array, 0, 1, 1957, 2019, 0, -1, -1)), ('RUST', 2), ('HY', fu(array, 3, 4, 1957, 2019, 0, -1, -1))]) dic = dict([('LOGOS', fu(array, 5, 6, 2017, 2006, 1, 7, 1968)), ('RUST', fu(array, 8, 9, 1957, 2019, 0, -1, -1)), ('HY', 10)]) if array[2] == 2009: for k in di: if array[3] == k: return di.get(k) elif array[2] == 1966: for k in dic: if array[3] == k: return dic.get(k) main([2019, 2017, 2009, 'HY']) main([2019, 2006, 1966, 'RUST'])" "s = {'NUMPY': {2019: {'COBOL': 0, 'QMAKE': {2008: 1, 1967: 2, 2004: 3}}, 1984: {2008: 4, 1967: {'COBOL': 5, 'QMAKE': 6}, 2004: {'COBOL': 7, 'QMAKE': 8}}}, 'SLIM': {'COBOL': {'HLSL': 9, 'JAVA': 10}, 'QMAKE': 11}, 'R': 12} def main(path): s1 = s[path[4]] if path[4] == 'NUMPY': s2 = s1[path[0]] if path[0] == 2019: s3 = s2[path[2]] if isinstance(s3, int): return s3 return s3[path[1]] else: s3 = s2[path[1]] if isinstance(s3, int): return s3 return s3[path[2]] elif path[4] == 'SLIM': s2 = s1[path[2]] if isinstance(s2, int): return s2 return s2[path[3]] else: return 12" "class Node: def __init__(self, ch: dict, ind: int): self.ch = ch self.ind = ind def give_res(self, x): next_node = self.ch[x[self.ind]] if type(next_node) is Node: return next_node.give_res(x) else: return next_node def make_tree(): n0 = Node({1993: 1, 2012: 2}, 3) n1 = Node({1964: 0, 2014: n0, 1994: 3}, 2) n2 = Node({1964: 6, 2014: 7, 1994: 8}, 2) n3 = Node({1993: 5, 2012: n2}, 3) n4 = Node({'BOO': n1, 'ROFF': 4, 'SHELL': n3}, 0) n5 = Node({1964: 9, 2014: 10, 1994: 11}, 2) n6 = Node({'BOO': n5, 'ROFF': 12, 'SHELL': 13}, 0) n7 = Node({2003: n6, 2004: 14}, 1) n8 = Node({'C++': n4, 'MQL4': n7}, 4) return n8 def main(arr): root = make_tree() return root.give_res(arr)" "def x_1(x1, x2, x): if x2 == 1998: if x1 == 1982: return x_3(x[1], x[3]) elif x1 == 2016: return x_0(x[1], x[0]) else: return x_3(x[1], x[3]) elif x2 == 2017: if x1 == 1982: return x_0(x[1], x[0]) elif x1 == 2016: return 11 else: return 12 else: return 8 def x_3(x1, x3): if x1 == 1982: if x3 == 'TOML': return 0 elif x3 == 'MUPAD': return 1 else: return 2 elif x3 == 'TOML': return 5 elif x3 == 'MUPAD': return 6 else: return 7 def x_0(x1, x0): if x1 == 2016: if x0 == 1988: return 3 else: return 4 elif x0 == 1988: return 9 else: return 10 def main(x): if x[4] == 'NCL': if x[2] == 1998 or x[2] == 2017: return x_1(x[1], x[2], x) else: return 8 elif x[4] == 'MUPAD': return 13 else: return 14" "def main(x): return x2(x) def x2(x): if x[2] == 'GRACE': return 10 elif x[2] == 'MTML': return 11 else: return x4(x) def x4(x): if x[4] == 1999: return 5 elif x[4] == 1959: return x3(x) else: return x1(x) def x3(x): if x[3] == 'GENIE' and x[4] == 1959: return 9 if x[3] == 'GENIE' and x[4] == 1983: return 1 if x[3] == 'LATTE' and x[4] == 1983: return 0 else: return x0(x) def x0(x): if x[0] == 1979 and x[4] == 1983: return 2 elif x[0] == 1999 and x[4] == 1983: return 3 elif x[0] == 1992 and x[4] == 1983: return 4 elif x[0] == 1979: return 6 elif x[0] == 1999: return 7 else: return 8 def x1(x): if x[1] == 'VUE': return x3(x) else: return x0(x)" "def main(x): array = [[1996, 1986, x[2], 1968, x[4]], [1996, 1972, 'JSON', 1968, x[4]], [1996, 1972, 'TCSH', 1968, x[4]], [1996, 1972, 'ASP', 1968, x[4]], [1996, 1986, 'JSON', 1996, x[4]], [1996, 1986, 'TCSH', 1996, x[4]], [1996, 1986, 'ASP', 1996, x[4]], [1996, 1972, x[2], 1996, 'HY'], [1996, 1972, x[2], 1996, 'MAKO'], [1996, 1972, x[2], 1996, 'IDRIS'], [1988, x[1], x[2], x[3], x[4]]] if x in array: return array.index(x)" "def main(x): a123 = {'M': 1, 'GAMS': 2, 'SQF': 3} a45 = {'URWEB': 4, 'SCALA': 5} a67 = {'GAMS': 6, 'SQF': 7} a8910 = {'M': 8, 'GAMS': 9, 'SQF': 10} a1112 = {1985: 11, 1984: 12} if x[2] == 1994: if x[1] == 1978: if x[0] == 'URWEB': return 0 return a123.get(x[3]) elif x[1] == 1966: if x[3] == 'M': return a45.get(x[0]) return a67.get(x[3]) return a8910.get(x[3]) return a1112.get(x[2])" "def main(x): if x[4] == 'GLYPH': return func1(x) elif x[4] == 'LESS': return 4 elif x[4] == 'VALA': if x[0] == 1974: return func2(x) elif x[0] == 1971: return 11 def func1(x): if x[0] == 1974: if x[3] == 'X10': return 0 elif x[3] == 'FLUX': return 1 elif x[0] == 1971: if x[3] == 'X10': return 2 elif x[3] == 'FLUX': return 3 def func2(x): if x[2] == 'GRACE': if x[3] == 'X10': return 5 elif x[3] == 'FLUX': return 6 elif x[2] == 'PERL': return func3(x) elif x[2] == 'ALLOY': return 10 def func3(x): if x[1] == 'HY': return 7 elif x[1] == 'SMALI': return 8 elif x[1] == 'WISP': return 9" "data = {""['FREGE', 'CMAKE', 'ROFF', 2012]"": 5, ""['FREGE', 'MUPAD', 'ROFF', 2011]"": 10, ""['FREGE', 'CMAKE', 'NCL', 2012]"": 4, ""['SWIFT', 'CMAKE', 'NCL', 2011]"": 8, ""['SWIFT', 'MUPAD', 'ROFF', 2012]"": 3, ""['HCL', 'MUPAD', 'ROFF', 2012]"": 1, ""['SWIFT', 'MUPAD', 'ROFF', 2011]"": 9, ""['HCL', 'CMAKE', 'NCL', 2012]"": 2, ""['HCL', 'PUG', 'ROFF', 2012]"": 0, ""['HCL', 'MUPAD', 'NCL', 2011]"": 6} def main(args): if str(args) in data: return data[str(args)] else: return str(args)" "def main(x): d = {2000: (2, {'LIMBO': (3, {1979: (-1, 0), 1964: (-1, 1), 1994: (-1, 2)}), 'XC': (-1, 3)}), 1977: (3, {1979: (-1, 4), 1964: (1, {'IDRIS': (-1, 5), 'WISP': (-1, 6), 'TCSH': (-1, 7)}), 1994: (1, {'IDRIS': (-1, 8), 'WISP': (-1, 9), 'TCSH': (-1, 10)})}), 2012: (-1, 11)} k = 0 cd = d while k != -1: (k, cd) = cd[x[k]] return cd" "def main(x): if x[4] == 'CMAKE': return x_2(x) elif x[4] == 'HTML': return 6 else: return x_11(x) def x_2(x): if x[2] == 'PIKE': return x_1(x) elif x[2] == 'ASN.1': return 4 else: return 5 def x_1(x): if x[1] == 2001: return x_0(x) else: return 3 def x_0(x): if x[0] == 1987: return 0 elif x[0] == 1967: return 1 else: return 2 def x_11(x): if x[1] == 2013: return x_3(x) else: return 7 def x_3(x): if x[3] == 'ROUGE': return x_22(x) elif x[3] == 'LEX': return 8 else: return 12 def x_22(x): if x[2] == 'PIKE': return 9 elif x[2] == 'ASN.1': return 10 else: return 11" "def main(x): match (x[0], x[4]): case ['TCL', 1978]: match x[3]: case 1959: return 0 case 1957: return 1 case ['TCL', 1997]: match x[1]: case 1959: return 3 case 2016: return 4 case 1982: match x[2]: case 'MINID': return 5 case 'P4': return 6 case 'TCL': return 7 case ['TCL', 2016]: return 2 match (x[0], x[1]): case ['J', 1959]: return 8 case ['J', 2016]: return 9 case ['J', 1982]: return 10 return 11" "def x_2(x3, x2, x): if x3 == 'X10': if x2 == 'NUMPY': return x_1(x[2], x[1], x) else: return 5 elif x2 == 'NUMPY': return 7 else: return x_1(x[2], x[1], x) def x_1(x2, x1, x): if x2 == 'NUMPY': if x1 == 2004: return 0 elif x1 == 1958: if x[4] == 1974: return 1 elif x[4] == 1958: return 2 else: return 3 else: return 4 elif x1 == 2004: return 8 elif x1 == 1958: return 9 else: return 10 def main(x): if x[3] == 'X10': return x_2(x[3], x[2], x) elif x[3] == 'SMT': if x[4] == 1974: return 6 elif x[4] == 1958: return x_2(x[4], x[2], x) else: return 11 else: return 12" "def main(x): a = [0, {'GLYPH': [3, {2008: [2, {'R': 0, 'REBOL': 1, 'TCL': 2}], 1974: 3}], 'J': 4, 'POD': [2, {'R': 5, 'REBOL': [1, {'JSON': 6, 'SLASH': 7, 'BOO': 8}], 'TCL': 9}]}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): return {'QMAKE': 11, 'CUDA': 12, 'MAX': {'SELF': {'SHELL': 0, 'EAGLE': 1, 'LOGOS': 2}[x[0]], 'HAXE': {'SHELL': 3, 'EAGLE': {'LEAN': 4, 'CLICK': 5, 'MINID': 6}[x[3]], 'LOGOS': {'LEAN': 7, 'CLICK': 8, 'MINID': 9}[x[3]]}[x[0]], 'P4': 10}[x[1]]}[x[4]]" "s = {2015: {'GDB': {'ANTLR': {1966: 0, 1994: 1, 1972: 2}, 'EQ': {1966: 3, 1994: 4, 1972: 5}, 'PAWN': 6}, 'X10': 7, 'APEX': {'ANTLR': 8, 'EQ': {1966: 9, 1994: 10, 1972: 11}, 'PAWN': 12}}, 1994: 13} def main(path): s1 = s[path[1]] if isinstance(s1, int): return s1 else: s2 = s1[path[2]] if isinstance(s2, int): return s2 else: s3 = s2[path[0]] if isinstance(s3, int): return s3 else: return s3[path[4]]" "def main(x): array = [[x[0], 1969, 'MTML', 'DIFF'], [x[0], 1983, 'MTML', 'DIFF'], [x[0], 1978, 'MTML', 'DIFF'], [1957, x[1], 'SELF', 'DIFF'], [2000, x[1], 'SELF', 'DIFF'], [1965, x[1], 'SELF', 'DIFF'], [1957, x[1], x[2], 'NIM'], [2000, x[1], x[2], 'NIM'], [1965, 1969, x[2], 'NIM'], [1965, 1983, x[2], 'NIM'], [1965, 1978, x[2], 'NIM']] if x in array: return array.index(x)" "def main(x): a01 = {'GDB': 0, 'SCSS': 1} a234 = {2013: 2, 1986: 3, 1969: 4} a567 = {2013: 5, 1986: 6, 1969: 7} a89 = {'GDB': 8, 'SCSS': 9} a1011 = {'GLYPH': 10, 'ECL': 11} if x[3] == 1986: if x[1] == 'HTML': return a01.get(x[0]) elif x[1] == 'GLYPH': return a234.get(x[2]) return a567.get(x[2]) elif x[3] == 1974: if x[1] == 'HTML': return a89.get(x[0]) elif x[1] == 'GLYPH': return 10 return 11 return 12" "def sub_1(x): if x[1] == 'HCL': return 4 elif x[1] == 'SMALI': if x[0] == 1967: if x[4] == 2017: return 5 elif x[4] == 2016: return 6 else: return 7 elif x[0] == 1985: if x[2] == 1985: return 8 else: return 9 else: return 10 else: return 11 def main(x): if x[3] == 'LUA': if x[1] == 'HCL': if x[2] == 1985: return 0 else: return 1 elif x[1] == 'SMALI': return 2 else: return 3 elif x[3] == 'LATTE': return sub_1(x) else: return 12" "def main(graph_list): d_4_1 = {'RED': 5, 'P4': 6} d_4_2 = {'RED': 3, 'P4': 4} d_4_3 = {'RED': 1, 'P4': 2} d_3_1 = {2017: 8, 1964: 9, 1979: 10} d_3_2 = {1979: d_4_2, 1964: d_4_3, 2017: 0} d_2 = {2018: d_3_1, 1968: 7, 2005: d_4_1} d_0 = {'LATTE': 11, 'SHELL': d_2, 'PLSQL': d_3_2} d_1 = {'ASN.1': 12, 'PAN': d_0} if type(d_1[graph_list[1]]) is int: return d_1[graph_list[1]] if graph_list[0] in d_0: iter = d_0[graph_list[0]] if type(iter) is int: return iter if graph_list[2] in iter: iter = iter[graph_list[2]] if type(iter) is int: return iter if graph_list[3] in iter: iter = iter[graph_list[3]] if type(iter) is int: return iter return iter[graph_list[4]]" "class Node: def __init__(self, values: dict, index): self.values = values self.index = index def make_tree(): node0u = Node({'MQL4': 3, 'EJS': 4, 'HCL': 5}, 0) node0d = Node({'MQL4': 9, 'EJS': 10, 'HCL': 11}, 0) node3u = Node({1999: 0, 1990: 1}, 3) node2u = Node({1996: node3u, 2008: 2, 2002: node0u}, 2) node2d = Node({1996: 6, 2008: 7, 2002: 8}, 2) node3d = Node({1999: node2d, 1990: node0d}, 3) node1 = Node({'XML': node2u, 'SASS': node3d, 'SMT': 12}, 1) return node1 def main(arr): root = make_tree() while True: key = arr[root.index] if type(root.values.get(key)) == int: return root.values.get(key) else: root = root.values.get(key)" "def main(args): tree = {'XOJO': {'SAGE': {'BRO': 0, 'SQF': 1}, 'TOML': {'BRO': 2, 'SQF': 3}, 'P4': {'BRO': 4, 'SQF': 5}}, 'SLASH': {'SAGE': 6, 'TOML': 7, 'P4': 8}, 'LEAN': {'SAGE': {'BRO': 9, 'SQF': 10}, 'TOML': 11, 'P4': 12}} level1 = tree[args[2]] level2 = level1[args[3]] if type(level2) is dict: return level2[args[0]] else: return level2" "b = ['x2', {'1970': ['x0', {'1997': ['x1', {'NGINX': 0, 'SLASH': 1}], '1960': ['x1', {'NGINX': 2, 'SLASH': ['x3', {'GENIE': 3, 'DYLAN': 4}]}], '1961': ['x3', {'GENIE': 5, 'DYLAN': 6}]}], '1967': ['x3', {'GENIE': 7, 'DYLAN': ['x4', {'GLYPH': ['x0', {'1997': 8, '1960': 9, '1961': 10}], 'LASSO': 11, 'LEAN': 12}]}], '1996': 13}] def main(x): return calc(x=x, t=b) def calc(x, t): if type(t) == int: return t n = int(t[0][1:]) return calc(x=x, t=t[1].get(str(x[n])))" "def main(data): x9 = {'index': 2, 'APEX': 9, 'CSON': 10} x8 = {'index': 3, 2000: 6, 1993: 7} x7 = {'index': 3, 2000: 4, 1993: 5} x6 = {'index': 2, 'APEX': 1, 'CSON': 2} x5 = {'index': 0, 1975: 8, 1959: x9, 1990: 11} x4 = {'index': 2, 'APEX': x7, 'CSON': x8} x3 = {'index': 0, 1975: 0, 1959: x6, 1990: 3} x2 = {'index': 1, 'YAML': x3, 'AWK': x4, 'KICAD': x5} x1 = {'index': 4, 2000: x2, 1983: 12, 2020: 13} cursor = x1 while not isinstance(cursor[data[cursor['index']]], int): cursor = cursor[data[cursor['index']]] return cursor[data[cursor['index']]]" "b = ['x3', {'1961': ['x1', {'2005': ['x2', {'LATTE': 0, 'SELF': 1}], '1962': 2, '2017': 3}], '1998': 4, '1957': ['x1', {'2005': ['x2', {'LATTE': 5, 'SELF': 6}], '1962': 7, '2017': ['x0', {'2014': 8, '2009': 9, '1973': 10}]}]}] def main(x): return calc(x=x, t=b) def calc(x, t): if type(t) == int: return t n = int(t[0][1:]) return calc(x=x, t=t[1].get(str(x[n])))" "def main(n): if n[0] == 2016: return 12 elif n[0] == 2019: if n[2] == 1987: return 11 elif n[2] == 1988: return 10 elif n[2] == 1996: return 9 elif n[0] == 1978: return main2(n) def main2(z): if z[1] == 2008: if z[4] == 'ELM': return 5 elif z[4] == 'INI': if z[2] == 1987: return 8 elif z[2] == 1988: return 7 elif z[2] == 1996: return 6 elif z[1] == 2020: return main3(z) def main3(b): if b[2] == 1987: return 4 elif b[2] == 1988: return 3 elif b[2] == 1996: if b[3] == 'DYLAN': return 2 elif b[3] == 'NGINX': return 1 elif b[3] == 'CSV': return 0" "def gen11(x): if x[3] == 1965: return 0 elif x[3] == 2002: return 1 else: return 2 def gen12(x): if x[3] == 1965: return 3 elif x[3] == 2002: return 4 else: return 5 def gen21(x): if x[1] == 2011: return 6 else: return 7 def gen22(x): if x[3] == 1965: return 8 elif x[3] == 2002: return 9 else: return 10 def main(x): if x[2] == 1988 and x[1] == 2011: return gen11(x) elif x[2] == 1988 and x[1] == 1987: return gen12(x) elif x[2] == 1997 and x[0] == 2015: return gen21(x) elif x[2] == 1997 and x[0] == 1997: return gen22(x) else: return 11" "(a, b, c, d, e, f) = range(6) N = [{'flag': True, 'index': 2, 'SVG': b, 'PIKE': c}, {'flag': True, 'index': 0, 'YACC': d, 'CSS': e, 'SAS': f}, {'flag': False, 'index': 1, 1977: 8, 2012: 9}, {'flag': False, 'index': 3, 2017: 0, 1977: 1, 2000: 2}, {'flag': False, 'index': 1, 1977: 3, 2012: 4}, {'flag': False, 'index': 3, 2017: 5, 1977: 6, 2000: 7}] def main(input): rez = 0 for i in range(4): if N[rez].get('flag'): index = N[rez].get('index') rez = N[rez].get(input[index]) else: index = N[rez].get('index') rez = N[rez].get(input[index]) break return rez" "def main(x): if x[0] == 1967: return func1(x) elif x[0] == 1980: return func3(x) elif x[0] == 2016: return func5(x) def func1(x): if x[1] == 'ARC': return func2(x) elif x[1] == 'LIMBO': return 3 def func2(x): if x[2] == 'GLSL': return 0 elif x[2] == 'RDOC': return 1 elif x[2] == 'E': return 2 def func3(x): if x[2] == 'GLSL': return func4(x) elif x[2] == 'RDOC': return 6 elif x[2] == 'E': return 7 def func4(x): if x[3] == 2012: return 4 elif x[3] == 2005: return 5 def func5(x): if x[1] == 'ARC': return 8 elif x[1] == 'LIMBO': return 9" "def main(x): if x[3] == 1976: return F1(x) elif x[3] == 2018: return 11 def F1(x): if x[0] == 1995: return F2(x) elif x[0] == 2006: return F5(x) elif x[0] == 1973: return 10 def F2(x): if x[2] == 'JAVA': return F3(x) elif x[2] == 'PIKE': return F4(x) def F3(x): if x[4] == 'VALA': return 0 elif x[4] == 'XTEND': return 1 elif x[4] == 'HAML': return 2 def F4(x): if x[1] == 'SVG': return 3 elif x[1] == 'MASK': return 4 elif x[1] == 'NSIS': return 5 def F5(x): if x[2] == 'JAVA': return F6(x) elif x[2] == 'PIKE': return 9 def F6(x): if x[4] == 'VALA': return 6 elif x[4] == 'XTEND': return 7 elif x[4] == 'HAML': return 8" "def main(x): if x[4] == 'NGINX': return F1(x) elif x[4] == 'LLVM': return F2(x) else: return 13 def F1(x): if x[0] == 'CSV': return F3(x) elif x[0] == 'GDB': return 3 else: return 4 def F2(x): if x[2] == 1989: return F4(x) else: return F5(x) def F3(x): if x[3] == 'SWIFT': return 0 else: return F6(x) def F6(x): if x[2] == 1989: return 1 else: return 2 def F4(x): if x[0] == 'CSV': return 5 elif x[0] == 'GDB': return F7(x) else: return 8 def F7(x): if x[1] == 'STATA': return 6 else: return 7 def F5(x): if x[3] == 'SWIFT': return F8(x) else: return 12 def F8(x): if x[0] == 'CSV': return 9 elif x[0] == 'GDB': return 10 else: return 11" "def main(x): a012 = {2020: 0, 2006: 1, 2018: 2} a567 = {2020: 5, 2006: 6, 2018: 7} a91011 = {2012: 9, 1990: 10, 2015: 11} if x[0] == 1972: if x[3] == 2012: return a012.get(x[2]) elif x[3] == 1990: return 3 if x[1] == 2004: return 4 return a567.get(x[2]) if x[2] == 2020: return 8 if x[2] == 2006: if x[4] == 'XBASE': return a91011.get(x[3]) if x[4] == 'LSL': return 12 return 13 return 14" "s = dict(TERRA={2003: {1968: 0, 1960: 1, 1958: 2}, 2012: {1968: 3, 1960: 4, 1958: 5}}, SMT=6, POD={2003: {1973: 7, 1970: 8}, 2012: 9}) def main(path): s1 = s[path[3]] if path[3] == 'TERRA': s2 = s1[path[0]] if path[0] == 2003: return s2[path[2]] else: return s2[path[2]] elif path[3] == 'SMT': return 6 elif path[3] == 'POD': s2 = s1[path[0]] if path[0] == 2003: return s2[path[1]] else: return 9" "def main(x): def check1(a, b, c): if x[2] == 'YANG': return a elif x[2] == 'EAGLE': return b elif x[2] == 'INI': return c def check2(a, b): if x[3] == 1968: return a elif x[3] == 1991: return b def check3(a, b, c): if x[4] == 2019: return a elif x[4] == 2010: return b elif x[4] == 1996: return c if x[0] == 1972: return 12 elif x[0] == 1958: return 11 elif x[0] == 2017: if x[1] == 'COBOL': return check1(check2(0, 1), 2, check2(3, 4)) elif x[1] == 'CHUCK': return check1(check2(5, 6), check3(7, 8, 9), 10)" "def main(x_list): d = {2019: 10, 1958: {'EQ': 7, 'CHUCK': 8, 'LFE': 9}, 1968: {'LFE': 6, 'CHUCK': {'LOGOS': 3, 'YANG': 4, 'ELM': 5}, 'EQ': {'LOGOS': 0, 'YANG': 1, 'ELM': 2}}} new_x = d for i in range(len(x_list) - 1, -1, -1): new_x = d x = d.setdefault(x_list[i], -1) if x == -1: d = new_x elif type(x) == int: return x else: d = x" "def main(x): def check1(a, b, c): if x[4] == 2004: return a elif x[4] == 1966: return b elif x[4] == 2016: return c def check2(a, b, c): if x[1] == 'EDN': return a elif x[1] == 'COOL': return b elif x[1] == 'JSON': return c if x[3] == 1982: if x[0] == 2016: return check1(check2(0, 1, 2), 3, check2(4, 5, 6)) elif x[0] == 1981: return 7 elif x[0] == 1989: return check1(check2(8, 9, 10), 11, 12) elif x[3] == 1969: return 13" "def main(x): def check_2(a, b, c): if x[2] == 2010: return a elif x[2] == 1999: return b elif x[2] == 2004: return c def check_0(a, b): if x[0] == 'CIRRU': return a elif x[0] == 'PAN': return b def check_3(a, b, c): if x[3] == 'EDN': return a elif x[3] == 'ABAP': return b elif x[3] == 'EJS': return c def check_1(): if x[1] == 'HACK': return check_3(check_2(0, 1, 2), 3, 4) elif x[1] == 'SQLPL': return check_3(check_0(5, 6), check_0(7, 8), check_2(9, 10, 11)) elif x[1] == 'YAML': return 12 if x[4] == 'LATTE': return check_1() elif x[4] == 'LASSO': return 13" "tree = {'tree': {'key': 1, 'XBASE': {'key': 3, 'GRACE': {'key': 0, 'PERL': {'key': 4, 1999: 0, 2010: 1}, 'MINID': 2, 'GO': {'key': 4, 1999: 3, 2010: 4}}, 'M4': {'key': 2, 1997: 5, 1992: 6}, 'OCAML': 7}, 'BOO': {'key': 4, 1999: {'key': 0, 'PERL': {'key': 3, 'GRACE': 8, 'M4': 9, 'OCAML': 10}, 'MINID': 11, 'GO': 12}, 2010: 13}, 'VUE': 14}} def main(x): flag = True k = 'key' path = tree['tree'] type_dict = type(tree) while flag: if type(path) == type_dict: key = path[k] path = path[x[key]] else: value = path flag = False return path" "def main(x): match x[1]: case 'LESS': return 11 case 'RDOC': match x[3]: case 1962: match x[0]: case 1966: return 6 case 1993: return 7 case 1975: return 8 case 2008: return 9 case 2001: return 10 case 'OPAL': match x[3]: case 1962: match x[2]: case 'CLEAN': return 0 case 'REBOL': return 1 case 2008: return 2 case 2001: match x[0]: case 1966: return 3 case 1993: return 4 case 1975: return 5" "def x3(x): if x[3] == 'LATTE': return 0 elif x[3] == 'M4': return 1 elif x[3] == 'BOO': return 2 def main(x): if x[1] == 2013 and x[0] == 2016: return x3(x) elif x[0] == 1984 and x[1] == 2013: return len(x[2]) elif x[0] == 1973: return 5 elif x[1] == 1989 and x[2] == 'SAS': return 6 + x3(x) elif x[2] == 'PIKE' and x[1] == 1989: return 9 + x3(x) else: return 12" "def tree(x): if x[0] == 'TOML': return 12 elif x[0] == 'MESON': return tree_meson(x) elif x[0] == 'D': return tree_D(x) def tree_meson(x): if x[1] == 'D': return 11 elif x[1] == 'SLASH': return 10 elif x[1] == 'XSLT': return tree_meson_xslt(x) def tree_meson_xslt(x): if x[2] == 'IDL': return 7 elif x[2] == 'SWIFT': return 8 elif x[2] == 'VUE': return 9 def tree_D(x): if x[1] == 'D': return 6 elif x[1] == 'SLASH': return slash(x) elif x[1] == 'XSLT': return tree_D_xslt(x) def tree_D_xslt(x): if x[2] == 'IDL': return 0 elif x[2] == 'SWIFT': return 1 elif x[2] == 'VUE': return 2 def slash(x): if int(x[3]) == 1996: return 3 elif x[3] == 2010: return 4 elif x[3] == 1982: return 5 def main(n): return tree(n)" "def main(x): x3a = {'ROFF': 0, 'LLVM': 1} x3b = {'ROFF': 2, 'LLVM': 3} x1a = {'SCSS': x3a[x[3]], 'IO': x3b[x[3]]} x2 = {'E': 4, 'RUST': 5} x1 = {'SCSS': 6, 'IO': 7} x3c = {'ROFF': x2[x[2]], 'LLVM': x1[x[1]]} x3d = {'ROFF': 8, 'LLVM': 9} x0 = {1996: x1a[x[1]], 2004: x3c[x[3]], 1983: x3d[x[3]]} return x0[x[0]]" "def main(x): def proc(d, g, h): if x[4] == 'SQF': return d elif x[4] == 'ABAP': return g elif x[4] == 'FORTH': return h def proc2(d, g, h): if x[0] == 'ZIMPL': return d elif x[0] == 'NCL': return g elif x[0] == 'D': return h if x[3] == 'FREGE': return 13 elif x[3] == 'GAMS': if x[1] == 'OPA': if x[0] == 'ZIMPL': return 0 elif x[0] == 'NCL': return proc(1, 2, 3) elif x[0] == 'D': return proc(4, 5, 6) elif x[1] == 'FANCY': return proc(proc2(7, 8, 9), 10, 11) elif x[1] == 'TOML': return 12" "def main(a): if a[3] == 1981: return up(a) elif a[3] == 1971: return down(a) def up(a): if a[4] == 'RUST': return rust(a) elif a[4] == 'LFE': return 2 elif a[4] == 'MTML': return mtml(a) def down(a): if a[1] == 2015: return 8 elif a[1] == 1960: return 9 def mtml(a): if a[0] == 2020: return rust(a) if a[0] == 2000: return last(a) if a[0] == 1999: return 7 def last(a): if a[2] == 'OPA': return 5 if a[2] == 'ASP': return 6 def rust(a): if a[4] == 'MTML': if a[2] == 'OPA': return 3 if a[2] == 'ASP': return 4 elif a[4] == 'RUST': if a[2] == 'OPA': return 0 if a[2] == 'ASP': return 1" "def x1(x): if x[1] == 1996: return 0 elif x[1] == 2019: return 1 elif x[1] == 1969: return 2 def main(x): if x[0] == 'BOO': if x[2] == 1958: return x1(x) elif x[2] == 2007: return x1(x) + 3 elif x[2] == 1979: return x1(x) + 6 elif x[0] == 'JSON5': if x[2] == 1958: return 9 elif x[2] == 2007: return 10 elif x[2] == 1979: return 11 elif x[0] == 'ALLOY': return 12" "def main(x): match x[0]: case 'ROUGE': match x[1]: case 2005: match x[4]: case 2008: return 0 case 1990: match x[3]: case 1982: return 1 case 1958: return 2 case 2001: match x[3]: case 1982: return 3 case 1958: match x[2]: case 2001: return 4 case 1969: return 5 case 'TXL': match x[3]: case 1982: match x[4]: case 2008: match x[2]: case 2001: return 6 case 1969: return 7 case 1990: match x[2]: case 2001: return 8 case 1969: return 9 case 1958: return 10 main(['ROUGE', 2005, 2001, 1982, 2008]) main(['TXL', 2001, 2001, 1958, 2008])" "def sub_1(x): if x[1] == 'CUDA': return 6 if x[1] == 'ANTLR': if x[0] == 'M4': return 3 elif x[0] == 'FANCY': return 4 elif x[0] == 'FREGE': return 5 if x[1] == 'IO': if x[0] == 'M4': return 0 elif x[0] == 'FANCY': return 1 elif x[0] == 'FREGE': return 2 def main(x): if x[3] == 'PIKE': if x[2] == 'APEX': return 7 elif x[2] == 'CLEAN': return 8 elif x[3] == 'EDN': return 9 elif x[3] == 'HLSL': return sub_1(x)" "def compare_zero(x, left, right): x0 = x[0] if x0 == 1977: return left if x0 == 2010: return right def compare_f(x, left, middle, right): x1 = x[1] if x1 == 1976: return left if x1 == 2016: return right if x1 == 1974: return middle def compare_second(x, left, middle, right): x2 = x[2] if x2 == 'MUPAD': return left if x2 == 'ECL': return middle if x2 == 'CMAKE': return right def compare_t(x, left, right): x3 = x[3] if x3 == 'ABAP': return left if x3 == 'GLSL': return right def compare_fourth(x, left, middle, right): x4 = x[4] if x4 == 1979: return left if x4 == 2017: return right if x4 == 2004: return middle def main(x): return compare_fourth(x, compare_second(x, compare_zero(x, compare_t(x, 0, 1), compare_f(x, 2, 3, 4)), 5, 6), 7, compare_second(x, 8, 9, 10))" "def main(x): match x[1]: case 2005: match x[0]: case 1964: match x[2]: case 'ELM': return 0 case 'VUE': return 1 case 1994: match x[3]: case 1979: return 2 case 1968: return 3 case 1977: return 4 case 2010: return 5 case 1967: match x[3]: case 1979: match x[2]: case 'ELM': return 6 case 'VUE': return 7 case 1968: match x[0]: case 1964: return 8 case 1994: return 9 case 2010: return 10 case 1977: return 11 case 1993: return 12" "def compare_z(x, left, middle, right): x0 = x[0] if x0 == 2015: return left if x0 == 2004: return middle if x0 == 1996: return right def compare_f(x, left, middle, right): x1 = x[1] if x1 == 1995: return left if x1 == 1961: return middle if x1 == 2016: return right def compare_s(x, left, middle, right): x2 = x[2] if x2 == 1979: return left if x2 == 1985: return middle if x2 == 2009: return right def compare_t(x, left, middle, right): x3 = x[3] if x3 == 'MTML': return left if x3 == 'CLIPS': return middle if x3 == 'CLICK': return right def main(x): return compare_t(x, compare_f(x, compare_z(x, 0, 1, 2), compare_s(x, 3, 4, 5), 6), 7, compare_z(x, compare_s(x, 8, 9, 10), 11, 12))" "def main(x): array = [['VHDL', 'EQ', 2012, x[3]], ['VHDL', 'COOL', 2012, x[3]], ['VHDL', 'RAGEL', 2012, x[3]], ['CMAKE', x[1], 2012, 1962], ['CMAKE', x[1], 2012, 1972], [x[0], 'EQ', 1971, 1962], [x[0], 'EQ', 1971, 1972], [x[0], 'COOL', 1971, x[3]], ['VHDL', 'RAGEL', 1971, x[3]], ['CMAKE', 'RAGEL', 1971, x[3]]] if x in array: return array.index(x)" "def main(x): dict4_r = {'MASK': 8, 'CUDA': 9} dict1 = {'REXX': 5, 'XBASE': 6, 'SAGE': 7} dict4_l = {'MASK': 3, 'CUDA': 4} dict0 = {1996: dict4_l[x[4]], 1963: dict1[x[1]], 2011: dict4_r[x[4]]} dict1_l = {'REXX': 0, 'XBASE': 1, 'SAGE': 2} dict3 = {'APL': dict1_l[x[1]], 'POD': dict0[x[0]], 'LASSO': 10} dict2 = {'EC': dict3[x[3]], 'SWIFT': 11, 'HY': 12} return dict2[x[2]]" "def main(x): if x[4] == 2004: return 11 elif x[4] == 1988: return 10 elif x[4] == 2015: return second(x) def second(x): if x[1] == 'BLADE': return blade(x) elif x[1] == 'P4': return p4(x) def blade(x): if x[3] == 'AWK': return 0 elif x[3] == 'VALA': return 3 elif x[3] == 'MUF': return muf(x) def muf(x): if x[0] == 'PIKE': return 1 elif x[0] == 'SCAML': return 2 def p4(x): if x[2] == 'ARC': return last1(x) elif x[2] == 'SAGE': return last2(x) def last1(x): if x[3] == 'AWK': return 4 elif x[3] == 'MUF': return 5 elif x[3] == 'VALA': return 6 def last2(x): if x[3] == 'AWK': return 7 elif x[3] == 'MUF': return 8 elif x[3] == 'VALA': return 9" "def main(x): if x[1] == 'XBASE': if x[0] == 'FREGE': list1 = {1986: 0, 1968: 1, 2004: 2} return list1[x[2]] if x[0] == 'LEAN': list2 = {1986: 3, 1968: 4, 2004: 5} return list2[x[2]] if x[0] == 'C': return 6 if x[1] == 'XS': if x[3] == 'FORTH': return 7 if x[3] == 'OX': list3 = {'FREGE': 8, 'LEAN': 9, 'C': 10} return list3[x[0]]" "def main(x): ans = {'M': {2003: {1976: {'SHEN': 0, 'TCL': 1, 'STON': 2}, 1969: 3, 1957: 4}, 2018: {'SHEN': {1958: 5, 1974: 6}, 'TCL': {1958: 7, 1974: 8}, 'STON': 9}, 1996: 10}, 'TWIG': 11} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] break return i" "def main(x): dict1 = {2008: 0, 1982: 1, 2012: 2} dict2 = {2008: 3, 1982: 4, 2012: 5} dict3 = {1963: 6, 1967: 7} dict4 = {2013: 8, 1970: 9, 2011: 10} if x[2] == 'FANCY': if x[0] == 2013: return dict1.get(x[1]) elif x[0] == 1970: return dict2.get(x[1]) elif x[0] == 2011: return dict3.get(x[3]) elif x[2] == 'BOO': return dict4.get(x[0]) return 11" "def main(data): x7 = {'index': 0, 2001: 10, 1986: 9, 2013: 8} x6 = {'index': 3, 'STATA': 6, 'VUE': 7} x5 = {'index': 3, 'STATA': 2, 'VUE': 3} x4 = {'index': 2, 1991: 0, 1975: 1} x3 = {'index': 2, 1991: x6, 1975: x7} x2 = {'index': 0, 2013: x4, 1986: x5, 2001: 4} x1 = {'index': 1, 1966: x2, 1967: 5, 2006: x3} cursor = x1 while not isinstance(cursor[data[cursor['index']]], int): cursor = cursor[data[cursor['index']]] return cursor[data[cursor['index']]]" "def main(args): dirict3 = {'SQL': 0, 'JSON': 1} dirict4 = {'QML': 2, 'HACK': 3, 'XPROC': 4} dirict2 = {'QML': 5, 'HACK': 6, 'XPROC': 7} dirict0 = {'IOKE': dirict3[args[3]], 'JSON5': dirict2[args[2]], 'GLYPH': dirict4[args[2]]} dirict1 = {'JAVA': dirict0[args[0]], 'APEX': 8, 'MUPAD': 9} return dirict1[args[1]]" "def main(args): dict2 = {1983: 0, 2016: 1} dict4 = {1963: 3, 1979: 4, 1999: 5} dict5 = {1992: dict2[args[2]], 1986: 2, 1960: dict4[args[4]]} dict6 = {1992: 6, 1986: 7, 1960: 8} dict0 = {1992: 9, 1986: 10, 1960: 11} dict1 = {1987: dict5[args[0]], 1984: dict6[args[0]], 2002: dict0[args[0]]} dict3 = {'ABAP': dict1[args[1]], 'FISH': 12, 'CLIPS': 13} return dict3[args[3]]" "def choicex2(cond, x): if cond == 1993: return x return x + 1 def choicex3(cond, x): if cond == 'PUG': return x elif cond == 'METAL': return x + 1 return x + 2 def main(x): if x[1] == 'GDB': if x[2] == 1993: return choicex3(x[3], 0) return choicex3(x[3], 3) if x[3] == 'PUG': return choicex2(x[2], 6) elif x[3] == 'METAL': return choicex2(x[2], 8) return 10" "def main(x): if x[3] == 1983: return right(x) elif x[3] == 1973: return middle(x) elif x[3] == 2017: return 10 def right(x): if x[2] == 'DIFF': if x[1] == 2013: return 0 elif x[1] == 1997: return 1 elif x[2] == 'PHP': return 2 elif x[2] == 'XS': if x[0] == 'XSLT': return 3 elif x[0] == 'PAWN': return 4 elif x[0] == 'XPROC': return 5 def middle(x): if x[1] == 1997: return 9 elif x[1] == 2013: if x[2] == 'DIFF': return 6 elif x[2] == 'PHP': return 7 elif x[2] == 'XS': return 8" "def decompose_0(x): if x == 'BRO': return 0 return 1 def decompose_1(x): if x == 1982: return 3 return 4 def decompose_2(x): if x == 'BRO': return 7 return 8 def decompose_3(x): if x == 'REBOL': return 5 return 6 def main(x): if x[2] == 'UNO': if x[1] == 2019: if x[0] == 1982: return decompose_0(x[3]) return 2 if x[1] == 1957: if x[4] == 'SQL': return decompose_1(x[0]) return decompose_3(x[4]) if x[1] == 1970: if x[4] == 'SQL': return decompose_2(x[3]) if x[4] == 'REBOL': return 9 if x[4] == 'SCAML': return 10 return 11" "def main(x): match x[3]: case 1996: match x[2]: case 'PONY': match x[1]: case 2010: return 0 case 1962: return 1 case 2003: return 2 case 'NL': return 3 case 'NCL': match x[0]: case 2004: return 4 case 1990: return 5 case 1997: return 6 case 1975: match x[1]: case 2010: match x[0]: case 2004: return 7 case 1990: return 8 case 1997: return 9 case 1962: return 10 case 2003: return 11" "def main(x): dict_1961_2017_2009 = {'QMAKE': 0, 'DYLAN': 1} dict_1961_1988_QMAKE = {2009: 4, 1977: 5, 1965: 6} dict_1961_1988_DYLAN = {2009: 7, 1977: 8, 1965: 9} dict_all = {1992: 10, 1982: 11, 1977: 2, 1965: 3} if x[4] == 1961: if x[1] == 2017: if x[3] == 2009: return dict_1961_2017_2009.get(x[0]) return dict_all.get(x[3]) elif x[1] == 1988: if x[0] == 'QMAKE': return dict_1961_1988_QMAKE.get(x[3]) elif x[0] == 'DYLAN': return dict_1961_1988_DYLAN.get(x[3]) return dict_all.get(x[4])" "def main(x): slov_2017_MINID = {1968: 0, 1971: 1, 2014: 2} slov_2017_IDL = {1968: 3, 1971: 4, 2014: 5} slov_2001_1973 = {1968: 6, 1971: 7, 2014: 8} slov_all = {1994: 9, 1983: 10} if int(x[1]) == 2017: if x[2] == 'MINID': return slov_2017_MINID.get(x[0]) elif x[2] == 'IDL': return slov_2017_IDL.get(x[0]) elif int(x[1]) == 2001: if int(x[3]) == 1973: return slov_2001_1973.get(x[0]) elif int(x[3]) == 1994: return 9 else: return 10" "def main(x): if x[1] == 'D': return main2_1(x) if x[1] == 'MAX': return main2_2(x) if x[1] == 'STATA': return 10 def main2_1(x): if x[2] == 2020: return main3_1(x) if x[2] == 1998: return main0_1(x) if x[2] == 1994: return main0_2(x) def main2_2(x): if x[2] == 2020: return main3_2(x) if x[2] == 1998: return 8 if x[2] == 1994: return 9 def main3_1(x): if x[3] == 2012: return 0 if x[3] == 1994: return 1 def main3_2(x): if x[3] == 2012: return 6 if x[3] == 1994: return 7 def main0_1(x): if x[0] == 'EBNF': return 2 if x[0] == 'TEX': return 3 def main0_2(x): if x[0] == 'EBNF': return 4 if x[0] == 'TEX': return 5" "def func_1(x): if x[1] == 1984: return 13 elif x[1] == 1993: return func_1_1(x) def func_1_1(x): if x[0] == 1999: return 12 elif x[0] == 2009: return 11 elif x[0] == 1977: return func_1_1_1(x) def func_1_1_1(x): if x[3] == 'IO': return 10 elif x[3] == 'STON': return 9 def func_2(x): if x[0] == 1999: return 8 elif x[0] == 2009: return 7 elif x[0] == 1977: return 6 def func_3(x): if x[1] == 1984: return func_3_1(x) elif x[1] == 1993: return func_3_2(x) def func_3_1(x): if x[3] == 'IO': return 5 elif x[3] == 'STON': return 4 def func_3_2(x): if x[0] == 1999: return func_3_2_1(x) elif x[0] == 2009: return 1 elif x[0] == 1977: return 0 def func_3_2_1(x): if x[3] == 'IO': return 3 elif x[3] == 'STON': return 2 def main(x): value = -1 if x[4] == 1984: value = func_1(x) elif x[4] == 1985: value = func_2(x) elif x[4] == 1987: value = func_3(x) return value" "def main(x): x3a = {'SAS': 0, 'MQL4': 1} x2a = {'M': 2, 'MAX': 3} x3b = {'SAS': 4, 'MQL4': 5} x0 = {'LASSO': x3a[x[3]], 'AMPL': x2a[x[2]], 'MUF': x3b[x[3]]} x2b = {'M': 8, 'MAX': 9} x1b = {'NL': 7, 'XML': x2b[x[2]]} x1a = {'NL': x0[x[0]], 'XML': 6} x3c = {'SAS': x1b[x[1]], 'MQL4': 10} x4 = {1963: x1a[x[1]], 2003: x3c[x[3]], 2016: 11} return x4[x[4]]" "def main(find_text): tree = {'PERL': {'NIX': {'IDRIS': {'APEX': 0, 'XTEND': 1}, 'XTEND': {'APEX': 2, 'XTEND': 3}, 'NGINX': 4}, 'LLVM': {'IDRIS': {'APEX': 5, 'XTEND': 6}, 'XTEND': 7, 'NGINX': 8}}, 'OZ': 9, 'TWIG': 10} way = tree for key in find_text: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value continue" "def main(data: tuple): match data[3]: case 'METAL': return layer_1(data) case 'JULIA': return 12 def layer_1(data: tuple): match data[1]: case 1962: return layer_2(data) case 2020: return layer_3(data) case 1981: return layer_4(data) def layer_2(data: tuple): match data[4]: case 'SMALI': return 0 case 'SWIFT': return layer_5(data) case 'DYLAN': return layer_6(data) def layer_3(data: tuple): match data[4]: case 'SMALI': return 5 case 'SWIFT': return 6 case 'DYLAN': return layer_7(data) def layer_4(data: tuple): match data[0]: case 'VCL': return layer_8(data) case 'CLEAN': return 11 def layer_5(data: tuple): match data[2]: case 'COBOL': return 1 case 'J': return 2 def layer_6(data: tuple): match data[2]: case 'COBOL': return 3 case 'J': return 4 def layer_7(data: tuple): match data[2]: case 'COBOL': return 7 case 'J': return 8 def layer_8(data: tuple): match data[2]: case 'COBOL': return 9 case 'J': return 10" "(a, b, c, d, e) = range(5) N = [{'flag': True, 'index': 1, 1992: b, 2012: 8, 1960: 9}, {'flag': True, 'index': 0, 2015: c, 1962: d, 1987: e}, {'flag': False, 'index': 2, 'VCL': 0, 'FREGE': 1, 'NL': 2}, {'flag': False, 'index': 2, 'VCL': 3, 'FREGE': 4, 'NL': 5}, {'flag': False, 'index': 3, 1995: 6, 2006: 7}] def main(input): rez = 0 for i in range(4): try: if N[rez].get('flag'): index = N[rez].get('index') rez = N[rez].get(input[index]) else: index = N[rez].get('index') rez = N[rez].get(input[index]) break except IndexError: break return rez" "def main(x): dict1_r = {'CIRRU': 0, 'BRO': 1, 'GAMS': 2} dict1_l = {'CIRRU': 3, 'BRO': 4, 'GAMS': 5} dict3_r = {2000: dict1_r[x[1]], 1991: dict1_l[x[1]]} dict3_l = {2000: 8, 1991: 9} dict2 = {'KICAD': 6, 'ASP': 7, 'COBOL': dict3_l[x[3]]} dict0 = {1996: dict3_r[x[3]], 1983: dict2[x[2]], 1971: 10} dict4 = {1998: dict0[x[0]], 1961: 11, 1960: 12} return dict4[x[4]]" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n7_5 = Node(9, [], []) n7_4 = Node(8, [], []) n7_3 = Node(7, [], []) n7_2 = Node(11, [], []) n7_1 = Node(10, [], []) n7 = Node(x[0], [2001, 1957, 1969], [n7_3, n7_4, n7_5]) n6_3 = Node(6, [], []) n6_2 = Node(5, [], []) n6_1 = Node(4, [], []) n6 = Node(x[1], ['TERRA', 'SASS', 'LUA'], [n6_1, n6_2, n6_3]) n5_4 = Node(2, [], []) n5_3 = Node(1, [], []) n5_2 = Node(0, [], []) n5_1 = Node(3, [], []) n5 = Node(x[0], [2001, 1957, 1969], [n5_2, n5_3, n5_4]) n4_1 = Node(12, [], []) n4 = Node(x[3], [1963, 1965, 1976], [n7, n7_1, n7_2]) n3 = Node(x[3], [1963, 1965, 1976], [n5, n5_1, n6]) n2_2 = Node(14, [], []) n2_1 = Node(13, [], []) n2 = Node(x[4], [1967, 2018, 1969], [n3, n4, n4_1]) n = Node(x[2], [2008, 1993, 2001], [n2, n2_1, n2_2]) while n: res = n n = n.find_next() return res.data main([1957, 'SASS', 2001, 1963, 2018])" "def main(x): x1a = {'HYPHY': 0, 'NESC': 1, 'QMAKE': 2} x3 = {'TOML': 3, 'PONY': x1a[x[1]]} x2ba = {'SASS': 5, 'HAXE': 6, 'TXL': 7} x2bb = {'SASS': 8, 'HAXE': 9, 'TXL': 10} x1b = {'QMAKE': 11, 'NESC': x2bb[x[2]], 'HYPHY': x2ba[x[2]]} x0a = {2015: 4, 1988: x3[x[3]]} x0b = {2015: 12, 1988: x1b[x[1]]} x4 = {'SLIM': x0a[x[0]], 'IOKE': x0b[x[0]]} return x4[x[4]]" "def main(data: tuple): match data[1]: case 'PONY': return layer_1(data) case 'LEX': return 11 def layer_1(data: tuple): match data[4]: case 'GAMS': return layer_2(data) case 'YANG': return layer_3(data) case 'HTTP': return 10 def layer_2(data: tuple): match data[2]: case 'BISON': return 0 case 'PAN': return layer_4(data) case 'CLEAN': return 4 def layer_3(data: tuple): match data[0]: case 'JAVA': return layer_5(data) case 'NINJA': return 5 case 'HAXE': return 9 def layer_4(data: tuple): match data[0]: case 'NINJA': return 1 case 'JAVA': return 2 case 'HAXE': return 3 def layer_5(data: tuple): match data[3]: case 'HAML': return 6 case 'NINJA': return 7 case 'ROUGE': return 8" "def f_3(a, b, c): if a == 2004: return f_2(b, c) elif a == 2020: return 9 elif a == 1961: return 10 def f_2(b, c): if b == 2008: return f_1(c) if b == 1994: return f_1(c) + 3 if b == 2013: return f_1(c) + 6 def f_1(c): if c == 1958: return 0 elif c == 1989: return 1 elif c == 2006: return 2 def main(x): if x[2] == 'VCL': return 11 elif x[2] == 'ABAP': return f_3(x[3], x[1], x[0])" "import math def main(x): dict1 = {'RHTML': 0, 'MTML': 1, 'YACC': 2} dict2 = {'RHTML': 3, 'MTML': 4, 'YACC': 5} dict3 = {'RHTML': 6, 'MTML': 7, 'YACC': 8} dict4 = {'RHTML': 9, 'MTML': 10, 'YACC': 11} if x[4] == 'EQ': if x[1] == 1986: if x[2] == 1971: return dict1.get(x[0]) elif x[2] == 1980: return dict2.get(x[0]) elif x[2] == 1957: return dict3.get(x[0]) elif x[1] == 1975: return dict4.get(x[0]) elif x[4] == 'TERRA': return 12 return 13" "def main(x): dict3up = {'RAML': 0, 'BOO': 1, 'GRACE': 2} dict3down = {'RAML': 4, 'BOO': 5, 'GRACE': 6} dict4 = {1964: 8, 1993: 9, 1957: 10} dict3 = {'RAML': dict4[x[4]], 'BOO': 11, 'GRACE': 12} dict1up = {'BLADE': dict3up[x[3]], 'REXX': 3} dict1down = {'BLADE': dict3down[x[3]], 'REXX': 7} dict2 = {'VOLT': dict1up[x[1]], 'OPA': dict1down[x[1]], 'CIRRU': dict3[x[3]]} dict0 = {1977: 13, 1992: dict2[x[2]]} return dict0[x[0]]" "def func1(x): if x[0] == 1999: return 11 elif x[0] == 2011: return 10 elif x[2] == 2008: return 8 else: return 9 def func2(x): if x[0] == 1973: if x[2] == 2008: return 0 else: return 1 elif x[0] == 2011: if x[2] == 2008: return 2 else: return 3 elif x[1] == 'VCL': return 4 elif x[1] == 'PAWN': return 5 else: return 6 def main(x): if x[3] == 'NUMPY': return 7 elif x[3] == 'XSLT': return func1(x) else: return func2(x)" "def main(x): if x[3] == 1959: return x4(x) elif x[3] == 2011: return 10 def x4(x): if x[4] == 1966: return x0_up(x) elif x[4] == 2012: return x1_down(x) def x0_up(x): if x[0] == 2001: return 0 if x[0] == 1997: return 1 if x[0] == 1981: return x1_up(x) def x1_up(x): if x[1] == 1958: return 2 if x[1] == 1973: return 3 def x1_down(x): if x[1] == 1958: return x0_down(x) if x[1] == 1973: return x2(x) def x0_down(x): if x[0] == 2001: return 4 if x[0] == 1997: return 5 if x[0] == 1981: return 6 def x2(x): if x[2] == 2018: return 7 if x[2] == 1967: return 8 if x[2] == 2019: return 9" "def main(x): x242 = {1962: 8, 1971: 9, 2008: 10} x42 = {1959: x242[x[2]], 1974: 11, 1998: 12} x41 = {1959: 5, 1974: 6, 1998: 7} x1 = {1963: x41[x[4]], 1957: x42[x[4]]} x22 = {1963: 2, 1957: 3} x21 = {1963: 0, 1957: 1} x2 = {1962: x21[x[1]], 1971: x22[x[1]], 2008: 4} x0 = {'CHUCK': x2[x[2]], 'AGDA': x1[x[1]], 'P4': 13} return x0[x[0]]" "def main_alt2_second_layer(x): if x[0] == 2008: return 9 elif x[0] == 2000: return 10 def main_alt_second_layer(x): if x[0] == 2008: return 7 elif x[0] == 2000: return 8 def main_second_layer(x): if x[1] == 'FREGE': return main_alt_second_layer(x) elif x[1] == 'AWK': return main_alt2_second_layer(x) elif x[1] == 'TEA': return 11 def second_layer(x): if x[3] == 'HTML': return main_second_layer(x) elif x[3] == 'TERRA': return 12 def alt_first_layer(x): if x[0] == 2008: return 3 elif x[0] == 2000: return 4 def main_alt_first_layer(x): if x[2] == 2019: return 1 elif x[2] == 1968: return 2 def main_first_layer(x): if x[3] == 'HTML': return 0 elif x[3] == 'TERRA': return main_alt_first_layer(x) def first_layer(x): if x[1] == 'FREGE': return main_first_layer(x) elif x[1] == 'AWK': return alt_first_layer(x) elif x[1] == 'TEA': return 5 def main(x): if x[4] == 1968: return first_layer(x) elif x[4] == 2017: return 6 elif x[4] == 2012: return second_layer(x) main([2008, 'FREGE', 2019, 'TERRA', 2012])" "def main(array): list = [{4: 'JAVA', 2: 1967, 3: 'LFE', 'value': 0}, {4: 'JAVA', 2: 1967, 3: 'STON', 'value': 1}, {4: 'JAVA', 2: 1967, 3: 'ABNF', 0: 1968, 'value': 2}, {4: 'JAVA', 2: 1967, 3: 'ABNF', 0: 2007, 'value': 3}, {4: 'JAVA', 2: 1967, 3: 'ABNF', 0: 2016, 'value': 4}, {4: 'JAVA', 2: 1966, 1: 'XML', 0: 1968, 'value': 5}, {4: 'JAVA', 2: 1966, 1: 'XML', 0: 2007, 'value': 6}, {4: 'JAVA', 2: 1966, 1: 'XML', 0: 2016, 'value': 7}, {4: 'JAVA', 2: 1966, 1: 'X10', 3: 'LFE', 'value': 8}, {4: 'JAVA', 2: 1966, 1: 'X10', 3: 'STON', 'value': 9}, {4: 'JAVA', 2: 1966, 1: 'X10', 3: 'ABNF', 'value': 10}, {4: 'JAVA', 2: 1966, 1: 'PERL6', 'value': 11}, {4: 'XS', 'value': 12}] for element in list: error = 0 for key in element: if key == 'value': continue if element[key] != array[key]: error = 1 if error == 0: return element['value']" "def three(items, left, right): if items[3] == 'COOL': return left if items[3] == 'SWIFT': return right def four(items, left, right): if items[4] == 1985: return left if items[4] == 1981: return right def two(items, left, middle, right): if items[2] == 'REXX': return left if items[2] == 'HY': return middle if items[2] == 'FANCY': return right def one(items, left, right): if items[1] == 'AMPL': return left if items[1] == 'BOO': return right def zero(items, left, middle, right): if items[0] == 1998: return left if items[0] == 1991: return middle if items[0] == 2010: return right def main(items): return four(items, one(items, zero(items, three(items, 0, 1), 2, two(items, 3, 4, 5)), two(items, zero(items, 6, 7, 8), three(items, 9, 10), 11)), 12)" "def main(f): match f[0]: case 2000: return 5 case 1989: match f[2]: case 'HAXE': return 9 case 'STAN': return 10 case 'KICAD': match f[3]: case 'DART': return 6 case 'NIX': return 7 case 'GAMS': return 8 case 1961: match f[2]: case 'STAN': return 4 case 'HAXE': match f[1]: case 'DIFF': return 3 case 'PAWN': return 2 case 'KICAD': match f[1]: case 'PAWN': return 0 case 'DIFF': return 1" "def zero(items, left, right, middle): if items[0] == 'RAML': return left if items[0] == 'TEA': return middle if items[0] == 'XTEND': return right def two(items, left, right): if items[2] == 'PERL6': return left if items[2] == 'LLVM': return right def one(items, left, right): if items[1] == 'JSON': return left if items[1] == 'PLSQL': return right def three(items, left, right, middle): if items[3] == 'AMPL': return left if items[3] == 'YANG': return middle if items[3] == 'LUA': return right def main(items): return three(items, one(items, zero(items, 0, 2, 1), two(items, 3, 4)), one(items, zero(items, 6, 8, 7), 9), 5)" "def main(x): if x[0] == 1999: if x[4] == 2007: dict1 = {'R': 1, 'MIRAH': 2, 'JSON5': 3} dict2 = {'KRL': 0, 'GENIE': dict1[x[1]], 'PERL6': 4} return dict2[x[3]] else: return 5 elif x[0] == 1964: if x[2] == 'GDB': dict1 = {'R': 7, 'MIRAH': 8, 'JSON5': 9} dict2 = {2007: dict1[x[1]], 2008: 10} return dict2[x[4]] else: return 6" "def x_2(x1, x2, x): if x1 == 2004: if x2 == 1981: return x_0(x[0], x) elif x2 == 1996: return 5 else: return 6 elif x1 == 2005: if x2 == 1981: return x_3(x[0], x[1], x[2], x[3], x) elif x2 == 1996: return 11 else: return 12 def x_0(x0, x): if x0 == 2006: return x_3(x[0], x[1], x[2], x[3], x) elif x0 == 1975: return 0 else: return 4 def x_3(x0, x1, x2, x3, x): if x0 == 2006 and x1 == 2004: if x3 == 'YANG': return 1 elif x3 == 'GAMS': return 2 else: return 3 elif x2 == 1981: if x3 == 'YANG': return x_4(x[4]) elif x3 == 'GAMS': return 9 else: return 10 def x_4(x4): if x4 == 'NESC': return 7 else: return 8 def main(x): if x[1] == 2004 or x[1] == 2005: return x_2(x[1], x[2], x) else: return 13" "def f1(x): if x[1] == 1968: return r1[0] elif x[1] == 1992: return r1[1] elif x[1] == 1981: return r1[2] def f4_1(x): if x[4] == 'ELM': return 0 elif x[4] == 'SQF': return f1(x) def f4_2(x): if x[4] == 'ELM': return 9 elif x[4] == 'SQF': return 10 def f2(x): if x[2] == 1996: return 4 elif x[2] == 2012: return 5 elif x[2] == 1980: return f1(x) def f3(x): global r1 if x[3] == 1963: r1 = [1, 2, 3] return f4_1(x) elif x[3] == 1969: r1 = [6, 7, 8] return f2(x) elif x[3] == 2018: return f4_2(x) def f0(x): if x[0] == 'HY': return 11 elif x[0] == 'XOJO': return f3(x) def main(x): return f0(x)" "class Node(object): def __init__(self, condition='', value='123'): self.kids = [] self.condition = condition self.value = value def add_node(self, new_node): self.kids.append(new_node) def run(self, dict): if len(self.kids) == 0: return self.value else: for i in self.kids: for j in dict: if i.condition == j: return i.run(dict) def main(a): nodemain = Node() node1 = Node(condition=1960) node2 = Node(condition=1991) node11 = Node(condition='JSON5') node12 = Node(condition='EJS') node13 = Node(condition='YANG', value=6) node111 = Node(condition=2001, value=0) node112 = Node(condition=1975, value=1) node121 = Node(condition=2001, value=2) node122 = Node(condition=1975) node1221 = Node(condition=1998, value=3) node1222 = Node(condition=1971, value=4) node1223 = Node(condition=1980, value=5) node21 = Node(condition=2001) node22 = Node(condition=1975, value=11) node211 = Node(condition='JSON5', value=7) node212 = Node(condition='EJS') node213 = Node(condition='YANG', value=10) node2121 = Node(condition='XSLT', value=8) node2122 = Node(condition='TCL', value=9) nodemain.add_node(node1) nodemain.add_node(node2) node1.add_node(node11) node1.add_node(node12) node1.add_node(node13) node11.add_node(node111) node11.add_node(node112) node12.add_node(node121) node12.add_node(node122) node122.add_node(node1221) node122.add_node(node1222) node122.add_node(node1223) node2.add_node(node21) node2.add_node(node22) node21.add_node(node211) node21.add_node(node212) node21.add_node(node213) node212.add_node(node2121) node212.add_node(node2122) return nodemain.run(a)" "def main(d): dict1 = {'LEAN': 0, 'YAML': 1} dict2 = {'LEAN': 3, 'YAML': 4} dict3 = {'RED': 5, 'NIX': 6, 'RUBY': 7} dict4 = {'RED': 8, 'NIX': 9, 'RUBY': 10} if d[2] == 'KIT': return 11 elif d[2] == 'ASN.1': if d[1] == 'LEAN': return dict3.get(str(d[0])) elif d[1] == 'YAML': return dict4.get(str(d[0])) elif d[2] == 'XS': if d[0] == 'RED': return dict1.get(str(d[1])) elif d[0] == 'RUBY': return dict2.get(str(d[1])) elif d[0] == 'NIX': return 2" "def main(x): match x[0]: case 2007: match x[2]: case 'SMT': match x[3]: case 'LOGOS': match x[1]: case 'NCL': return 0 case 'POD': return 1 case 'AMPL': return 2 case 'STATA': return 3 case 'KIT': match x[4]: case 1968: return 4 case 1975: return 5 case 2011: return 6 case 'NU': return 7 case 1977: match x[3]: case 'LOGOS': return 8 case 'STATA': match x[1]: case 'NCL': return 9 case 'POD': return 10 case 'AMPL': return 11 case 'KIT': return 12" "def main(x): slov_LOGOS_1961_HACK = {1974: 0, 2016: 1} slov_LOGOS_1963_2016 = {1960: 5, 1985: 6, 2012: 7} slov_LOGOS_1961 = {'OZ': 2, 'LASSO': 3} if x[2] == 'LOGOS': if x[1] == 1972: return 8 elif x[1] == 1961: if x[0] == 'HACK': return slov_LOGOS_1961_HACK.get(x[3]) else: return slov_LOGOS_1961.get(x[0]) elif x[1] == 1963: if x[3] == 1974: return 4 else: return slov_LOGOS_1963_2016.get(x[4]) else: return 9" "def compare_zero(x, left, right): x0 = x[0] if x0 == 'LEAN': return left if x0 == 'MUPAD': return right def compare_first(x, left, right): x1 = x[1] if x1 == 1977: return left if x1 == 2000: return right def compare_second(x, left, middle, right): x2 = x[2] if x2 == 'REXX': return left if x2 == 'XS': return middle if x2 == 'GOSU': return right def compare_third(x, left, right): x3 = x[3] if x3 == 'XC': return left if x3 == 'SQLPL': return right def compare_fourth(x, left, right): x4 = x[4] if x4 == 1959: return left if x4 == 1983: return right def main(x): return compare_fourth(x, compare_second(x, compare_first(x, 0, 1), 2, compare_first(x, compare_zero(x, 3, 4), compare_third(x, 5, 6))), compare_first(x, compare_zero(x, compare_second(x, 7, 8, 9), 10), 11))" "import math import random import copy tree = {'GN': {'XTEND': {1990: 0, 1957: 1, 1981: 2}, 'IDRIS': {1990: 3, 1957: 4, 1981: 5}, 'SQF': 6}, 'E': {1990: 7, 1957: {'XTEND': 8, 'IDRIS': 9, 'SQF': 10}, 1981: 11}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "def main(x): array = [['PUG', 2007, x[2], 1986], ['PUG', 2003, x[2], 1986], ['PUG', 2011, x[2], 1986], ['PUG', x[1], x[2], 1975], ['LSL', x[1], 1957, x[3]], ['LSL', x[1], 2014, x[3]], ['LSL', 2007, 1996, x[3]], ['LSL', 2003, 1996, x[3]], ['LSL', 2011, 1996, x[3]], ['JULIA', x[1], x[2], 1986], ['JULIA', x[1], x[2], 1975]] if x in array: return array.index(x)" "import math def func1(x): if x[2] == 'ALLOY': if x[1] == 1971: if x[0] == 1977: return 7 elif x[0] == 2007: return 8 elif x[0] == 1989: return 9 if x[1] == 2018: if x[3] == 'PONY': return 3 elif x[3] == 'SLASH': return 4 elif x[3] == 'ZIMPL': return 5 def func2(x): if x[2] == 'OPAL': if x[0] == 1977: return 0 elif x[0] == 2007: return 1 elif x[0] == 1989: return 2 def main(x): if x[1] == 2018: if x[2] == 'OPAL': return func2(x) elif x[2] == 'ALLOY': return func1(x) elif x[1] == 1971: if x[2] == 'OPAL': return 6 elif x[2] == 'ALLOY': return func1(x) elif x[1] == 2000: return 10" "def main(mass): if mass[1] == 1987: return f611(mass) elif mass[1] == 1988: return f661(mass) def f611(mass): if mass[0] == 1984: return f631(mass) elif mass[0] == 1979: return f621(mass) def f621(mass): if mass[3] == 1991: return 3 elif mass[3] == 2012: return 4 elif mass[3] == 1961: return 5 def f631(mass): if mass[2] == 'TXL': return 0 elif mass[2] == 'BISON': return 1 elif mass[2] == 'NU': return 2 def f661(mass): if mass[3] == 1991: return 6 if mass[3] == 2012: return f651(mass) if mass[3] == 1961: return 10 def f651(mass): if mass[2] == 'TXL': return 7 if mass[2] == 'BISON': return 8 if mass[2] == 'NU': return 9" "def main(x): match x[4]: case 2019: match x[3]: case 'XC': match x[1]: case 'JFLEX': match x[0]: case 1964: return 0 case 1994: return 1 case 'HACK': match x[2]: case 2001: return 2 case 1974: return 3 case 2013: return 4 case 'CSV': match x[0]: case 1964: return 5 case 1994: return 6 case 'TOML': return 7 case 1972: match x[0]: case 1964: match x[2]: case 2001: match x[3]: case 'XC': return 8 case 'TOML': return 9 case 1974: return 10 case 2013: return 11 case 1994: return 12" "def one(arr, word): if word == 1976: if arr[1] == 'RUBY': return 3 elif arr[1] == 'JSON5': return two(arr, arr[1]) elif arr[1] == 'SQF': return two(arr, arr[1]) if word == 2015: if arr[1] == 'RUBY': return 8 elif arr[1] == 'JSON5': return 7 elif arr[1] == 'SQF': return three(arr, arr[1]) def two(arr, word): if word == 'JSON5': if arr[2] == 'SELF': return 0 elif arr[2] == 'LASSO': return 1 elif arr[2] == 'ADA': return 2 elif word == 'SQF': if arr[2] == 'SELF': return 4 elif arr[2] == 'LASSO': return 5 elif arr[2] == 'ADA': return 6 def three(arr, word): if arr[3] == 1989: return 9 elif arr[3] == 1965: return 10 elif arr[3] == 2007: return 11 def main(arr): word = arr[0] return one(arr, word)" "import math def main(x): x0r = {'EBNF': 1, 'JULIA': 2, 'VALA': 3} x1r = {1995: 9, 1986: 10} x3 = {2015: 0, 1958: x0r[x[0]], 1959: 4} x1l = {1995: 5, 1986: 6} x0l = {'EBNF': 7, 'JULIA': 8, 'VALA': x1r[x[1]]} x2 = {'TXL': x3[x[3]], 'SCALA': x1l[x[1]]} x3 = {2015: x0l[x[0]], 1958: 11, 1959: 12} x4 = {1994: x2[x[2]], 1981: x3[x[3]], 2015: 13} return x4[x[4]]" "def main(mass): if mass[3] == 'COQ': return f611(mass) elif mass[3] == 'IO': return f612(mass) elif mass[3] == 'PERL': return 9 def f611(mass): if mass[0] == 'ZIMPL': return f613(mass) elif mass[0] == 'ADA': return 3 elif mass[0] == 'COQ': return 4 def f612(mass): if mass[2] == 1989: return 5 elif mass[2] == 1994: return f614(mass) elif mass[2] == 1992: return 8 def f613(mass): if mass[2] == 1989: return 0 elif mass[2] == 1994: return 1 elif mass[2] == 1992: return 2 def f614(mass): if mass[1] == 2008: return 6 elif mass[1] == 2001: return 7" "def main(x): x1 = {'ASN.1': 0, 'SLIM': 1, 'SMT': 2} x2 = {'HCL': 5, 'NL': 6, 'PLSQL': 7} x3 = {1969: 9, 2009: 10} if x[0] == 1968: return 4 elif x[0] == 1969: if x[3] == 2009: return 3 elif x[3] == 1969: return x1[x[1]] elif x[0] == 2001: if x[1] == 'ASN.1': return x2[x[2]] elif x[1] == 'SLIM': return 8 elif x[1] == 'SMT': return x3[x[3]]" "def main(x): if x[0] == 1985: if x[2] == 'TEXT': dict1 = {'ARC': 1, 'HCL': 2} dict2 = {'JSON': 0, 'SHELL': dict1[x[3]], 'ATS': 3} return dict2[x[4]] elif x[2] == 'ADA': dict1 = {'VUE': 5, 'OPAL': 6} dict2 = {'JSON': 4, 'SHELL': dict1[x[1]], 'ATS': 7} return dict2[x[4]] else: return 8 elif x[0] == 1959: if x[1] == 'VUE': return 9 else: return 10 else: return 11" "def four(arr, word): if arr[4] == 'GOLO': return 8 elif arr[4] == 'HTTP': return one(arr, arr[4]) elif arr[4] == 'COQ': return three(arr, arr[4]) def one(arr, word): if arr[1] == 'LESS': return 0 elif arr[1] == 'ORG': return 1 def zero(arr, word): if word == 'JSON5': if arr[0] == 'ATS': return 2 elif arr[0] == 'HCL': return 3 elif arr[0] == 'GENIE': return 4 elif word == 'YACC': if arr[0] == 'ATS': return 5 elif arr[0] == 'HCL': return 6 elif arr[0] == 'GENIE': return 7 def three(arr, word): if arr[3] == 'JSON5': return zero(arr, arr[3]) elif arr[3] == 'YACC': return zero(arr, arr[3]) def two(arr, word): if arr[2] == 'DIFF': return 9 elif arr[2] == 'E': return 10 elif arr[2] == 'ELM': return four(arr, arr[2]) def main(arr): word = arr[2] return two(arr, word)" "def main(x): array = [[x[0], 'PONY', 'TOML', x[3], 'ABNF'], [x[0], 'PONY', 'ATS', x[3], 'ABNF'], ['REXX', 'PONY', 'STAN', x[3], 'ABNF'], ['TEX', 'PONY', 'STAN', x[3], 'ABNF'], ['CHUCK', 'PONY', 'STAN', x[3], 'ABNF'], [x[0], 'PONY', x[2], x[3], 'NESC'], [x[0], 'KRL', 'TOML', x[3], x[4]], [x[0], 'KRL', 'ATS', x[3], 'ABNF'], [x[0], 'KRL', 'ATS', x[3], 'NESC'], [x[0], 'KRL', 'STAN', 2009, x[4]], [x[0], 'KRL', 'STAN', 2020, x[4]], [x[0], 'KRL', 'STAN', 1982, x[4]]] if x in array: return array.index(x)" "def main(x): if x[4] == 2002: return 9 elif x[3] == 2002: if x[2] == 'HTML': return 3 elif x[1] == 'SELF': return 0 elif x[1] == 'FANCY': return 1 else: return 2 elif x[0] == 'MAKO': if x[2] == 'KRL': return 4 else: return 5 elif x[0] == 'GRACE': if x[2] == 'KRL': return 6 else: return 7 else: return 8" "def fourth(x, right, middle): if x[4] == 'R': return right if x[4] == 'ROUGE': return middle def third(x, right, middle, left): if x[3] == 'STON': return right if x[3] == 'PAN': return middle if x[3] == 'APL': return left def second(x, right, middle, left): if x[2] == 'NGINX': return right if x[2] == 'NUMPY': return middle if x[2] == 'PAN': return left def first(x, right, middle): if x[1] == 'MAKO': return right if x[1] == 'BISON': return middle def zero(x, right, middle, left): if x[0] == 1995: return right if x[0] == 1970: return middle if x[0] == 1997: return left def main(x): return second(x, fourth(x, third(x, zero(x, 0, 1, 2), zero(x, 3, 4, 5), first(x, 6, 7)), third(x, 8, zero(x, 9, 10, 11), 12)), 13, 14)" "def func_1(s): if 'CIRRU' in s: return 1 elif 'FREGE' in s: return 2 def func_2(s): if 'MUF' in s: return 5 elif 'ELM' in s: return 6 def func_3(s): if 1987 in s: return 7 elif 1989 in s: return 8 def func_4(s): if 'MUF' in s: return 9 elif 'ELM' in s: return 10 def func_5(s): if 'OPAL' in s: return 0 elif 'PIKE' in s: return func_1(s) def func_6(s): if 'CIRRU' in s: return 3 elif 'FREGE' in s: return 4 def func_7(s): if 'OPAL' in s: return func_2(s) elif 'PIKE' in s: return func_3(s) def func_8(s): if 1987 in s: return func_5(s) elif 1989 in s: return func_6(s) def func_9(s): if 'CIRRU' in s: return func_7(s) elif 'FREGE' in s: return func_4(s) def main(s): if 'ZIMPL' in s: return func_8(s) elif 'OZ' in s: return func_9(s) elif 'JSON' in s: return 11" "step_33 = {1959: [8, 'stop'], 1998: [9, 'stop']} step_32 = {1959: [4, 'stop'], 1998: [5, 'stop']} step_31 = {1989: [2, 'stop'], 2011: [3, 'stop']} step_30 = {1959: [0, 'stop'], 1998: [1, 'stop']} step_22 = {2017: [step_33, 3], 1971: [10, 'stop']} step_21 = {1989: [step_32, 2], 2011: [6, 'stop']} step_20 = {'LEAN': [step_30, 0], 'CHUCK': [step_31, 1]} step_11 = {'LEAN': [7, 'stop'], 'CHUCK': [step_22, 2]} step_10 = {2017: [step_20, 0], 1971: [step_21, 1]} step_00 = {2006: [step_10, 0], 1983: [step_11, 1]} list_of_steps = [[step_00], [step_10, step_11], [step_20, step_21, step_22], [step_30, step_31, step_32, step_33]] def main(x): result = {} cnt = 0 where_to_search = 0 while isinstance(result, dict): item = list_of_steps[cnt][where_to_search] for item_of_x in x: if item_of_x in item: cnt += 1 result = item[item_of_x][0] where_to_search = item[item_of_x][1] break return result" "def one(arr, word): if word == 'MAKO': if arr[1] == 1995: return 0 elif arr[1] == 2020: return 1 elif word == 'EJS': if arr[1] == 1995: return 2 elif arr[1] == 2020: return 3 def zero(arr, word): if arr[0] == 1981: return 7 elif arr[0] == 1992: return 8 elif arr[0] == 2004: return 9 def three(arr, word): if word == 2005: if arr[3] == 'MAKO': return one(arr, arr[3]) elif arr[3] == 'EJS': return one(arr, arr[3]) elif word == 2008: if arr[3] == 'MAKO': return 4 elif arr[3] == 'EJS': return 5 elif word == 1987: if arr[3] == 'MAKO': return 6 elif arr[3] == 'EJS': return zero(arr, arr[3]) def two(arr, word): if arr[2] == 2005: return three(arr, arr[2]) elif arr[2] == 2008: return three(arr, arr[2]) elif arr[2] == 1987: return three(arr, arr[2]) def main(arr): word = arr[2] return two(arr, word)" "def main(x): y0 = dict() y0['METAL'] = 0 y0['CLICK'] = 1 y0['MQL4'] = 2 y1 = dict() y1[1961] = 3 y1[2005] = 4 y1[2004] = 5 y2 = dict() y2['METAL'] = 6 y2['CLICK'] = 7 y2['MQL4'] = 8 y3 = dict() y3['METAL'] = 9 y3['CLICK'] = 10 y3['MQL4'] = 11 y01 = dict() y01['APEX'] = y0 y01['LFE'] = y1 y01['EC'] = y2 y02 = dict() y02['APEX'] = y3 y02['LFE'] = 12 y02['EC'] = 13 y001 = dict() y001['RED'] = y01 y001['CMAKE'] = y02 stage = y001.get(x[0]).get(x[2]) if type(stage) == int: return stage elif type(stage.get(x[1])) == int: return stage.get(x[1]) else: return stage.get(x[3])" "def main(x): y0 = dict() y0['NIM'] = 0 y0['EQ'] = 1 y1 = dict() y1['NIM'] = 3 y1['EQ'] = 4 y2 = dict() y2['BOO'] = 5 y2['C++'] = 6 y3 = dict() y3['BOO'] = 7 y3['C++'] = 8 y01 = dict() y01['BOO'] = y0 y01['C++'] = 2 y02 = dict() y02[1977] = y1 y02[1984] = y2 y02[2008] = y3 y001 = dict() y001['SELF'] = y01 y001['ANTLR'] = y02 y001['NU'] = 9 stage = y001.get(x[3]) if type(stage) == int: return stage elif type(stage.get(x[0])) == int: return stage.get(x[0]) elif type(stage.get(x[0])) == dict: return stage.get(x[0]).get(x[1]) else: stage = stage.get(x[2]) if type(stage.get(x[1])) == int: return stage.get(x[1]) else: return stage.get(x[0])" "def main(x): TREE = {'SLIM': {'BLADE': {'ALLOY': 0, 'SQL': 1}, 'INI': {'ALLOY': 2, 'SQL': 3}, 'SLASH': {'ALLOY': 4, 'SQL': 5}}, 'SLASH': {'ALLOY': {'BLADE': 6, 'INI': 7, 'SLASH': 8}, 'SQL': {'DART': 9, 'GAP': 10}}} if x[3] == 'SLIM': return TREE[x[3]][x[2]][x[1]] if x[3] == 'SLASH': val = TREE[x[3]][x[1]] try: return val[x[2]] except KeyError: return val[x[0]]" "def main(x): solution = {'ECL': {'SCAML': {'STAN': 0, 'VCL': 1}, 'XOJO': 2, 'NIT': {'STAN': 3, 'VCL': 4}}, 'FREGE': {'SCAML': 5, 'XOJO': {'STAN': 6, 'VCL': 7}, 'NIT': {'STAN': 8, 'VCL': 9}}, 'M': 10} a = solution[x[0]] if type(a) is int: return a else: a = a[x[1]] if type(a) is int: return a else: return a[x[2]]" "def line12(x): if x[3] == 1977: if x[0] == 2016: return 2 elif x[0] == 1983: return 3 else: return 4 def line1(x): if x[3] == 2005: return 0 elif x[3] == 1963: return 1 elif x[3] == 1977: return line12(x) def line22(x): if x[3] == 1977: if x[0] == 2016: return 8 elif x[0] == 1983: return 9 else: return 10 def line2(x): if x[3] == 2005: return 6 elif x[3] == 1963: return 7 elif x[3] == 1977: return line22(x) def main(x): if x[2] == 'SQLPL' and x[4] == 2014: return line1(x) elif x[2] == 'SQLPL' and x[4] == 1984: return 5 elif x[2] == 'SQLPL' and x[4] == 1992: return line2(x) elif x[2] == 'QML': return 11 elif x[2] == 'SELF': return 12" "def main(x): if x[4] == 'SWIFT': if x[3] == 'LSL': if x[2] == 'JAVA': return 0 else: return [2, 1][x[1] == 'SMALI'] elif x[3] == 'RUST': if x[0] == 'IDRIS': return [4, 3][x[1] == 'SMALI'] elif x[0] == 'SLIM': return 5 else: return 6 elif x[3] == 'TXL': if x[0] == 'IDRIS': return [8, 7][x[1] == 'SMALI'] elif x[0] == 'SLIM': return 9 else: return 10 else: return 11" "def main(x): if x[0] == 'SLIM': return x4(x) if x[0] == 'C': return x1(x) if x[0] == 'E': return x2(x) def x4(x): if x[4] == 1985: return x21(x) if x[4] == 1958: return x11(x) def x1(x): if x[1] == 'HLSL': return 7 if x[1] == 'FORTH': return 8 def x2(x): if x[2] == 'TOML': return 9 if x[2] == 'INI': return 10 if x[2] == 'VHDL': return 11 def x21(x): if x[2] == 'TOML': return 0 if x[2] == 'INI': return 1 if x[2] == 'VHDL': return 2 def x11(x): if x[1] == 'HLSL': return 3 if x[1] == 'FORTH': return x22(x) def x22(x): if x[2] == 'TOML': return 4 if x[2] == 'INI': return 5 if x[2] == 'VHDL': return 6" "def main(x): if x[0] == 'HAXE': return x2(x) elif x[0] == 'KRL': return 9 elif x[0] == 'FLUX': return 10 def x2(x): if x[2] == 'ELM': return x11(x) elif x[2] == 'MIRAH': return x12(x) elif x[2] == 'REBOL': return x13(x) def x11(x): if x[1] == 'JULIA': return 0 elif x[1] == 'TEX': return 1 elif x[1] == 'MESON': return 2 def x12(x): if x[1] == 'JULIA': return 3 elif x[1] == 'TEX': return 4 elif x[1] == 'MESON': return 5 def x13(x): if x[1] == 'JULIA': return 6 elif x[1] == 'TEX': return 7 elif x[1] == 'MESON': return 8" "def main(x): dict = {1991: {'CSS': {1961: 0, 1966: {'JSX': 1, 'JSON5': 2, 'TWIG': 3}}, 'NCL': {1961: 4, 1966: 5}, 'HTML': 6}, 2017: 7, 1992: {1961: {'JSX': 8, 'JSON5': 9, 'TWIG': 10}, 1966: 11}} if type(dict[x[4]]) == int: return dict[x[4]] temp_x = dict[x[4]] if x[0] in temp_x.keys(): if type(temp_x[x[0]]) == int: return temp_x[x[0]] temp_x = temp_x[x[0]] if type(temp_x[x[1]]) == int: return temp_x[x[1]] return temp_x[x[1]][x[3]] if x[1] in temp_x.keys(): if type(temp_x[x[1]]) == int: return temp_x[x[1]] return temp_x[x[1]][x[3]]" "def main(x): match x[3]: case 2006: match x[2]: case 'PERL6': match x[4]: case 'OPAL': return 0 case 'ABNF': match x[0]: case 1972: return 1 case 1960: return 2 case 'CUDA': match x[0]: case 1972: return 3 case 1960: return 4 case 'NINJA': return 5 case 1981: match x[0]: case 1972: return 6 case 1960: match x[4]: case 'OPAL': return 7 case 'ABNF': return 8 case 'CUDA': return 9" "def main(x): if x[2] == 'JSON': return 8 elif x[2] == 'PERL6': return 9 elif x[2] == 'XML': return x_1(x) def x_1(x): if x[1] == 'APL': if x[4] == 1965: return 0 if x[4] == 2018: return 3 elif x[4] == 2020: return x_3(x) elif x[1] == 'E': if x[4] == 2020: return 6 elif x[4] == 2018: return 7 elif x[4] == 1965: return x_0(x) def x_3(x): if x[3] == 'ADA': return 1 elif x[3] == 'STATA': return 2 def x_0(x): if x[0] == 1997: return 4 elif x[0] == 2004: return 5" "def main(x): d = {'TEXT': {2000: {2011: {2013: 0, 2005: 1}, 2012: {1998: 2, 2000: 3, 1983: 4}}, 2009: 5, 1984: {1998: 6, 2000: 7, 1983: 8}}, 'ASN.1': 9} if type(d[x[3]]) == int: return d[x[3]] elif type(d[x[3]][x[0]]) == int: return d[x[3]][x[0]] elif x[0] == 2000: if x[1] == 2011: return d[x[3]][x[0]][x[1]][x[2]] elif x[1] == 2012: return d[x[3]][x[0]][x[1]][x[4]] elif x[0] == 1984: return d[x[3]][x[0]][x[4]]" "def main(x): if x[4] == 2008: return x2(x) elif x[4] == 1961: return 12 def x2(x): if x[2] == 2005: return x31(x) elif x[2] == 1978: return x01(x) elif x[2] == 1961: return 11 def x31(x): if x[3] == 2000: return x02(x) elif x[3] == 1965: return x03(x) def x01(x): if x[0] == 2018: return x32(x) elif x[0] == 1983: return 8 elif x[0] == 1986: return x[1] def x02(x): if x[0] == 2018: return 0 elif x[0] == 1983: return 1 elif x[0] == 1986: return 2 def x03(x): if x[0] == 2018: return 3 elif x[0] == 1983: return 4 elif x[0] == 1986: return 5 def x32(x): if x[3] == 2000: return 6 elif x[3] == 1965: return 7 def x1(x): if x[1] == 'EBNF': return 9 elif x[1] == 'NIM': return 10" "def main(x): match x[3]: case 1970: match x[0]: case 1974: match x[2]: case 1979: return 0 case 2018: return 1 case 1958: return 2 case 2017: match x[0]: case 1974: match x[2]: case 1979: match x[4]: case 'SLIM': return 3 case 'PUG': return 4 case 2018: match x[1]: case 'LIMBO': return 5 case 'JAVA': return 6 case 1958: return 7 case 2000: match x[0]: case 1974: return 8 case 1958: match x[2]: case 1979: match x[4]: case 'SLIM': return 9 case 'PUG': return 10 case 2018: return 11" "def first_branch(x): if x[0] == 'OPA': if x[1] == 'PIKE': return 0 elif x[1] == 'XTEND': return 1 elif x[1] == 'SLASH': if x[3] == 'DM': return 2 elif x[3] == 'IDRIS': return 3 elif x[0] == 'LIMBO': return 4 def second_branch(x): if x[0] == 'OPA': if x[2] == 'APL': return 5 elif x[2] == 'SASS': return 6 elif x[0] == 'LIMBO': if x[2] == 'APL': if x[1] == 'PIKE': return 7 elif x[1] == 'XTEND': return 8 elif x[1] == 'SLASH': return 9 elif x[2] == 'SASS': return 10 def main(x): if x[4] == 1988: return first_branch(x) elif x[4] == 2008: return second_branch(x)" "def main(x): if x[1] == 1985: if x[2] == 2007: if x[4] == 1990: return ['PLSQL', 'COQ', 'E'].index(x[3]) elif x[4] == 2017: return [1962, 1989, 1971].index(x[0]) + 3 elif x[2] == 2005: if x[0] == 1962: return [1990, 2017].index(x[4]) + 6 elif x[0] == 1989: return 8 elif x[0] == 1971: return [1990, 2017].index(x[4]) + 9 elif x[1] == 1986: return 11" "def first_branch(x): if x[4] == 'LLVM': if x[2] == 2013: if x[3] == 1987: return 0 elif x[3] == 2014: return 1 else: return 2 elif x[3] == 1987: return 3 elif x[3] == 2014: return 4 else: return 5 else: return 6 def second_branch(x): if x[3] == 1987: return 7 elif x[3] == 2014: return 8 elif x[0] == 'ECL': if x[2] == 2013: return 9 else: return 10 else: return 11 def main(x): if x[1] == 1959: return first_branch(x) elif x[1] == 2014: return second_branch(x)" "def main(x): if x[1] == 1984: if x[2] == 2003: return [2007, 1962].index(x[0]) else: return [1975, 1990].index(x[2]) + 2 elif x[1] == 1996: if x[0] == 2007: return [1972, 1969, 2003].index(x[3]) + 4 elif x[0] == 1962: return [1972, 1969, 2003].index(x[3]) + 7 elif x[1] == 1979: return 10" "def branch1(x): if x[2] == 'GAP': if x[1] == 'STON': if x[0] == 'AMPL': return 0 elif x[0] == 'PONY': return 1 elif x[1] == 'VHDL': return 2 elif x[1] == 'SQF': return 3 elif x[2] == 'MUPAD': return 4 def branch2(x): if x[1] == 'STON': return 5 elif x[1] == 'VHDL': return 6 elif x[1] == 'SQF': if x[0] == 'AMPL': if x[3] == 'IDRIS': return 7 if x[3] == 'VHDL': return 8 elif x[0] == 'PONY': if x[2] == 'GAP': return 9 elif x[2] == 'MUPAD': return 10 def main(x): if x[4] == 'EDN': return branch1(x) elif x[4] == 'SCALA': return branch2(x) elif x[4] == 'SMALI': return 11" "def main(x): S = 'SWIFT' M = 'MASK' N = 'NIT' V = 'VHDL' if x[0] == 'HAXE': return 11 elif x[0] == 'M4': if x[2] == 1987 or x[2] == 2018: return [1987, 2018].index(x[2]) * 2 + [S, M].index(x[1]) + 6 else: return 10 elif x[0] == 'LEAN': if x[2] == 1987: return [S, M].index(x[1]) elif x[2] == 2015: return [S, M].index(x[1]) + 4 else: return [N, V].index([3]) + 2" "def main(x): if x[2] == 1996: if x[3] == 'NCL': return [1970, 1989].index(x[0]) elif x[3] == 'PIC': return ['R', 'SWIFT', 'ROFF'].index(x[1]) + 2 elif x[2] == 1974: if x[0] == 1970: return ['NCL', 'PIC'].index(x[3]) + 5 elif x[0] == 1989: return ['NCL', 'PIC'].index(x[3]) + 7 elif x[2] == 1965: return ['NCL', 'PIC'].index(x[3]) + 9" "tree = [-1, 1, {2010: [9], 1978: [10], 2013: [-1, 0, {'PLSQL': [-1, 2, {2000: [0], 1966: [1], 2010: [2]}], 'MESON': [-1, 2, {2000: [3], 1966: [4], 2010: [5]}], 'HTTP': [-1, 2, {2000: [6], 1966: [7], 2010: [8]}]}]}] def main(x): cur = tree while True: cur = cur[2][x[cur[1]]] if cur[0] > -1: return cur[0]" "def main(x: list) -> int: match x[3]: case 1969: return tree1(x) case 1987: return tree2(x) case 1999: return 10 def tree1(x: list) -> int: match x[2]: case 'MUPAD': return ['MUF', 'MQL4'].index(x[0]) case 'HAXE': return ['HAML', 'VALA', 'PERL6'].index(x[1]) + 2 def tree2(x: list) -> int: match x[0]: case 'MUF': return ['HAML', 'VALA', 'PERL6'].index(x[1]) + 5 case 'MQL4': return ['MUPAD', 'HAXE'].index(x[2]) + 8" "def main(x): if x[1] == 1979: if x[0] == 1959: return [2019, 1968].index(x[3]) if x[0] == 2014: return [2019, 1968].index(x[3]) + 2 if x[0] == 2012: return 4 elif x[1] == 2005: if x[2] == 'ALLOY': return 5 elif x[2] == 'EJS': return [2019, 1968].index(x[3]) + 6 elif x[2] == 'LEAN': return 8 elif x[1] == 1988: return 9" "def main(x): if x[0] == 'XSLT': if x[3] == 'TXL': return ['IO', 'JSON5'].index(x[4]) elif x[3] == 'DYLAN': if x[2] == 'LEX': return [1980, 2008, 2017].index(x[1]) + 4 else: return ['KICAD', 'XS'].index(x[2]) + 2 elif x[4] == 'IO': return 7 else: return [1980, 2008, 2017].index(x[1]) + 8 else: return 11" "def main(x): if x[0] == 1999: if x[3] == 2003: return [2006, 1997, 1958].index(x[1]) elif x[3] == 1975: return 3 elif x[3] == 1986: return 4 elif x[0] == 1978: if x[1] == 2006: return ['HACK', 'OPAL'].index(x[2]) + 5 elif x[1] == 1997: return ['HACK', 'OPAL'].index(x[2]) + 7 elif x[1] == 1958: return 9" "def main(x): if x[1] == 2015: if x[4] == 2015: return [2010, 1968].index(x[0]) elif x[4] == 2002: if x[0] == 2010: return [1961, 2012].index(x[2]) + 2 elif x[0] == 1968: return [1961, 2012].index(x[2]) + 4 elif x[4] == 2008: return 6 elif x[1] == 2006: if x[2] == 1961: if x[4] == 2015: return [1994, 1976, 1960].index(x[3]) + 7 else: return [2002, 2008].index(x[4]) + 10 else: return 12" "def main(x): if x[1] == 'METAL': if x[2] == 2000: return [1977, 1979, 1988].index(x[3]) elif x[2] == 1991: return ['OCAML', 'XC', 'VCL'].index(x[0]) + 3 elif x[2] == 2003: return 6 elif x[1] == 'EC': if x[2] == 2000: return [1977, 1979, 1988].index(x[3]) + 7 elif x[2] == 1991: return 10 elif x[2] == 2003: return 11 elif x[1] == 'APEX': return 12" "def main(tree): if len(tree) == 4 and tree[0] != 'SMALI': t3 = ['SLIM', 'FLUX', 'COBOL'] t2 = [1997, 1964] t1 = ['IDL', 'HLSL'] index3 = t3.index(tree[3]) index2 = t2.index(tree[1]) index1 = t1.index(tree[0]) return index3 + 3 * index2 + 6 * index1 else: return 12" "def fourth(x, right, middle, left): if x[4] == 'FREGE': return right if x[4] == 'XBASE': return middle if x[4] == 'EJS': return left def third(x, right, middle, left): if x[3] == 1960: return right if x[3] == 1988: return middle if x[3] == 1961: return left def second(x, right, middle, left): if x[2] == 1998: return right if x[2] == 2006: return middle if x[2] == 2017: return left def zero(x, right, middle, left): if x[0] == 1999: return right if x[0] == 1984: return middle if x[0] == 2019: return left def main(x): return second(x, fourth(x, third(x, zero(x, 0, 1, 2), zero(x, 3, 4, 5), 6), third(x, zero(x, 7, 8, 9), 10, 11), 12), 13, 14)" "def main(x): if x[3] == 'COQ': k = [1962, 1988].index(x[2]) return ['MINID', 'C', 'CMAKE'].index(x[1]) * 2 + k elif x[3] == 'FORTH': if x[2] == 1962: return 6 elif x[2] == 1988: return [1979, 1968].index(x[0]) + 7 elif x[3] == 'SCAML': if x[2] == 1988: return 11 elif x[2] == 1962: return [1979, 1968].index(x[0]) + 9" "def x1(x): if x[1] == 'AGDA': return 7 elif x[1] == 'NU': return xu0(x) else: return xd4(x) def xu0(x): if x[0] == 'MUPAD': return 6 elif x[0] == 'PIKE': return 5 else: return x2(x) def x2(x): if x[2] == 2008: return 4 elif x[2] == 1998: return 0 else: return xu4(x) def xu4(x): if x[4] == 'OPAL': return 1 elif x[4] == 'PIC': return 2 else: return 3 def xd4(x): if x[4] == 'OPAL': return xd0(x) elif x[4] == 'PIC': return 13 else: return 14 def xd0(x): if x[0] == 'ADA': return x3(x) elif x[0] == 'PIKE': return 11 else: return 12 def x3(x): if x[3] == 1973: return 8 elif x[3] == 2000: return 9 else: return 10 def main(x): return x1(x)" "def M4(x): if x[2] == 'HLSL': if x[3] == 'QMAKE': return 0 elif x[3] == 'C': return 1 elif x[3] == 'OPA': return 2 elif x[2] == 'FREGE': if x[3] == 'QMAKE': return 3 elif x[3] == 'C': return 4 elif x[3] == 'OPA': return 5 elif x[2] == 'XML': return 6 def APEX(x): if x[0] == 2015: return 7 elif x[0] == 2003: return 8 elif x[0] == 1958: if x[2] == 'HLSL': return 9 elif x[2] == 'FREGE': return 10 elif x[2] == 'XML': return 11 def main(x): if x[1] == 'M4': return M4(x) elif x[1] == 'APEX': return APEX(x)" "def main(x): if x[0] == 2000: if x[2] == 'NIM': match x[4]: case 'VOLT': if x[3] == 1982: return 3 return 4 case 'CSS': match x[1]: case 'STATA': return 0 case 'HLSL': return 1 case 'SVG': return 2 case 'CHUCK': return 5 return 6 if x[0] == 2011: if x[2] == 'NIM': match x[4]: case 'CSS': return 7 case 'CHUCK': return 10 case 'VOLT': if x[3] == 1892: return 8 return 9 return 11" "def solve_zero(x, left_result, middle_result, right_result): if x[0] == 'KRL': return left_result if x[0] == 'TEA': return middle_result if x[0] == 'PAWN': return right_result def solve_first(x, left_result, right_result): if x[1] == 'ALLOY': return left_result if x[1] == 'YANG': return right_result def solve_second(x, left_result, right_result): if x[2] == 'EJS': return left_result if x[2] == 'TOML': return right_result def solve_third(x, left_result, middle_result, right_result): if x[3] == 'VCL': return left_result if x[3] == 'OPA': return middle_result if x[3] == 'NCL': return right_result def main(x): return solve_third(x, solve_zero(x, solve_first(x, 0, 1), 2, 3), solve_first(x, solve_zero(x, 4, 5, 6), 7), solve_first(x, solve_second(x, 8, 9), 10)) main(['KRL', 'ALLOY', 'TOML', 'VCL']) main(['PAWN', 'ALLOY', 'TOML', 'OPA'])" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): if len(self.next) > 0: for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n7_2 = Node(10, [], []) n7_1 = Node(9, [], []) n7 = Node(x[3], [1984, 1974], [n7_1, n7_2]) n6_3 = Node(8, [], []) n6_2 = Node(7, [], []) n6_1 = Node(6, [], []) n6 = Node(x[1], [1995, 1961, 1996], [n6_1, n6_2, n6_3]) n5_3 = Node(5, [], []) n5_2 = Node(4, [], []) n5_1 = Node(3, [], []) n5 = Node(x[1], [1995, 1961, 1996], [n5_1, n5_2, n5_3]) n4_3 = Node(2, [], []) n4_2 = Node(1, [], []) n4_1 = Node(0, [], []) n4 = Node(x[1], [1995, 1961, 1996], [n4_1, n4_2, n4_3]) n3_1 = Node(11, [], []) n3 = Node(x[0], [2008, 2020, 2013], [n6, n7, n3_1]) n2 = Node(x[3], [1984, 1974], [n4, n5]) n1 = Node(x[2], [1979, 1977], [n2, n3]) n_2 = Node(13, [], []) n_1 = Node(12, [], []) n = Node(x[4], ['YANG', 'LUA', 'REBOL'], [n1, n_1, n_2]) while n: res = n n = n.find_next() return res.data" "def main(x): def check1(a, b, c, d): if x[3] == 1989: return check2(a, b) elif x[3] == 1972: return c elif x[3] == 1969: return d return def check2(a, b): if x[2] == 'MQL4': return a elif x[2] == 'D': return b def check3(a, b, c, d, e, f): if x[2] == 'MQL4': return check4(a, b, c) elif x[2] == 'D': return check5(d, e, f) def check4(a, b, c): if x[1] == 'ELM': return a elif x[1] == 'STATA': return b elif x[1] == 'C++': return c def check5(d, e, f): if x[3] == 1989: return d elif x[3] == 1972: return e elif x[3] == 1969: return f if x[0] == 'GENIE': return 4 elif x[0] == 'EDN': return check1(0, 1, 2, 3) elif x[0] == 'QML': return check3(5, 6, 7, 8, 9, 10)" "def main(x): if x[2] == 'NINJA': return f0(x) if x[2] == 'QML': return f3(x) if x[2] == 'GDB': return 12 def f0(x): if x[0] == 2019: return f3_1(x) if x[0] == 1996: return f1(x) if x[0] == 1978: return f3_2(x) def f3(x): if x[3] == 'HTML': return 9 if x[3] == 'RAML': return 10 if x[3] == 'ABAP': return 11 def f3_1(x): if x[3] == 'HTML': return 0 if x[3] == 'RAML': return 1 if x[3] == 'ABAP': return 2 def f3_2(x): if x[3] == 'HTML': return 6 if x[3] == 'RAML': return 7 if x[3] == 'ABAP': return 8 def f1(x): if x[1] == 'NUMPY': return 3 if x[1] == 'M4': return 4 if x[1] == 'TEX': return 5" "def ri(x): if x[4] != 1983: return [2020, 1986].index(x[4]) * 6 + 8 elif x[1] == 'AMPL': return [2014, 1958, 1987].index(x[0]) + 9 else: return ['OZ', 'BISON'].index(x[1]) + 12 def main(x): if x[2] == 'RDOC': if x[3] == 2016: if x[1] == 'AMPL': return 0 elif x[1] == 'OZ': return [2014, 1958, 1987].index(x[0]) + 1 elif x[1] == 'BISON': return [2020, 1983, 1986].index(x[4]) + 3 elif x[3] == 1979: return 7 elif x[2] == 'VOLT': return ri(x) elif x[2] == 'VHDL': return 15" "def main(x): match x[0]: case 'HLSL': return 10 case 'ROUGE': match x[4]: case 1970: return 9 case 1984: match x[2]: case 'FLUX': match x[3]: case 1985: return 0 case 2016: return 1 case 1987: return 2 case 'EBNF': match x[1]: case 'GAP': return 3 case 'XBASE': return 4 case 'ASP': return 5 case 'QML': match x[3]: case 1985: return 6 case 2016: return 7 case 1987: return 8" "def main(mass): matrix = [[2018, 'KICAD', 0, 'NU'], [2018, 'HTTP', 0, 'NU'], [2018, 'AMPL', 0, 'NU'], [2018, 0, 'IOKE', 'DM'], [2018, 0, 'PHP', 'DM'], [2018, 'KICAD', 0, 'AMPL'], [2018, 'HTTP', 0, 'AMPL'], [2018, 'AMPL', 0, 'AMPL'], [1988, 'KICAD', 'IOKE', 0], [1988, 'KICAD', 'PHP', 0], [1988, 'HTTP', 0, 0], [1988, 'AMPL', 0, 0]] for i in range(0, 12): a = 0 for j in range(0, 4): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 4: return i" "import re def main(x): x = ' '.join(map(str, x)) db = (('\\w+ GENIE 1974 2003', 0), ('\\w+ GENIE 1974 2019', 1), ('\\w+ BRO 1974 \\d{4}', 2), ('EJS RUST 1974 \\d{4}', 3), ('ZIMPL RUST 1974 \\d{4}', 4), ('VALA RUST 1974 \\d{4}', 5), ('EJS \\w+ 2013 \\d{4}', 6), ('ZIMPL \\w+ 2013 \\d{4}', 7), ('VALA GENIE 2013 \\d{4}', 8), ('VALA BRO 2013 \\d{4}', 9), ('VALA RUST 2013 \\d{4}', 10)) for i in range(11): if re.fullmatch(db[i][0], x): return db[i][1]" "def main(args): dict1 = {1987: 1, 1999: 2} dict11 = {1987: 8, 1999: 9} dict2 = {2020: 6, 1982: 7} dict222 = {2020: 4, 1982: 5} dict3 = {'FLUX': 0, 'SAGE': dict1[args[1]]} dict111 = {1987: 3, 1999: dict222[args[2]]} dict22 = {2020: dict11[args[1]], 1982: 10} dict33 = {'FLUX': dict2[args[2]], 'SAGE': dict22[args[2]]} dict4 = {'FORTH': dict111[args[1]], 'C': dict3[args[3]]} dict0 = {'CLICK': dict4[args[4]], 'ORG': dict33[args[3]]} return dict0[args[0]]" "def main(x): def f1(c1, c2): if x[2] == 1959: return c1 elif x[2] == 1967: return c2 def f2(c1, c2, c3): if x[0] == 'VUE': return c1 elif x[0] == 'C++': return c2 elif x[0] == 'OOC': return c3 def f3(c1, c2): if x[4] == 2013: return c1 elif x[4] == 1964: return c2 if x[1] == 'PHP': return f2(f1(f3(0, 1), 2), f3(3, 4), f3(5, 6)) elif x[1] == 'NIT': return f1(7, 8) elif x[1] == 'XOJO': return f2(f3(9, 10), 11, 12)" "import math def zeroth(x, middle): if x[0] == 1998: return middle def first(x, left, middle, right): if x[1] == 'CIRRU': return left if x[1] == 'GO': return middle if x[1] == 'NIT': return right def third(x, left, middle, right): if x[3] == 'GOLO': return left if x[3] == 'TLA': return middle if x[3] == 'SLIM': return right def main(x): if x[2] == 'GLSL': return zeroth(x, third(x, 0, 1, 2)) if x[2] == 'ROFF': return third(x, zeroth(x, 3), first(x, 4, 5, 6), 7) if x[2] == 'J': return third(x, zeroth(x, 8), zeroth(x, 9), 10)" "def main(x): def f1(c1, c2): if x[1] == 2014: return c1 elif x[1] == 2009: return c2 def f4(c1, c2, c3): if x[4] == 'SASS': return c1 elif x[4] == 'SLIM': return c2 elif x[4] == 'VUE': return c3 def f3(c1, c2, c3): if x[3] == 1976: return c1 elif x[3] == 2013: return c2 elif x[3] == 1962: return c3 def f2(c1, c2, c3): if x[2] == 'EC': return c1 elif x[2] == 'XSLT': return c2 elif x[2] == 'SMT': return c3 if x[0] == 2009: return f3(f2(f4(0, 1, 2), f1(3, 4), f4(5, 6, 7)), f1(8, 9), 10) elif x[0] == 2013: return 11" "def main(x): def f1(c1, c2, c3): if x[2] == 'NINJA': return c1 elif x[2] == 'QML': return c2 elif x[2] == 'SWIFT': return c3 def f2(c1, c2, c3): if x[0] == 'QML': return c1 elif x[0] == 'STATA': return c2 elif x[0] == 'XSLT': return c3 def f3(c1, c2): if x[3] == 'TEX': return c1 elif x[3] == 'TXL': return c2 if x[1] == 'APEX': return f1(f2(0, 1, 2), f2(3, 4, 5), f2(6, 7, 8)) elif x[1] == 'BISON': return f2(f3(9, 10), 11, 12)" "def main(x): match x[1]: case 'LOGOS': match x[0]: case 2017: match x[2]: case 'LUA': return 3 case 'SELF': match x[3]: case 'RHTML': return 2 case 'CMAKE': return 1 case 'ASP': return 0 case 1966: match x[4]: case 1960: match x[2]: case 'LUA': return 6 case 'SELF': return 5 case 2018: return 4 case 'D': match x[0]: case 2017: match x[2]: case 'LUA': return 9 case 'SELF': match x[4]: case 1960: return 8 case 2018: return 7 case 1966: return 10 case 'J': return 11" "def main(x): d1 = {'METAL': 0, 'DIFF': 3} d0 = {'CLEAN': 0, 'IDRIS': 1, 'EDN': 2} d3 = {1969: 0, 1978: 1, 1985: 2} if x[2] == 1973: if x[1] == 'DIFF': return 3 else: return d0[x[0]] elif x[2] == 2001: return 4 else: return 5 + d1[x[1]] + d3[x[3]]" "def main(x): return f3(x, f4(x, f2(x, f0(x, 0, 1), 2), f0(x, f2(x, 3, 4), f2(x, 5, 6))), f1(x, f4(x, 7, f0(x, 8, 9)), 10, 11), 12) def f0(x, right, middle): if x[0] == 'M': return right if x[0] == 'LIMBO': return middle def f1(x, right, middle, left): if x[1] == 'PAWN': return right if x[1] == 'BLADE': return middle if x[1] == 'TXL': return left def f2(x, right, middle): if x[2] == 1969: return right if x[2] == 1978: return middle def f3(x, right, middle, left): if x[3] == 'FANCY': return right if x[3] == 'ROUGE': return middle if x[3] == 'NSIS': return left def f4(x, right, middle): if x[4] == 'MAX': return right if x[4] == 'RUBY': return middle" "def chkx3(x, r): if x == 1994: return r elif x == 2004: return r + 1 def chkx1(x, r, bool=None): if x == 2020: return r elif x == 1992: return r + 1 elif x == 2006: if bool: return 3 return r + 2 def main(x): if x[0] == 'PAN': return 11 elif x[0] == 'LUA': return 10 elif x[0] == 'ASP': if x[2] == 2014: if x[4] == 'R': return chkx3(x[3], 4) elif x[4] == 'LFE': return 6 elif x[4] == 'D': return chkx1(x[1], 7) elif x[2] == 2018: if x[1] == 1992: return chkx3(x[3], 1) return chkx1(x[1], 0, 1)" "def a1(x): if x[1] == 2019: return 0 if x[1] == 2018: return 1 if x[1] == 1974: return 2 def a2(x): if x[1] == 2019: return 3 if x[1] == 2018: return 4 if x[1] == 1974: return 5 def a3(x): if x[0] == 1979: return 7 if x[0] == 2007: return 8 if x[0] == 2001: return 9 def a4(x): if x[4] == 'OPA': return a1(x) if x[4] == 'GO': return a2(x) if x[4] == 'SCALA': return 6 def a5(x): if x[4] == 'OPA': return a3(x) if x[4] == 'GO': return 10 if x[4] == 'SCALA': return 11 def main(x): if x[3] == 1985: if x[2] == 1969: return a4(x) if x[2] == 1975: return a5(x) if x[2] == 1965: return 12 if x[3] == 1966: return 13 if x[3] == 2020: return 14" "def funxction_x0(x): if x[0] == 'GO': return funxction_x1(x) elif x[0] == 'YAML': return 7 elif x[0] == 'PHP': return 8 def funxction_x1(x): if x[1] == 'IDL': return 0 elif x[1] == 'GLSL': return funxction_x4(x) elif x[1] == 'SLASH': return funxction_x3(x) def funxction_x2(x): if x[2] == 1982: return funxction_x0(x) elif x[2] == 1973: return 9 elif x[2] == 2001: return 10 def funxction_x3(x): if x[3] == 2003: return 4 elif x[3] == 1970: return 5 elif x[3] == 2004: return 6 def funxction_x4(x): if x[4] == 'LESS': return 1 elif x[4] == 'TEA': return 2 elif x[4] == 'ATS': return 3 def main(x): return funxction_x2(x)" "def LEFTfirst(x): if x[3] == 2017: return LEFTsecondleft(x) elif x[3] == 1990: return 7 def LEFTsecondleft(x): if x[2] == 1999: return 0 elif x[2] == 1970: return CENTRALthirdright(x) elif x[2] == 1966: return LEFTthirdright(x) def CENTRALthirdright(x): if x[1] == 1965: return 1 elif x[1] == 1974: return 2 elif x[1] == 1966: return 3 def LEFTthirdright(x): if x[1] == 1965: return 4 elif x[1] == 1974: return 5 elif x[1] == 1966: return 6 def f(x): if x[4] == 2013: return LEFTfirst(x) elif x[4] == 2014: return 8 elif x[4] == 1999: return 9 def main(x): return f(x)" "def LEFTfirst(x): if x[1] == 'M': return LEFTsecondleft(x) elif x[1] == 'SHELL': return 6 else: return 7 def LEFTsecondleft(x): if x[0] == 'APL': return LEFTthirdright(x) else: return LEFTthirdleft(x) def LEFTthirdleft(x): if x[4] == 1965: return 0 elif x[4] == 1987: return 1 else: return 2 def LEFTthirdright(x): if x[4] == 1965: return 3 elif x[4] == 1987: return 4 else: return 5 def RIGHTfirst(x): if x[1] == 'M': return 8 if x[1] == 'SHELL': return 9 else: return 10 def f(x): if x[2] == 'CHUCK': return LEFTfirst(x) else: return RIGHTfirst(x) def main(x): return f(x)" "def compare_four(x, left, right): x4 = x[4] if x4 == 'EQ': return left if x4 == 'ORG': return right def compare_third(x, left, middle, right): x3 = x[3] if x3 == 'ANTLR': return left if x3 == 'JSON5': return middle if x3 == 'XSLT': return right def compare_second1(x, left, middle, right): x1 = x[1] if x1 == 1994: return left if x1 == 1964: return middle if x1 == 1999: return right def compare_second2(x, left, middle, right): x1 = x[1] if x1 == 1994: return left if x1 == 1964: return middle if x1 == 1999: return right def compare_zero1(x, left, middle, right): x0 = x[0] if x0 == 'CSON': return left if x0 == 'YACC': return middle if x0 == 'SQLPL': return right def compare_zero2(x, left, middle, right): x0 = x[0] if x0 == 'CSON': return left if x0 == 'YACC': return middle if x0 == 'SQLPL': return right def main(x): return compare_four(x, compare_third(x, compare_second1(x, 0, compare_zero1(x, 1, 2, 3), 4), compare_second2(x, 5, compare_zero2(x, 6, 7, 8), 9), 10), 11) main(['CSON', 1999, 2017, 'JSON5', 'EQ']) main(['SQLPL', 1964, 1963, 'ANTLR', 'ORG'])" "def main(x): if x[4] == 'KIT': if x[2] == 1958: if x[0] == 1976: return 0 else: if x[1] == 'SCAML': return 1 return 2 return 3 elif x[2] == 1958: if x[0] == 1976: if x[3] == 'MASK': return 4 else: return 5 return 6 elif x[0] == 1976: return 7 else: if x[3] == 'MASK': return 8 return 9" "def ri(x): if x[2] == 'SASS': return 11 elif x[2] == 'PLSQL': return 12 elif x[2] == 'OOC': if x[4] == 2008: return [2003, 1967].index(x[3]) + 7 elif x[4] == 1987: return [2003, 1967].index(x[3]) + 9 def main(x): if x[1] == 'TEXT': if x[4] == 2008: if x[3] == 2003: return ['OOC', 'SASS', 'PLSQL'].index(x[2]) elif x[3] == 1967: return ['OOC', 'SASS', 'PLSQL'].index(x[2]) + 3 elif x[4] == 1987: return 6 elif x[1] == 'XBASE': return ri(x)" "def main(x): match x[1]: case 1987: match x[2]: case 1974: return 9 case 1993: return 10 case 1970: match x[3]: case 2013: match x[0]: case 1978: return 6 case 1980: return 7 case 1999: return 8 case 1959: match x[0]: case 1978: return 3 case 1980: return 4 case 1999: return 5 case 1998: match x[0]: case 1978: return 0 case 1980: return 1 case 1999: return 2" "def main(x): dict4 = {1969: 3, 1959: 4, 2014: 5} dict0_l = {1962: 0, 2000: 1} dict2 = {2016: 2, 2010: dict4[x[0]], 1968: 6} dict0_r = {1962: 8, 2000: 9} dict3_l = {'XBASE': dict0_l[x[3]], 'GLYPH': dict2[x[1]]} dict3_r = {'XBASE': 7, 'GLYPH': dict0_r[x[3]]} dict4 = {1963: dict3_l[x[4]], 1978: dict3_r[x[4]], 1995: 10} return dict4[x[2]]" "def main(x: list) -> int: switch = {'HACK': 11, 'LLVM': {'KIT': 6, 'NESC': {'RED': 0, 'FISH': {'HY': 1, 'X10': 2, 'SCALA': 3}, 'NUMPY': {2005: 4, 1980: 5}}, 'ZIMPL': {'HY': 7, 'X10': 8, 'SCALA': {2005: 9, 1980: 10}}}} res = switch.get(x[4]) if isinstance(res, dict): res = res.get(x[1]) if isinstance(res, dict): res1 = res.get(x[2]) res2 = res.get(x[3]) if isinstance(res1, int): return res1 elif isinstance(res1, dict): return res1.get(x[0]) elif isinstance(res2, int): return res2 else: res1 = res2.get(x[2]) res2 = res2.get(x[0]) if isinstance(res1, int): return res1 else: return res2 else: return res else: return res" "def main(x): path = {1958: {'MQL4': {1972: {'QMAKE': 0, 'CIRRU': 1, 'DART': 2}, 1980: {'QMAKE': 3, 'CIRRU': 4, 'DART': 5}, 1973: {'QMAKE': 6, 'CIRRU': 7, 'DART': 8}}, 'QMAKE': 9, 'OPAL': 10}, 2005: 11} path = path[x[0]] if isinstance(path, int): return path path = path[x[2]] if isinstance(path, int): return path path = path[x[4]] path = path[x[3]] return path" "def main(x): if x[3] == 'TCL': if x[0] == 'GOLO': if x[2] == 'KIT': return ['NIX', 'SCALA', 'KICAD'].index(x[1]) elif x[2] == 'CMAKE': return 3 elif x[0] == 'JSON': if x[1] == 'NIX': return 4 elif x[1] == 'SCALA': return [2002, 2000, 1990].index(x[4]) + 5 elif x[1] == 'KICAD': return [2002, 2000, 1990].index(x[4]) + 8 else: return ['STATA', 'SLASH'].index(x[3]) + 11" "def main(x): match x[4]: case 1990: return 7 case 2014: match x[3]: case 'LOGOS': match x[0]: case 'XTEND': return 0 case 'ELM': return 1 case 'VALA': match x[2]: case 'ROUGE': return 2 case 'XOJO': return 3 case 'COQ': return 4 case 'TERRA': match x[1]: case 'FREGE': return 5 case 'PONY': return 6 case 1961: match x[3]: case 'LOGOS': return 8 case 'TERRA': match x[0]: case 'VALA': return 13 case 'ELM': return 12 case 'XTEND': match x[2]: case 'ROUGE': return 9 case 'XOJO': return 10 case 'COQ': return 11" "def main(x): level3 = ['OX', 'DIFF', 'XTEND'] level0 = ['CSON', 'PIC', 'RAML'] if x[4] == 1994 and x[2] == 1973: return level3.index(x[3]) + level0.index(x[0]) * (level3.index(x[3]) == 2) elif x[4] == 1994: return 5 elif x[4] == 1960 and x[2] == 1973: return level3.index(x[3]) + 6 elif x[4] == 1960 and x[2] == 1959: return 9 else: return 10" "def main(arg): match arg[3]: case 'XPROC': match arg[1]: case 1980: match arg[2]: case 'NESC': return 0 case 'HTML': return 1 case 1964: match arg[0]: case 'P4': return 2 case 'LLVM': return 3 case 1973: match arg[0]: case 'P4': return 4 case 'LLVM': return 5 case 'BISON': match arg[1]: case 1980: return 6 case 1964: match arg[2]: case 'NESC': return 7 case 'HTML': return 8 case 1973: return 9" "def main(x): dict4_l = {2019: 2, 2005: 3, 1995: 4} dict4_r = {2019: 5, 2005: 6, 1995: 7} dict3_l = {'HTML': 0, 'APEX': 1} dict3_r = {'HTML': dict4_l[x[2]], 'APEX': dict4_r[x[2]]} dict2 = {2008: dict3_l[x[3]], 2001: dict3_r[x[3]]} dict4_l = {1988: dict2[x[1]], 2004: 8, 1991: 9} return dict4_l[x[4]]" "class Node(object): def __init__(self, parentList, name, value, listChild): self.name = name self.parentList = parentList self.parentList.append(name) self.value = value self.listChild = listChild def insert(self, parentList, name, value): if self.parentList == parentList: self.listChild.append(Node(parentList, name, value, [])) return for i in range(len(self.listChild)): if self.listChild[i].parentList == parentList: self.listChild[i].listChild.append(Node(parentList, name, value, [])) else: self.listChild[i].insert(parentList, name, value) def search(self, list): if len(self.listChild) == 0: return self.name else: for i in range(len(self.listChild)): for j in range(len(list)): if (self.listChild[i].value == str(list[j])) & (j == int(self.name[1:])): return self.listChild[i].search(list) def main(list): root = Node([], 'x3', '0', []) root.insert(['x3'], 'x0', '2012') root.insert(['x3', 'x0'], 'x2', '1995') root.insert(['x3', 'x0', 'x2'], 0, 'SLIM') root.insert(['x3', 'x0', 'x2'], 1, 'RAGEL') root.insert(['x3', 'x0'], 'x1', '2008') root.insert(['x3', 'x0', 'x1'], 2, '2000') root.insert(['x3', 'x0', 'x1'], 3, '1982') root.insert(['x3', 'x0', 'x1'], 4, '1996') root.insert(['x3', 'x0'], 5, '1996') root.insert(['x3'], 'x2', '2009') root.insert(['x3', 'x2'], 'x0', 'SLIM') root.insert(['x3', 'x2', 'x0'], 6, '1995') root.insert(['x3', 'x2', 'x0'], 7, '2008') root.insert(['x3', 'x2', 'x0'], 8, '1996') root.insert(['x3', 'x2'], 'x1', 'RAGEL') root.insert(['x3', 'x2', 'x1'], 9, '2000') root.insert(['x3', 'x2', 'x1'], 10, '1982') root.insert(['x3', 'x2', 'x1'], 11, '1996') t = root.search(list) return t" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n_12 = Node(9, [], []) n_11 = Node(8, [], []) n_10 = Node(7, [], []) n_9 = Node(11, [], []) n_8 = Node(10, [], []) n_7 = Node(5, [], []) n_6 = Node(4, [], []) n_5 = Node(2, [], []) n_4 = Node(1, [], []) n_3 = Node(0, [], []) n_2 = Node(3, [], []) n5 = Node(x[3], ['CUDA', 'TEXT', 'GOSU'], [n_10, n_11, n_12]) n4 = Node(x[2], [1984, 2012], [n_6, n_7]) n3 = Node(x[3], ['CUDA', 'TEXT', 'GOSU'], [n_3, n_4, n_5]) n2 = Node(x[1], [1972, 1970, 1974], [n5, n_8, n_9]) n1 = Node(x[1], [1972, 1970, 1974], [n3, n_2, n4]) n_1 = Node(6, [], []) n = Node(x[0], ['HY', 'BISON', 'IO'], [n1, n_1, n2]) while n: res = n.data n = n.find_next() return res" "def main(x): if x[1] == 'EC': return 11 elif x[1] == 'CSON': return fun_x3(x) def fun_x3(x): if x[3] == 1976: return fun_x4(x) elif x[3] == 1961: if x[0] == 'NSIS': return 0 elif x[0] == 'CLEAN': return 1 elif x[0] == 'ORG': return 2 def fun_x4(x): if x[4] == 'REXX': return fun_x0(x) elif x[4] == 'ABAP': return fun_x2(x) elif x[4] == 'GLSL': if x[0] == 'NSIS': return 8 elif x[0] == 'CLEAN': return 9 elif x[0] == 'ORG': return 10 def fun_x0(x): if x[0] == 'NSIS': return 3 elif x[0] == 'CLEAN': return 4 elif x[0] == 'ORG': return 5 def fun_x2(x): if x[2] == 'COBOL': return 6 elif x[2] == 'MQL4': return 7" "def main(x): match x[4]: case 'HLSL': match x[2]: case 'HCL': return 2 case 'RHTML': return 3 case 'SCSS': match x[1]: case 1986: return 0 case 1975: return 1 case 'OPAL': match x[0]: case 'TCL': match x[1]: case 1986: match x[3]: case 1962: return 4 case 1975: return 5 case 'HYPHY': match x[2]: case 'SCSS': return 6 case 'HCL': match x[1]: case 1986: return 7 case 1975: return 8 case 'RHTML': match x[1]: case 1986: return 9 case 1975: return 10 case 'SQLPL': return 11" "def main(x): match x[4]: case 2000: match x[1]: case 'LATTE': return 7 case 'LUA': match x[3]: case 'LATTE': return 6 case 'VCL': match x[0]: case 'INI': return 5 case 'APL': return 4 case 'CLICK': return 3 case 'SLASH': match x[2]: case 'YANG': return 2 case 'ANTLR': return 1 case 'OPAL': return 0 case 1973: match x[3]: case 'LATTE': return 13 case 'VCL': match x[2]: case 'YANG': return 12 case 'ANTLR': return 11 case 'OPAL': match x[1]: case 'LATTE': return 10 case 'LUA': return 9 case 'SLASH': return 8" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n7_2 = Node(0, [], []) n7_1 = Node(1, [], []) n7 = Node(x[4], [1966, 1971], [n7_1, n7_2]) n5_2 = Node(2, [], []) n5_1 = Node(3, [], []) n5 = Node(x[3], [1979, 1995, 2003], [n5_1, n5_2, n7]) n6_3 = Node(5, [], []) n6_2 = Node(6, [], []) n6_1 = Node(7, [], []) n6 = Node(x[3], [1979, 1995, 2003], [n6_1, n6_2, n6_3]) n4_1 = Node(4, [], []) n4 = Node(x[4], [1966, 1971], [n6, n4_1]) n3_1 = Node(8, [], []) n_3 = Node(x[0], [1993, 1961, 1960], [n3_1, n4, n5]) n2_3 = Node(9, [], []) n2_2 = Node(10, [], []) n2_1 = Node(11, [], []) n_2 = Node(x[0], [1993, 1961, 1960], [n2_1, n2_2, n2_3]) n_1 = Node(12, [], []) n = Node(x[2], ['XTEND', 'IDRIS', 'ZIMPL'], [n_1, n_2, n_3]) while n: res = n.data n = n.find_next() return res" "def main(x): array = [['COQ', 2008, 'BLADE', 'IDL', x[4]], ['COQ', 2008, 'BLADE', 'FANCY', x[4]], ['COQ', 2008, 'BLADE', 'ROFF', x[4]], ['COQ', 2008, 'MAX', x[3], x[4]], ['APL', 2008, x[2], x[3], x[4]], ['HAML', 2008, x[2], x[3], x[4]], [x[0], 1971, 'BLADE', x[3], x[4]], ['COQ', 1971, 'MAX', x[3], 1984], ['COQ', 1971, 'MAX', x[3], 1988], ['APL', 1971, 'MAX', 'IDL', x[4]], ['APL', 1971, 'MAX', 'FANCY', x[4]], ['APL', 1971, 'MAX', 'ROFF', x[4]], ['HAML', 1971, 'MAX', x[3], x[4]], [x[0], 2005, x[2], x[3], x[4]]] if x in array: return array.index(x)" "def main(x: list): match x[1]: case 1966: return 10 case 1967: match x[3]: case 'LOGOS': match x[2]: case 'MAX': match x[4]: case 1960: return 3 case 1982: return 4 case 1984: return 5 case 'RUST': match x[4]: case 1960: return 0 case 1982: return 1 case 1984: return 2 case 'HTTP': match x[0]: case 1996: return 6 case 2009: match x[2]: case 'MAX': return 8 case 'RUST': return 7 case 'XC': return 9" "def main(x): dict1 = {'VHDL': 0, 'JSON': 1, 'P4': 2} dict2 = {'VHDL': 3, 'JSON': 4, 'P4': 5} dict3 = {'LEAN': 6, 'GOLO': 7, 'VALA': 8} if x[0] == 1984: if x[3] == 2019: return dict1.get(x[2]) elif x[3] == 2006: return dict2.get(x[2]) elif x[3] == 1997: return dict3.get(x[1]) else: return 9" "import math tree = [[1984, 2008, 1959], ['ARC', 'AWK', 'PUG'], [1972, 1970], ['EBNF', 'TXL', 'SWIFT'], [2001, 1964]] def main(x, i=0, inc=[]): index = tree[i].index(x[i]) inc.append(index) if i < len(x) - 1: return main(x, i + 1, inc) if inc[3] == 1: inc[0] = 0 else: inc[1] = 0 if inc[4] == 0: return inc[3] * 3 + inc[0] + inc[1] if inc[2] == 1: return 14 if inc[3] == 2: inc[0] = 0 return 9 + math.ceil(inc[3] / 2) * (inc[3] + 2) + inc[0]" "def choicex3(cond, x): if cond == 1989: return x elif cond == 1957: return x + 1 return x + 2 def choicex1(cond, x): if cond == 'IO': return x elif cond == 'XOJO': return x + 1 return x + 2 def main(x): if x[2] == 1957: if x[4] == 'NSIS': if x[1] == 'XOJO': return choicex3(x[3], 1) elif x[1] == 'MUF': if x[0] == 1991: return 4 return 5 return 0 elif x[4] == 'EQ': if x[3] == 1957: return 7 elif x[3] == 2004: return choicex1(x[1], 8) return 6 return 11" "def main(x): dict_x2_2016 = {1973: 0, 1957: 1, 1976: 2} dict_x2_2006 = {1973: 3, 1957: 4, 1976: 5} dict_x2_1968 = {1973: 6, 1957: 7, 1976: 8} dict_x3 = {'UNO': 9, 'ORG': 10} if x[3] == 'PUG': if x[0] == 2016: return dict_x2_2016[x[2]] elif x[0] == 2006: return dict_x2_2006[x[2]] elif x[0] == 1968: return dict_x2_1968[x[2]] elif x[3] == 'UNO': return 9 elif x[3] == 'ORG': return 10 main([1968, 'SVG', 1973, 'ORG'])" "def x0(arg): return x1(arg) if arg[0] == 1974 else x2(arg) def x1(arg): if arg[0] == 1974: return 9 if arg[1] == 'XBASE' else x2(arg) return 2 if arg[1] == 'METAL' else 3 if arg[1] == 'COBOL' else 4 def x2(arg): if arg[0] == 2017: return x3(arg) if arg[2] == 'BISON' else x1(arg) return 5 + (arg[1] == 'COBOL') * 2 if arg[2] == 'BISON' else 6 + (arg[1] == 'COBOL') * 2 def x3(arg): return 0 if arg[3] == 'SQF' else 1 def main(arg): return x0(arg)" "def main(array): list = [{1: 'QML', 4: 1964, 3: 1961, 'value': 0}, {1: 'QML', 4: 1964, 3: 1960, 0: 'RAML', 'value': 1}, {1: 'QML', 4: 1964, 3: 1960, 0: 'NCL', 'value': 2}, {1: 'QML', 4: 1964, 3: 1960, 0: 'NIT', 'value': 3}, {1: 'QML', 4: 1971, 'value': 4}, {1: 'MUPAD', 0: 'RAML', 4: 1964, 3: 1961, 'value': 5}, {1: 'MUPAD', 0: 'RAML', 4: 1964, 3: 1960, 'value': 6}, {1: 'MUPAD', 0: 'RAML', 4: 1971, 2: 'GLSL', 'value': 7}, {1: 'MUPAD', 0: 'RAML', 4: 1971, 2: 'RAML', 'value': 8}, {1: 'MUPAD', 0: 'RAML', 4: 1971, 2: 'HACK', 'value': 9}, {1: 'MUPAD', 0: 'NCL', 'value': 10}, {1: 'MUPAD', 0: 'NIT', 'value': 11}] for element in list: error = 0 for key in element: if key == 'value': continue if element[key] != array[key]: error = 1 if error == 0: return element['value']" "def main(f): match f[4]: case 1977: return 9 case 2009: match f[1]: case 'BISON': return 7 case 'FISH': return 8 case 1992: match f[0]: case 2015: match f[2]: case 'VALA': match f[3]: case 'PIC': return 0 case 'TCSH': return 1 case 'UNO': match f[1]: case 'BISON': return 2 case 'FISH': return 3 case 1980: return 4 case 1996: match f[2]: case 'VALA': return 5 case 'UNO': return 6" "def main(x): node = [3, {'JSON5': [2, {'KIT': [1, {1969: 0, 2016: [4, {'LFE': 1, 'NSIS': 2}], 1989: [4, {'LFE': 3, 'NSIS': 4}]}], 'CLICK': [0, {2010: 5, 1992: [4, {'LFE': 6, 'NSIS': 7}]}], 'NIM': 8}], 'SELF': 9}] while type(node) is not int: node = node[1][x[node[0]]] return node" "def ri(x): if x[2] == 'XML': if x[0] == 'YANG': return 4 if x[0] == 'LFE': return 5 if x[0] == 'OX': return 6 elif x[2] == 'MAX': return 7 def ri2(x): if x[2] == 'MAX': return 3 elif x[2] == 'XML': if x[0] == 'YANG': return 0 if x[0] == 'LFE': return 1 if x[0] == 'OX': return 2 def main(x): if x[1] == 'AMPL': return 9 elif x[1] == 'KICAD': return 10 elif x[1] == 'AGDA': if x[4] == 2001: return 8 elif x[4] == 2011: return ri(x) elif x[4] == 2007: return ri2(x)" "def main(x): dict3_l = {1990: 0, 2013: 1} dict3_c = {1990: 7, 2013: 8} dict3_r = {1990: 9, 2013: 10} dict3_cc = {'STON': 4, 'INI': 5} dict2_l = {'STON': dict3_l[x[3]], 'INI': 2} dict2_c = {1990: 3, 2013: dict3_cc[x[2]]} dict2_r = {'OPA': 6, 'REBOL': dict3_c[x[3]], 'DYLAN': dict3_r[x[3]]} dict1 = {2002: dict2_l[x[2]], 1957: dict2_c[x[3]], 1959: dict2_r[x[1]]} return dict1[x[0]]" "def main(x): match x[1]: case 'OCAML': return 8 case 'CUDA': return 9 case 'URWEB': match x[0]: case 1985: match x[3]: case 'LIMBO': match x[4]: case 'BLADE': return 4 case 'COBOL': return 5 case 'YAML': match x[4]: case 'BLADE': return 6 case 'COBOL': return 7 case 2017: match x[2]: case 'OZ': return 0 case 'LATTE': return 1 case 'JSON': match x[4]: case 'BLADE': return 2 case 'COBOL': return 3 main([2017, 'CUDA', 'LATTE', 'LIMBO', 'COBOL'])" "import math def main(x): def onecheck(a, b, c, d): if x[2] == 'WISP': return a elif x[2] == 'XSLT': return threecheck(b, c, d) def threecheck(b, c, d): if x[3] == 2002: return b elif x[3] == 2015: return c elif x[3] == 1982: return d def twocheck(a, b, c, d, e, f): if x[3] == 2002: return fourcheck(a, b, c) elif x[3] == 2015: return d elif x[3] == 1982: return fivecheck(e, f) def fourcheck(a, b, c): if x[0] == 'LATTE': return a elif x[0] == 'GN': return b elif x[0] == 'RUST': return c def fivecheck(e, f): if x[2] == 'WISP': return e elif x[2] == 'XSLT': return f if x[1] == 1975: return 10 elif x[1] == 1994: return onecheck(6, 7, 8, 9) elif x[1] == 2009: return twocheck(0, 1, 2, 3, 4, 5)" "def main(x): dict1 = {1979: 1, 1993: 2} dict2 = {1979: 3, 1993: 4} dict3 = {1990: 7, 1965: 8, 1974: 9} if x[0] == 'URWEB': if x[3] == 1973: if x[2] == 1965: return dict1.get(x[1]) elif x[2] == 1974: return dict2.get(x[1]) return 0 return 5 elif x[0] == 'YACC': if x[4] == 1979: if x[3] == 1973: return dict3.get(x[2]) return 10 return 6" "def choicex0(cond, x): if cond == 'SWIFT': return x elif cond == 'CIRRU': return x + 1 return x + 2 def choicex1(cond, x): if cond == 'TEX': return x elif cond == 'CSS': return x + 1 return x + 2 def choicex2(cond, x): if cond == 2008: return x elif cond == 1995: return x + 1 return x + 2 def main(x): if x[3] == 'ATS': if x[1] == 'TEX': return choicex0(x[0], 0) elif x[1] == 'CSS': return 3 return 4 elif x[3] == 'ABNF': if x[0] == 'SWIFT': return choicex1(x[1], 6) elif x[0] == 'CIRRU': return choicex2(x[2], 9) return 12 return 5" "def choicex3(cond, x): if cond == 2012: return x elif cond == 1977: return x + 1 return x + 2 def choicex1(cond, x): if cond == 'GOLO': return x return x + 1 def main(x): if x[0] == 2004: if x[2] == 1966: if x[4] == 2008: return choicex3(x[3], 1) elif x[4] == 1966: return 0 return 4 return 5 elif x[0] == 1970: if x[4] == 2008: if x[3] == 2012: return choicex1(x[1], 7) elif x[3] == 1977: return choicex1(x[1], 9) return 11 elif x[4] == 1966: return 6 return 12 return 13" "def main(x): return x1(x) def x1(x): if x[1] == 1983: return xu2(x) elif x[1] == 1992: return xm2(x) else: return xd0(x) def xu2(x): if x[2] == 'SMT': return 3 else: return xu0(x) def xu0(x): if x[0] == 1998: return 0 elif x[0] == 2004: return 1 else: return 2 def xm2(x): if x[2] == 'MQL5': return 4 else: return xm0(x) def xm0(x): if x[0] == 1998: return 5 elif x[0] == 2004: return 6 else: return 7 def xd0(x): if x[0] == 1998: return 8 elif x[0] == 2004: return x3(x) else: return 11 def x3(x): if x[3] == 2010: return 9 else: return 10" "def one(x): if x[1] == 'WISP': return 1 elif x[1] == 'SAS': return 2 elif x[1] == 'SVG': return 3 def sec(x): if x[3] == 2001: return one(x) - 1 if x[3] == 1979: return one(x) + 2 if x[3] == 1991: if x[0] == 1967: return 6 elif x[0] == 1974: return 7 elif x[0] == 2001: return 8 def main(x): if x[2] == 'DIFF': return one(x) + 8 else: return sec(x)" "s = {'ASP': {2008: {'SHEN': {1971: 0, 1975: 1}, 'ORG': 2, 'DYLAN': {1971: 3, 1975: 4}}, 1972: {1971: {1971: 5, 1975: 6}, 2016: 7, 1967: {'SHEN': 8, 'ORG': 9, 'DYLAN': 10}}}, 'NINJA': 11} def main(path): s1 = s[path[1]] if path[1] == 'ASP': s2 = s1[path[3]] if path[3] == 2008: s3 = s2[path[2]] if path[2] == 'ORG': return s3 else: return s3[path[0]] else: s3 = s2[path[4]] if path[4] == 1971: return s3[path[0]] elif path[4] == 2016: return s3 elif path[4] == 1967: return s3[path[2]] elif path[1] == 'NINJA': return s1" "def main(x): x0a = {2009: 0, 2016: 1, 1994: 2} x0b = {2009: 4, 2016: 5, 1994: 6} x2 = {1968: 8, 1973: 9, 2019: 10} x1a = {1996: x0a[x[0]], 2001: 3, 2020: x0b[x[0]]} x1b = {1996: 7, 2001: x2[x[2]], 2020: 11} x3 = {'KIT': x1a[x[1]], 'P4': x1b[x[1]], 'ADA': 12} return x3[x[3]]" "def f1(x): if x[1] == 2014: return f3(x) elif x[1] == 2002: return 4 def f2(x): if x[2] == 'GAP': return f4(x) elif x[2] == 'JSON': return 8 elif x[2] == 'SMT': return f5(x) def f3(x): if x[3] == 'SLASH': return f6(x) elif x[3] == 'OPAL': return 0 def f4(x): if x[1] == 2014: return 5 elif x[1] == 2002: return f7(x) def f5(x): if x[3] == 'OPAL': return f8(x) elif x[3] == 'SLASH': return 11 def f6(x): if x[2] == 'GAP': return 1 elif x[2] == 'JSON': return 2 elif x[2] == 'SMT': return 3 def f7(x): if x[3] == 'OPAL': return 6 elif x[3] == 'SLASH': return 7 def f8(x): if x[1] == 2014: return 9 elif x[1] == 2002: return 10 def main(x): if x[0] == 2005: return f1(x) elif x[0] == 1995: return f2(x) elif x[0] == 1963: return 12" "def main(x): x2a = {'HTML': 0, 'EDN': 1, 'RUST': 2} x2b = {'HTML': 3, 'EDN': 4, 'RUST': 5} x2c = {'HTML': 6, 'EDN': 7, 'RUST': 8} x1a = {1989: x2a[x[2]], 2006: x2b[x[2]], 1964: x2c[x[2]]} x3a = {'MAX': 9, 'JSX': 10, 'TXL': 11} x1b = {1989: x3a[x[3]], 2006: 12, 1964: 13} x0 = {'SMT': x1a[x[1]], 'RAGEL': x1b[x[1]], 'REXX': 14} return x0[x[0]]" "def main(data): change = {1: 3, 2: 1, 3: 2} slovar = {'MUF': {1990: {1998: {1960: 0, 1978: 1}, 1990: 2}}} slovar['MUF'][2005] = {1998: 3, 1990: {1960: 4, 1978: 5}} slovar['P4'] = {1998: {1960: 6, 1978: {1990: 7, 2005: 8}}, 1990: 9} slovar['HCL'] = 10 for i in range(4): per = i if data[0] == 'MUF' and i != 0: per = change[i] slovar = slovar.get(data[per]) if type(slovar) == int: return slovar if slovar is None: return" "def main(f): if f[1] == 1991: if f[0] == 2010: if f[2] == 'XBASE': return 0 else: return 1 elif f[0] == 1995: return 2 elif f[2] == 'XBASE': return 3 else: return 4 elif f[1] == 1984: if f[3] == 'MASK': return 5 elif f[3] == 'SHEN': if f[2] == 'XBASE': return 6 else: return 7 else: return 8 else: return 9" "def f(a: list) -> int: end_nodes = [[0, 1, 2], [3, 4, 5], [7, 8, 9]] branch_id = 0 if a[0] == 1996: if a[3] == 1989: return 6 else: branch_id = 0 if a[3] == 2007 else 1 elif a[0] == 1963: if a[2] == 'NU': return 10 else: branch_id = 2 if a[1] == 1965: return end_nodes[branch_id][0] elif a[1] == 1962: return end_nodes[branch_id][1] elif a[1] == 2015: return end_nodes[branch_id][2] def main(x): return f(x)" "def main(x): d = {'SELF': {1969: {2009: 0, 2002: 1, 1959: 2}, 1996: 3}, 'CSON': {2001: {2009: 4, 2002: 5, 1959: 6}, 1969: {1969: 7, 1996: 8}, 2019: 9}} if x[1] == 'SELF': if type(d[x[1]][x[0]]) == int: return d[x[1]][x[0]] elif x[0] == 1969: return d[x[1]][x[0]][x[3]] elif x[1] == 'CSON': if type(d[x[1]][x[2]]) == int: return d[x[1]][x[2]] elif x[2] == 2001: return d[x[1]][x[2]][x[3]] elif x[2] == 1969: return d[x[1]][x[2]][x[0]]" "def f_x0(x: list, x0_id: int) -> int: x0_list = [[3, 4], [9, 10]] return x0_list[x0_id][0 if x[0] == 2012 else 1] def f_x4(x: list, x4_id: int) -> int: x4_list = [[0, (f_x3, 0), (f_x0, 0)], [6, 7, 8]] a = None if x[4] == 1965: a = x4_list[x4_id][0] elif x[4] == 1994: a = x4_list[x4_id][1] else: a = x4_list[x4_id][2] return a if type(a) != tuple else a[0](x, a[1]) def f_x3(x: list, x3_id: int) -> int: x3_list = [[1, 2], [5, (f_x4, 1)]] a = x3_list[x3_id][0 if x[3] == 'SHELL' else 1] return a if type(a) != tuple else a[0](x, a[1]) def f(x: list) -> int: if x[1] == 'C++': if x[2] == 1985: return f_x4(x, 0) else: return f_x3(x, 1) else: return f_x0(x, 1) def main(x): return f(x)" "def main(x): def one(): if x[2] == 2005: return 0 elif x[2] == 2015: return 1 elif x[2] == 1984: return 2 def two(): if x[2] == 2005: return 3 elif x[2] == 2015: return 4 elif x[2] == 1984: return 5 def three(): if x[3] == 2014: return 8 elif x[3] == 1994: return 9 elif x[3] == 1987: return 10 def four(): if x[2] == 2005: return 7 elif x[2] == 2015: return three() elif x[2] == 1984: return 11 def five(): if x[3] == 2014: return one() elif x[3] == 1994: return two() elif x[3] == 1987: return 6 if x[0] == 'GRACE': return four() elif x[0] == 'TEX': return five()" "step_23 = {'MESON': [8, 'stop'], 'LEX': [9, 'stop']} step_22 = {'MESON': [6, 'stop'], 'LEX': [7, 'stop']} step_21 = {'ECL': [3, 'stop'], 'GO': [4, 'stop'], 'SVG': [5, 'stop']} step_20 = {1959: [0, 'stop'], 1997: [1, 'stop'], 1994: [2, 'stop']} step_11 = {1959: [step_22, 2], 1997: [step_23, 3], 1994: [10, 'stop']} step_10 = {'MESON': [step_20, 0], 'LEX': [step_21, 1]} step_00 = {'TEX': [step_10, 0], 'STAN': [step_11, 1], 'OZ': [11, 'stop']} list_of_steps = [[step_00], [step_10, step_11], [step_20, step_21, step_22, step_23]] def main(x): result = {} cnt = 0 where_to_search = 0 while isinstance(result, dict): item = list_of_steps[cnt][where_to_search] for item_of_x in x: if item_of_x in item: cnt += 1 result = item[item_of_x][0] where_to_search = item[item_of_x][1] break return result" "TREE = dict(_id=2, FANCY=9, LEX=10, QMAKE=dict(_id=1, BOO=dict(_id=4, BOO=0, IO=dict(_id=3, NINJA=1, MUPAD=2), HAML=3), NL=dict(_id=3, NINJA=dict(_id=4, BOO=4, IO=5, HAML=6), MUPAD=7), ADA=8)) def interp(x, tree): i = tree['_id'] key = x[i] val = tree[key] if type(val) is int: return val else: return interp(x, val) def main(x): return interp(x, TREE)" "def main(x): match x[0]: case 'OZ': return 14 case 'NIM': return 13 case 'LASSO': match x[3]: case 1976: match x[2]: case 'STAN': match x[1]: case 'LFE': return 0 case 'PUG': return 1 case 'STON': return 2 case 'XSLT': return 3 case 'GENIE': match x[4]: case 2007: return 4 case 1998: return 5 case 2001: return 6 case 2008: return 7 case 1971: match x[4]: case 2007: match x[2]: case 'STAN': return 8 case 'XSLT': return 9 case 'GENIE': return 10 case 1998: return 11 case 2001: return 12" "from typing import Dict, Union class EndOfChain: def __init__(self, val: int): self._val = val def __repr__(self): return ''.format(self._val) def __str__(self): return ''.format(self._val) def get_eoc_val(self) -> int: return self._val class SkipElement: def __init__(self, levels_skipping: int): self._levels_skipping = levels_skipping def __repr__(self): return ''.format(self._levels_skipping) def __str__(self): return ''.format(self._levels_skipping) def get_remaining(self) -> int: return self._levels_skipping def decrease_remaining(self): self._levels_skipping -= 1 STORE = {'FORTH': {'ROFF': {'ALLOY': EndOfChain(0), 'FISH': EndOfChain(1), 'GRACE': EndOfChain(2)}, 'M': EndOfChain(3)}, 'HTTP': EndOfChain(4), 'GO': {'__SKIP__': SkipElement(1), 'ALLOY': {1971: EndOfChain(5), 2008: EndOfChain(6)}, 'FISH': EndOfChain(7), 'GRACE': {1971: EndOfChain(8), 2008: EndOfChain(9)}}} def crawl(path: list[Union[str, int]], store: Dict[Union[str, int], Union[SkipElement, EndOfChain, Dict]]) -> int: if '__SKIP__' in store and isinstance(store['__SKIP__'], SkipElement): skip_marker = store['__SKIP__'] skip_marker.decrease_remaining() if skip_marker.get_remaining() <= 0: store.pop('__SKIP__') path.pop(0) return crawl(path, store) return crawl(path, store) current_level = path.pop(0) if not current_level in store: return -1 if isinstance(store[current_level], EndOfChain): return store[current_level].get_eoc_val() return crawl(path, store[current_level]) def f(path: list[Union[str, int]]) -> int: if path[1] == 'INI': return 10 path.pop(1) return crawl(path, STORE) main = f" "def main(x): tree = [1, {'RAML': [0, {'TCL': [3, {'DIFF': 0, 'NGINX': 1, 'GAP': 2}], 'AGDA': 3, 'HY': 4}], 'FREGE': 5, 'SLIM': [3, {'DIFF': [2, {'MQL5': 6, 'C++': 7}], 'NGINX': 8, 'GAP': [0, {'TCL': 9, 'AGDA': 10, 'HY': 11}]}]}] while type(tree) is not int: tree = tree[1][x[tree[0]]] return tree" "def main(x): pathes = [{'HYPHY', 'PERL', 1963, 'ECL', 'QMAKE'}, {'PERL', 1963, 'ECL', 'NIM'}, {'PERL', 1963, 'ECL', 'VHDL'}, {'HYPHY', 'PERL', 1963, 'IDL'}, {'SWIFT', 'PERL', 1963, 'IDL'}, {'GN', 'PERL', 1963, 'IDL'}, {'PAN', 1963}, {'CMAKE', 1963}, {1971}, {'HYPHY', 1983, 'QMAKE'}, {'HYPHY', 1983, 'NIM'}, {'HYPHY', 1983, 'VHDL'}, {'SWIFT', 1983}, {'GN', 1983}] for (i, path) in enumerate(pathes): if path.issubset(x): return i" "def main(x): if x[3] == 'FORTH': return lvl1(x) elif x[3] == 'GOSU': return 10 else: return 11 def lvl1(x): if x[4] == 1960: return lvl11(x) elif x[4] == 1963: return lvl12(x) def lvl11(x): if x[2] == 1976: return lvl111(x) elif x[2] == 2008: return 2 elif x[2] == 2011: return lvl112(x) def lvl111(x): if x[0] == 1957: return 0 elif x[0] == 1958: return 1 def lvl112(x): if x[1] == 2002: return 3 elif x[1] == 2017: return 4 elif x[1] == 2019: return 5 def lvl12(x): if x[0] == 1957: return lvl121(x) if x[0] == 1958: return 9 def lvl121(x): if x[1] == 2002: return 6 elif x[1] == 2017: return 7 elif x[1] == 2019: return 8" "def main(x): slov_1975_2018 = {1981: 0, 1970: 1} slov_1975_1983 = {1981: 2, 1970: 3} slov_1975_1968 = {1981: 4, 1970: 5} slov_1960_1968 = {1981: 8, 1970: 9} slov_all = {2018: 6, 1983: 7, 1976: 10} if int(x[0]) == 1975: if x[3] == 2018: return slov_1975_2018.get(x[2]) elif x[3] == 1983: return slov_1975_1983.get(x[2]) elif x[3] == 1968: return slov_1975_1968.get(x[2]) elif int(x[0]) == 1960: if x[3] == 1968: return slov_1960_1968.get(x[2]) else: return slov_all.get(x[3]) else: return 10" "def main(x): a = [0, {'GAP': [4, {'RAML': [2, {'XOJO': 0, 'APEX': [1, {'AGDA': 1, 'M': 2}]}], 'OOC': [2, {'XOJO': 3, 'APEX': [1, {'AGDA': 4, 'M': 5}]}]}], 'APL': [3, {'R': [2, {'XOJO': [4, {'RAML': 6, 'OOC': 7}], 'APEX': [4, {'RAML': 8, 'OOC': 9}]}], 'ASP': 10}]}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): x_3 = [2013, 1992, 1979] if x[2] == 1990: if x[1] == 'DIFF': return x_3.index(x[3]) else: return x_3.index(x[3]) + 3 elif x[3] == 2013: if x[0] == 1959: return 6 elif x[0] == 1989: return 7 else: return 8 else: return x_3.index(x[3]) + 8" "import math import random import copy tree = {1994: {'NUMPY': {2008: {'OZ': 0, 'C': 1}, 1976: {'OZ': 2, 'C': 3}, 1971: {'OZ': 4, 'C': 5}}, 'FREGE': {1975: 6, 1965: 7}}, 1986: 8, 2003: {'OZ': 9, 'C': 10}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "import math import random import copy tree = {'ZIMPL': {1972: {1991: 0, 1982: 1, 2018: 2}, 1983: {1985: 3, 1986: 4}}, 'OPAL': {1985: {1991: 5, 1982: 6, 2018: 7}, 1986: {1991: 8, 1982: 9, 2018: 10}}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "def main(x): slov_SLIM_ELM_1992 = {'ABAP': 0, 'IO': 1, 'GRACE': 2} slov_VALA_1992_ELM = {'ABAP': 5, 'IO': 6, 'GRACE': 7} slov_VALA_1992_PERL = {1977: 8, 1987: 9} if x[1] == 'SLIM': if x[3] == 'ELM': if x[2] == 1992: return slov_SLIM_ELM_1992.get(x[0]) else: return 3 else: return 4 elif x[1] == 'VALA': if x[2] == 1992: if x[3] == 'ELM': return slov_VALA_1992_ELM.get(x[0]) else: return slov_VALA_1992_PERL.get(x[4]) else: return 10 else: return 11" "def main(x): x0 = {'SHEN': {'LEAN': 0, 'ARC': 1, 'NIM': 2}, 'JSON5': 3, 'CSV': {'LEAN': 4, 'ARC': 5, 'NIM': 6}} x1 = {'SHEN': 9, 'JSON5': 10, 'CSV': 11} x3 = {'PUG': 7, 'D': 8} if x[2] == 'TLA': return 13 elif x[2] == 'DYLAN': if x[0] == 'JSON5': return 3 elif x[0] == 'SHEN' or 'CSV': s1 = x0[x[0]] return s1[x[1]] elif x[2] == 'PIKE': if x[1] == 'LEAN': return x3[x[3]] elif x[1] == 'ARC': return x1[x[0]] elif x[1] == 'NIM': return 12" "def main(x): a1 = {2020: 0, 1987: 1, 2008: 2} a2 = {2020: 4, 1987: 5, 2008: 6} a3 = {1982: 7, 2008: 8} a12 = {1973: a1, 2008: a2} if int(x[4]) == 1986: if x[2] == 2020: if x[1] == 1979: return 3 else: return a12.get(x[1]).get(x[0]) elif x[2] == 1986: return a3.get(x[3]) else: return 9 else: return 10" "def main(x): a = [3, {1972: [4, {1994: [2, {1974: 0, 1980: [0, {1980: 1, 2013: 2}], 2016: 3}], 2012: [1, {2018: [0, {1980: 4, 2013: 5}], 2017: 6, 1975: [2, {1974: 7, 1980: 8, 2016: 9}]}]}], 2008: 10}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): a = [1, {1970: [2, {'NGINX': [4, {'SAGE': 0, 'CMAKE': [3, {'PAN': 1, 'MQL4': 2, 'STATA': 3}], 'STATA': [3, {'PAN': 4, 'MQL4': 5, 'STATA': 6}]}], 'RED': [4, {'SAGE': 7, 'CMAKE': [0, {'LUA': 8, 'SMALI': 9, 'ELM': 10}], 'STATA': 11}]}], 1967: 12}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(lst): a = [0, {2010: [2, {2009: [1, {'XC': 0, 'APL': 1, 'JFLEX': 2}], 2001: [1, {'XC': 3, 'APL': 4, 'JFLEX': 5}]}], 2006: [1, {'XC': [2, {2009: 6, 2001: 7}], 'APL': [3, {2007: 8, 1960: 9}], 'JFLEX': 10}]}] while type(a) is not int: a = a[1][lst[a[0]]] return a" "def LEFTfirst(x): if x[1] == 'RUST': return LEFTsecondleft(x) elif x[1] == 'LESS': return 6 else: return 7 def LEFTsecondleft(x): if x[3] == 1961: return LEFTthirdright(x) elif x[3] == 2002: return LEFTfourleft(x) else: return 5 def LEFTfourleft(x): if x[0] == 'XML': return 2 elif x[0] == 'HCL': return 3 else: return 4 def LEFTthirdright(x): if x[4] == 'GDB': return 0 else: return 1 def RIGHTfirst(x): if x[1] == 'RUST': return RIGHTsecondleft(x) elif x[1] == 'LESS': return 12 else: return 13 def RIGHTsecondleft(x): if x[0] == 'XML': return RIGHTthirdright(x) elif x[0] == 'HCL': return 10 else: return 11 def RIGHTthirdright(x): if x[4] == 'GDB': return 8 else: return 9 def f(x): if x[2] == 2002: return LEFTfirst(x) elif x[2] == 2003: return RIGHTfirst(x) else: return 14 def main(x): return f(x)" "def main(x): if x[1] == 1985: if x[2] == 2003: if x[0] == 1964: return 0 elif x[0] == 2019: return 1 else: return 2 else: return 3 elif x[1] == 2005: if x[0] == 1964: if x[3] == 'DYLAN': return 5 else: return 6 elif x[0] == 2019: return 7 elif x[2] == 2003: return 8 else: return 9 else: return 4" "def man1(unit): if unit[3] == 2003: return 7 elif unit[3] == 1989: return ['LLVM', 'R', 'EJS'].index(unit[1]) + 8 def man2(unit): units = unit if unit[4] == 2018: return 11 elif unit[4] == 1971: return man1(units) def man3(unit): if unit[1] == 'EJS': if unit[3] == 2003: return 4 elif unit[3] == 1989: return [1971, 2018].index(unit[4]) + 5 def main(unit1): unit2 = unit1 if unit1[0] == 2014: return 12 elif unit1[0] == 1957: return man2(unit2) elif unit1[0] == 1983: if unit1[1] == 'R': return 3 elif unit1[1] == 'EJS': return man3(unit2) elif unit1[1] == 'LLVM': if unit1[3] == 1989: return 2 elif unit1[3] == 2003: return [1971, 2018].index(unit1[4])" "def main(arr): tree = {1959: {'TLA': {1966: 0, 2013: 1}, 'MINID': {1966: 2, 2013: 3}, 'GLSL': {1966: 4, 2013: 5}}, 1988: {'TLA': 6, 'MINID': 7, 'GLSL': {2016: 8, 2002: 9, 1993: 10}}} if type(tree[arr[2]][arr[3]]) is dict: if tree[arr[2]][arr[3]].get(arr[1]) is not None: return tree[arr[2]][arr[3]][arr[1]] else: return tree[arr[2]][arr[3]][arr[0]] else: return tree[arr[2]][arr[3]]" "def main(x): adr = {0: 0, 'EAGLE': {0: 1, 1962: {0: 2, 1973: {0: 5}, 2007: {0: 6}, 1976: {0: 7}}, 1957: {0: 8}, 2011: {0: 4, 1965: {0: 2, 1973: {0: 9}, 2007: {0: 10}, 1976: {0: 11}}, 1981: {0: 12}, 1969: {0: 2, 1973: {0: 13}, 2007: {0: 14}, 1976: {0: 15}}}}, 'ATS': {0: 16}} buf = adr while 1: if buf[0] > 4: return buf[0] - 5 buf = buf[x[buf[0]]]" "def main(x): adr = {0: 0, 1998: {0: 4, 1972: {0: 3, 'XSLT': {0: 5}, 'REXX': {0: 6}, 'ALLOY': {0: 2, 2012: {0: 7}, 1970: {0: 8}}}, 1983: {0: 3, 'XSLT': {0: 9}, 'REXX': {0: 10}, 'ALLOY': {0: 2, 2012: {0: 11}, 1970: {0: 12}}}, 1980: {0: 3, 'XSLT': {0: 2, 2012: {0: 13}, 1970: {0: 14}}, 'REXX': {0: 15}, 'ALLOY': {0: 16}}}, 1980: {0: 17}, 2009: {0: 18}} buf = adr while 1: if buf[0] > 4: return buf[0] - 5 buf = buf[x[buf[0]]]" "def main(x): match x[4]: case 'METAL': return 11 case 'HAXE': match x[1]: case 'VOLT': return 5 case 'STAN': match x[0]: case 1969: return 3 case 1981: return 4 case 2018: match x[3]: case 'ADA': return 0 case 'P4': return 1 case 'NCL': return 2 case 'NU': match x[3]: case 'ADA': return 6 case 'NCL': return 10 case 'P4': match x[0]: case 2018: return 7 case 1969: return 8 case 1981: return 9" "def main(arr, list=0, check=2): tree = {0: {'CSS': [1, 1, 1], 'MASK': [1, 2, 3], 'OZ': [0, 12]}, 1: {'EDN': [1, 3, 3], 'SAGE': [1, 4, 3]}, 2: {1973: [1, 5, 1], 2005: [1, 6, 0], 1993: [0, 11]}, 3: {1973: [0, 0], 2005: [0, 1], 1993: [0, 2]}, 4: {1973: [0, 3], 2005: [0, 4], 1993: [0, 5]}, 5: {'EDN': [0, 6], 'SAGE': [0, 7]}, 6: {2005: [0, 8], 2010: [0, 9], 1985: [0, 10]}} while tree[list][arr[check]][0]: t_list = tree[list][arr[check]][1] check = tree[list][arr[check]][2] list = t_list return tree[list][arr[check]][1]" "def main(x): path = {'XBASE': {1988: {1983: 0, 1990: {'HY': 1, 'PERL6': 2}}, 1986: {'HY': {1983: 3, 1990: 4}, 'PERL6': {1983: 5, 1990: 6}}, 1996: {1983: {'POD': 7, 'WISP': 8, 'XBASE': 9}, 1990: 10}}, 'LASSO': 11} path = path[x[1]] if isinstance(path, int): return path path = path[x[3]] if x[3] == 1986: path = path[x[0]] path = path[x[4]] return path if x[3] == 1988: path = path[x[4]] if isinstance(path, int): return path path = path[x[0]] return path elif x[3] == 1996: path = path[x[4]] if isinstance(path, int): return path path = path[x[2]] return path" "import math def main(x): match x[3]: case 2013: match x[1]: case 'LLVM': match x[2]: case 'TERRA': return 0 case 'SHEN': return 1 case 'LIMBO': return 5 case 'REXX': match x[0]: case 'IOKE': return 2 case 'M': return 3 case 'OCAML': return 4 case 1982: match x[1]: case 'LLVM': return 6 case 'REXX': return 7 case 'LIMBO': match x[2]: case 'TERRA': return 8 case 'SHEN': return 9" "import math def main(x): match x[3]: case 1985: match x[1]: case 1960: match x[2]: case 1982: return 0 case 1976: return 1 case 2003: return 2 case 1997: return 3 case 2016: return 4 case 1966: return 5 case 1996: match x[2]: case 1982: match x[1]: case 1960: return 6 case 1997: return 7 case 2016: return 8 case 1976: match x[0]: case 2008: return 9 case 1980: return 10 case 2020: return 11 case 2003: return 12" "def main(val): tree = {'M4': 12, 'WISP': [4], 'SMT': [3], 'PUG': [3], 'JULIA': {'SMT': 0, 'PUG': [1]}, 'MQL5': {'SMT': [0], 'PUG': 10}, 'R': {'SMT': [1], 'PUG': 11}, 'OPAL': 1, 'C': 2, 'NINJA': 3, 1969: {'R': 4, 'JULIA': 7}, 1995: {'R': 5, 'JULIA': 8}, 2004: {'R': 6, 'JULIA': 9}} to_check = 2 par = '' cur = '' for i in range(4): par = cur cur = val[to_check] to_check = tree[cur] if type(to_check) == list: to_check = to_check[0] elif type(to_check) == dict: to_check = to_check[par] if type(to_check) == int: return to_check else: to_check = to_check[0] else: return to_check" "def main(x): if x[2] == 'C': return solveC(x) elif x[2] == 'MAKO': return 11 elif x[2] == 'METAL': if x[3] == 'LASSO': return solveLasso(x) elif x[3] == 'SMALI': return solveSmali(x) def solveC(x): if x[0] == 2019: return 6 elif x[0] == 2004: if x[1] == 'ZIMPL': return 7 elif x[1] == 'NCL': return 8 elif x[1] == 'CSON': return 9 elif x[0] == 1981: return 10 def solveLasso(x): if x[1] == 'CSON': return 5 elif x[1] == 'NCL': return 4 elif x[1] == 'ZIMPL': return 3 def solveSmali(x): if x[0] == 1981: return 2 if x[0] == 2004: return 1 if x[0] == 2019: return 0" "def main(x): arr = [['SCALA', x[1], 'LESS', 'SAS'], ['SCALA', x[1], 'LESS', 'OPA'], ['SCALA', x[1], 'LESS', 'PONY'], ['SCALA', x[1], 'SMT', x[3]], ['SCALA', 'HLSL', 'GENIE', x[3]], ['SCALA', 'TCL', 'GENIE', x[3]], ['SCALA', 'PUG', 'GENIE', x[3]], ['HLSL', x[1], 'LESS', 'SAS'], ['HLSL', x[1], 'SMT', 'SAS'], ['HLSL', x[1], 'GENIE', 'SAS'], ['HLSL', x[1], x[2], 'OPA'], ['HLSL', x[1], x[2], 'PONY']] if x in arr: return arr.index(x)" "def main(x): x3r = {'EDN': 0, 'RAML': 1} x3l = {'EDN': 5, 'RAML': 6} x0r = {1990: 7, 1978: 8, 1977: 9} x2r = {'TXL': x3r[x[3]], 'COQ': 2, 'SCALA': 3} x2l = {'TXL': 4, 'COQ': x3l[x[3]], 'SCALA': x0r[x[0]]} x1 = {2010: x2r[x[2]], 2013: x2l[x[2]]} x4 = {1986: x1[x[1]], 1995: 10, 1983: 11} return x4[x[4]]" "def main(data: tuple): match data[0]: case 'CHUCK': return a3(data) case 'LFE': return a2(data) case 'C++': return a1(data) def a1(data: tuple): match data[3]: case 'JSON': return 9 case 'NINJA': return 10 def a2(data: tuple): match data[1]: case 1988: return 5 case 1994: return b1(data) def a3(data: tuple): match data[1]: case 1988: return b2(data) case 1994: return 4 def b1(data: tuple): match data[3]: case 'JSON': return 6 case 'NINJA': return c1(data) def b2(data: tuple): match data[3]: case 'JSON': return c2(data) case 'NINJA': return 3 def c1(data: tuple): match data[4]: case 1997: return 7 case 2002: return 8 def c2(data: tuple): match data[2]: case 1997: return 0 case 1965: return 1 case 1959: return 2" "def main(x): d = {'APL': {2010: {2010: {'E': 0, 'XS': 1}, 1972: {'IOKE': 2, 'GOSU': 3, 'CHUCK': 4}}, 1969: {2010: 5, 1972: {'E': 6, 'XS': 7}}, 2009: 8}, 'TEA': {'E': {2010: {2010: 9, 1969: 10, 2009: 11}, 1972: 12}, 'XS': 13}} if x[2] == 'TEA': if type(d[x[2]][x[0]]) == int: return d[x[2]][x[0]] elif type(d[x[2]][x[0]][x[4]]) == int: return d[x[2]][x[0]][x[4]] return d[x[2]][x[0]][x[4]][x[1]] elif x[2] == 'APL': if type(d[x[2]][x[1]]) == int: return d[x[2]][x[1]] elif type(d[x[2]][x[1]][x[4]]) == int: return d[x[2]][x[1]][x[4]] elif x[1] == 2010: if x[4] == 2010: return d[x[2]][x[1]][x[4]][x[0]] return d[x[2]][x[1]][x[4]][x[3]] elif x[1] == 1969: return d[x[2]][x[1]][x[4]][x[0]]" "def main(x): dict1 = {'XS': 2, 'METAL': 3, 'ABNF': 4} dict2 = {'ORG': 6, 'XC': 7, 'ANTLR': 8} dict3 = {'ORG': 9, 'XC': 10, 'ANTLR': 11} if x[0] == 1962: if x[3] == 1988: if x[1] == 'FREGE': return 0 elif x[1] == 'C': return 1 elif x[1] == 'COOL': return dict1.get(x[2]) elif x[3] == 1969: if x[1] == 'FREGE': return 5 elif x[1] == 'C': return dict2.get(x[4]) elif x[1] == 'COOL': return dict3.get(x[4]) return 12" "def main(x): match x[2]: case 2000: match x[0]: case 1958: match x[3]: case 1988: match x[4]: case 1980: return 0 case 2017: return 1 case 1999: match x[1]: case 1971: return 2 case 1982: return 3 case 1980: return 4 case 1970: match x[1]: case 1971: return 5 case 1982: match x[4]: case 1980: return 6 case 2017: return 7 case 1980: return 8 case 1961: return 9" "def main(x): a = [0, {'LATTE': [1, {'XSLT': [2, {1963: 0, 1967: 1, 2011: 2}], 'GLSL': 3}], 'DIFF': 4, 'CSON': [3, {'ASP': 5, 'INI': 6, 'FANCY': [2, {1963: 7, 1967: 8, 2011: 9}]}]}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): def check1(a, b, c): if x[4] == 'MIRAH': return a elif x[4] == 'STON': return b elif x[4] == 'IDRIS': return c def check2(a, b): if x[3] == 1978: return a elif x[3] == 2013: return b def check3(a, b): if x[2] == 2019: return a elif x[2] == 1985: return b if x[0] == 'JAVA': if x[1] == 1958: return check2(0, check3(1, 2)) elif x[1] == 2013: return check3(check1(3, 4, 5), 6) elif x[1] == 1967: return 7 if x[0] == 'PAWN': return 8 if x[0] == 'TOML': return check1(9, 10, 11)" "import cmath import math def analyze_third(items): if items[2] == 'TLA': return analyze_first(items) if items[2] == 'CMAKE': return 10 if items[2] == 'MUF': return 11 def analyze_first(items): if items[0] == 2013: return 9 if items[0] == 1992: return analyze_second(items, analyze_fifth(items, 4, 5), 6, analyze_fifth(items, 7, 8)) if items[0] == 1962: return analyze_fifth(items, 0, analyze_second(items, 1, 2, 3)) def analyze_second(items, up, middle, down): if items[1] == 'HCL': return up if items[1] == 'CUDA': return middle if items[1] == 'NIM': return down def analyze_fifth(items, up, down): if items[4] == 1968: return up if items[4] == 1963: return down def main(items): return analyze_third(items)" "def main(x): match x[3]: case 2020: match x[1]: case 'REBOL': match x[2]: case 1979: return 0 case 2002: return 1 case 1981: return 2 case 'TXL': match x[2]: case 1979: return 3 case 2002: return 4 case 1981: return 5 case 1991: match x[0]: case 1983: match x[1]: case 'REBOL': return 6 case 'TXL': return 7 case 2000: return 8 case 1964: match x[2]: case 1979: return 9 case 2002: return 10 case 1981: return 11" "def main(x): res = {} res['PHP'] = 10 res['SQL'] = {} res['SQL']['NINJA'] = 9 res['SQL']['LOGOS'] = {} res['SQL']['LOGOS']['XOJO'] = 8 res['SQL']['LOGOS']['LLVM'] = 7 res['SQL']['LOGOS']['FLUX'] = 6 res['HLSL'] = {} res['HLSL']['LATTE'] = 5 res['HLSL']['NL'] = {} res['HLSL']['NL']['LOGOS'] = 3 res['HLSL']['NL']['NINJA'] = 4 res['HLSL']['D'] = {} res['HLSL']['D']['XOJO'] = 2 res['HLSL']['D']['LLVM'] = 1 res['HLSL']['D']['FLUX'] = 0 if x[1] == 'PHP': return res[x[1]] elif x[1] == 'SQL': if x[2] == 'NINJA': return res[x[1]][x[2]] elif x[2] == 'LOGOS': return res[x[1]][x[2]][x[0]] elif x[1] == 'HLSL': if x[3] == 'LATTE': return res[x[1]][x[3]] if x[3] == 'NL': return res[x[1]][x[3]][x[2]] if x[3] == 'D': return res[x[1]][x[3]][x[0]]" "def f6_1(edges, left, middle, right): if edges[3] == 1994: return right if edges[3] == 2017: return middle if edges[3] == 1964: return left def f6_2(edges, left, right): if edges[2] == 'IOKE': return right if edges[2] == 'COOL': return left def f6(edges, left, middle, right): if edges[1] == 'TEXT': return left elif edges[1] == 'PLSQL': return middle elif edges[1] == 'SAS': return right def main(n): return f6(n, 9, f6_1(n, f6_2(n, 8, 7), 6, 5), f6_1(n, 4, f6_2(n, 3, 2), f6_2(n, 1, 0)))" "def main(x): def check1(a, b): if x[0] == 'SAS': return a elif x[0] == 'TEXT': return b def check2(a, b): if x[1] == 'GAMS': return a elif x[1] == 'GO': return b def check3(a, b): if x[4] == 'GRACE': return a elif x[4] == 'YAML': return b if x[3] == 1978: return check1(check2(check3(9, 10), 11), 12) elif x[3] == 1973: if x[2] == 1998: return check3(check1(2, 3), check1(4, 5)) elif x[2] == 1996: return check2(0, 1) elif x[2] == 1966: return check3(6, check1(7, 8))" "def sfi(x, left_result, middle_result, right_result): if x[1] == 1989: return left_result if x[1] == 1988: return middle_result if x[1] == 1959: return right_result def ss(x, left_result, middle_result, right_result): if x[2] == 'LESS': return left_result if x[2] == 'SHELL': return middle_result if x[2] == 'MAKO': return right_result def st(x, left_result, right_result): if x[3] == 1966: return left_result if x[3] == 2006: return right_result def sf(x, left_result, right_result): if x[4] == 'MAX': return left_result if x[4] == 'TCSH': return right_result def main(x): return st(x, sf(x, sfi(x, 0, ss(x, 1, 2, 3), ss(x, 4, 5, 6)), 7), ss(x, sf(x, sfi(x, 8, 9, 10), 11), 12, 13))" "def main(x): res = {'ARC': 13, 'NU': {'PIKE': {'CIRRU': 0, 'P4': {'PAWN': 1, 'LASSO': 2, 'JASON5': 3}, 'GAMS': 4}, 'SAS': {'COOL': 5, 'APEX': 6, 'NUMPY': 7}, 'KIT': {'CIRRU': 8, 'P4': {'COOL': 9, 'APEX': 10, 'NUMPY': 11}, 'GAMS': 12}}} i = 0 while i < 5: if x[i] in res: res = res[x[i]] i = -1 if isinstance(res, int): break i += 1 return res" "class Node: def __init__(self, branch='', value=-1, x_num=-1): self.branch = branch self.value = value self.x_num = x_num self.nodes = [] def add_node(self, branch='', value=-1, x_num=-1): self.nodes.append(Node(branch, value, x_num)) def create_tree(root): root.x_num = 0 root.add_node(branch='XSLT', x_num=2) root.nodes[0].add_node(branch=1981, x_num=1) root.nodes[0].nodes[0].add_node(branch='REXX', x_num=4) root.nodes[0].nodes[0].nodes[0].add_node(branch='XS', value=0) root.nodes[0].nodes[0].nodes[0].add_node(branch='SCSS', value=1) root.nodes[0].nodes[0].add_node(branch='DM', value=2) root.nodes[0].nodes[0].add_node(branch='COQ', x_num=3) root.nodes[0].nodes[0].nodes[2].add_node(branch='LFE', value=3) root.nodes[0].nodes[0].nodes[2].add_node(branch='JSX', value=4) root.nodes[0].add_node(branch=1963, value=5) root.add_node(branch='PLSQL', x_num=4) root.nodes[1].add_node(branch='XS', value=6) root.nodes[1].add_node(branch='SCSS', value=7) root.add_node(branch='HTTP', x_num=2) root.nodes[2].add_node(branch=1981, x_num=1) root.nodes[2].nodes[0].add_node(branch='REXX', value=8) root.nodes[2].nodes[0].add_node(branch='DM', value=9) root.nodes[2].nodes[0].add_node(branch='COQ', value=10) root.nodes[2].add_node(branch=1963, value=11) def count_tree(node, x): if node.x_num != -1: for next_node in node.nodes: if next_node.branch == x[node.x_num]: return count_tree(next_node, x) else: return node.value def main(x): root = Node() create_tree(root) return count_tree(root, x)" "def el(x): if x[0] == 'SAS': return 5 elif x[3] == 1979: return 0 elif x[3] == 1986: return 1 elif x[4] == 'HTTP': return 4 elif x[4] == 'EBNF': return 3 else: return 2 def main(x): if x[1] == 1984: if x[3] == 1979: return 6 elif x[3] == 1969: return 11 elif x[4] == 'HTTP': return 10 elif x[4] == 'EBNF': return 9 elif x[0] == 'SAS': return 8 else: return 7 else: return el(x)" "def main(x): rrl = {1985: 7, 2016: 8, 1967: 9} rl = {2010: rrl[x[1]], 2016: 10} lrr = {'HAXE': 3, 'IDRIS': 4, 'OOC': 5} rrr = {1985: 0, 2016: 1, 1967: 2} rr = {2010: rrr[x[1]], 2016: lrr[x[0]]} r = {1982: rr[x[2]], 2017: 6} L = {1982: rl[x[2]], 2017: 11} c = {1968: r[x[3]], 2017: L[x[3]], 2010: 12} return c[x[4]]" "def main(s): i = 0 k = 0 a0 = s[0] a1 = s[1] a2 = s[2] a3 = s[3] a4 = s[4] n0 = ['CLICK', 1995, 'CHUCK', a3, a4] n1 = ['CLICK', 1995, 'TEA', a3, 1970] n2 = ['CLICK', 1995, 'TEA', a3, 1958] n3 = ['CLICK', 1995, 'RAML', 'REXX', a4] n4 = ['CLICK', 1995, 'RAML', 'GN', a4] n5 = ['CLICK', 1982, a2, a3, a4] n6 = ['LOGOS', a1, a2, a3, a4] n7 = ['X10', a1, 'CHUCK', 'REXX', a4] n8 = ['X10', a1, 'CHUCK', 'GN', a4] n9 = ['X10', a1, 'TEA', a3, a4] n10 = ['X10', a1, 'RAML', a3, a4] n = [n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, n10] for i in range(10): if s == n[i]: break k = k + 1 return k" "def main(x): match x[0]: case 'JSON': match x[4]: case 'PERL': match x[1]: case 'PIKE': return 0 case 'OPA': return 1 case 'EDN': match x[3]: case 'CLIPS': return 2 case 'GENIE': return 3 case 'KRL': return 4 case 'ADA': return 5 case 'NIT': match x[4]: case 'PERL': return 6 case 'KRL': match x[2]: case 'VHDL': match x[1]: case 'PIKE': return 7 case 'OPA': return 8 case 'EDN': return 9 case 'SQL': return 10 case 'LATTE': return 11" "def F(x): if x[0] == 1970: return SU(x) elif x[0] == 2006: return SD(x) else: return 14 def SU(x): if x[1] == 2004: return TU(x) elif x[1] == 1972: return TD(x) else: return 7 def TU(x): if x[2] == 2005: return FU(x) elif x[2] == 2010: return 3 else: return 4 def FU(x): if x[4] == 2011: return 0 elif x[4] == 2007: return 1 else: return 2 def TD(x): if x[3] == 'PAN': return 5 elif x[3] == 'BISON': return 6 def SD(x): if x[3] == 'PAN': return TU2(x) elif x[3] == 'BISON': return 13 def TU2(x): if x[1] == 2004: return FD(x) elif x[1] == 1972: return 11 else: return 12 def FD(x): if x[4] == 2011: return 8 elif x[4] == 2007: return 9 else: return 10 def main(x): return F(x)" "def main(x): if x[4] == 'P4': return left(x) elif x[4] == 'EJS': return 4 else: return right(x) def left(x): if x[1] == 'SMALI': return leftleft(x) else: return 3 def leftleft(x): if x[3] == 1977: return 0 elif x[3] == 2014: return 1 else: return 2 def right(x): if x[3] == 1977: return rightleft(x) elif x[3] == 2014: return rightcenter(x) else: return 11 def rightleft(x): if x[0] == 1967: return 5 else: return 6 def rightcenter(x): if x[1] == 'SMALI': return rightcenterleft(x) else: return rightcenterright(x) def rightcenterleft(x): if x[0] == 1967: return 7 else: return 8 def rightcenterright(x): if x[0] == 1967: return 9 else: return 10" "class Node: def __init__(self, key, values): self.key = key self.values = values def get(self, x): value = self.values[x[self.key]] if isinstance(value, Node): return value.get(x) return value def f(x): n = Node(3, {1964: 12, 1993: Node(4, {'LUA': 11, 'ELM': Node(2, {1967: 10, 1983: Node(1, {'LFE': 7, 'OPAL': 8, 'GRACE': 9})}), 'WISP': Node(0, {'ROOF': 6, 'SQF': Node(1, {'LFE': 3, 'OPAL': 4, 'GRACE': 5}), 'HAML': Node(1, {'LFE': 0, 'OPAL': 1, 'GRACE': 2})})})}) return n.get(x) def main(x): return f(x)" "def first(x): if x[4] == 1964: return LEFTfirst(x) if x[4] == 1961: return RIGHTfirst(x) else: return 4 def LEFTfirst(x): if x[2] == 'IDL': return 0 else: return LEFTsecondright(x) def RIGHTfirst(x): if x[2] == 'IDL': return RIGHTsecondleft(x) else: return RIGHTsecondright(x) def LEFTsecondright(x): if x[1] == 'ELM': return 1 elif x[1] == 'RAGEL': return 2 else: return 3 def RIGHTsecondleft(x): if x[0] == 2017: return 5 else: return 6 def RIGHTsecondright(x): if x[1] == 'ELM': return 7 elif x[1] == 'RAGEL': return 8 else: return 9 def f(x): if x[3] == 'P4': return first(x) else: return 10 def main(x): return f(x)" "def main(arr): match arr[3]: case 'SQLPL': match arr[2]: case 1973: match arr[1]: case 'MESON': return 0 case 'ELM': return 1 case 'OOC': return 2 case 1995: match arr[0]: case 'NCL': return 3 case 'SWIFT': return 4 case 1993: match arr[1]: case 'MESON': return 5 case 'ELM': return 6 case 'OOC': return 7 case 'FREGE': return 8 case 'STON': match arr[2]: case 1973: return 9 case 1995: return 10 case 1993: return 11" "def main(x): match x[4]: case 2016: match x[2]: case 1967: match x[3]: case 'MAX': match x[1]: case 'NIT': f = 0 case 'XML': f = 1 case 'MUPAD': f = 2 case 'XS': f = 3 case 1995: match x[0]: case 1995: f = 4 case 1987: f = 5 case 1977: match x[0]: case 1995: match x[2]: case 1967: f = 6 case 1995: match x[1]: case 'NIT': f = 7 case 'XML': f = 8 case 'MUPAD': f = 9 case 1987: f = 10 return f" "def main(x): a = {2020: {'METAL': {1971: 0, 1975: 1, 1993: 2}, 'ABAP': 3, 'KIT': 4}, 1974: {'METAL': {1977: 5, 2013: 6, 1973: 7}, 'ABAP': {1977: 8, 2013: 9, 1973: 10}, 'KIT': 11}} if x[1] == 2020: if x[2] == 'ABAP' or x[2] == 'KIT': return a[x[1]][x[2]] else: return a[x[1]][x[2]][x[0]] elif x[2] == 'KIT': return a[x[1]][x[2]] else: return a[x[1]][x[2]][x[3]]" "def main(x): if x[0] == 1987: return func1(x) elif x[0] == 1996: return 6 elif x[0] == 1973: return func2(x) def func1(x): if x[3] == 1963: return func3(x) elif x[3] == 1985: return func4(x) elif x[3] == 1986: return 5 def func2(x): if x[3] == 1963: return func5(x) elif x[3] == 1985: return 9 elif x[3] == 1986: return 10 def func3(x): if x[2] == 'EQ': return 0 elif x[2] == 'CLEAN': return 1 def func4(x): if x[1] == 1973: return 2 elif x[1] == 2018: return 3 elif x[1] == 2005: return 4 def func5(x): if x[2] == 'EQ': return 7 elif x[2] == 'CLEAN': return 8" "def third(list): if list[1] == 'ALLOY': return 0 elif list[1] == 'JFLEX': return 1 else: return 2 def fourth(list): if list[2] == 1975: return 3 elif list[2] == 1977: return 4 else: return 5 def first(list): if list[0] == 'MQL5': return third(list) elif list[0] == 'KICAD': return fourth(list) else: return 6 def second(list): if list[1] == 'ALLOY': return 7 elif list[1] == 'JFLEX': return 8 else: return 9 def main(list): if list[3] == 1990: return first(list) elif list[3] == 2019: return second(list) else: return 10" "def main(x): XC_2008 = {'NESC': 0, 'NU': 1, 'OCAML': 2} XC_2009 = {'NESC': 3, 'NU': 4, 'OCAML': 5} JU_2008 = {'NESC': 7, 'NU': 8, 'OCAML': 9} if x[1] == 'XC': if x[0] == 2008: return XC_2008.get(x[3]) elif x[0] == 2009: return XC_2009.get(x[3]) elif x[1] == 'JULIA': if x[0] == 2008: return JU_2008.get(x[3]) else: return 10 else: return 6" "def main(x): match x[3]: case 'SQL': match x[1]: case 'PIC': return 3 case 'PONY': return 4 case 'MAX': match x[2]: case 2001: return 0 case 2013: return 1 case 1986: return 2 case 'X10': match x[1]: case 'MAX': return 5 case 'PIC': return 6 case 'PONY': match x[0]: case 1978: return 7 case 1999: return 8 case 1960: return 9 case 'MQL5': return 10" "def main(arr): match arr[0]: case 'PAN': return 12 case 'VCL': match arr[1]: case 'XOJO': return 9 case 'MQL4': return 10 case 'PAN': return 11 case 'C++': match arr[2]: case 'INI': match arr[1]: case 'XOJO': return 0 case 'MQL4': return 3 case 'PAN': return 6 case 'DM': match arr[1]: case 'XOJO': return 1 case 'MQL4': return 4 case 'PAN': return 7 case 'SWIFT': match arr[1]: case 'XOJO': return 2 case 'MQL4': return 5 case 'PAN': return 8" "def main(x): tree4 = {'KIT': 0, 'HYPHY': 1} tree5 = {'EC': 6, 'SVG': 7, 'OCAML': 8} tree1 = {'EC': 2, 'SVG': 3, 'OCAML': 4} tree0 = {'EJS': tree1, 'J': 5, 'GN': tree5} tree2 = {'SCSS': tree4, 'BISON': tree0} tree3 = {2009: tree2, 1960: 9} tree = tree3 i = 0 while i < len(x): if isinstance(tree, dict): if x[i] in tree: tree = tree[x[i]] if isinstance(tree, dict): i = 0 else: i = i + 1 else: i = len(x) return tree" "def f1(x): if x[1] == 2002: if x[3] == 1998: return 0 elif x[3] == 2017: return 1 elif x[3] == 1961: return 2 elif x[3] == 1998: return 3 elif x[3] == 2017: return 4 else: return 5 def f2(x): if x[1] == 2002: return 8 elif x[0] == 2001: return 9 elif x[0] == 1992: return 10 else: return 11 def main(x): if x[2] == 'SHELL': if x[4] == 1976: return 6 elif x[4] == 1965: return 7 else: return f1(x) elif x[2] == 'ADA': if x[3] == 2017: return 12 elif x[3] == 1961: return 13 else: return f2(x)" "def main(x): array = [[x[0], 'XML', x[2], 2008, 1965], [x[0], 'EQ', 1991, 2008, 1965], [x[0], 'EQ', 2004, 2008, 1965], [x[0], 'EQ', 1979, 2008, 1965], ['NINJA', 'IDL', x[2], 2008, 1965], ['HTML', 'IDL', x[2], 2008, 1965], [x[0], x[1], x[2], 1971, 1965], [x[0], x[1], 1991, 1979, 1965], [x[0], x[1], 2004, 1979, 1965], [x[0], x[1], 1979, 1979, 1965], [x[0], x[1], x[2], x[3], 2007], [x[0], x[1], x[2], x[3], 2020]] if x in array: return array.index(x)" "def reverse(arr, Map): id = 0 for key in Map: if key == 'id': id = Map[key] elif arr[id] == key and type(Map[key]) == dict: return reverse(arr, Map[key]) elif arr[id] == key: return Map[key] return -1 def main(arr): node1 = {'id': 2, 1959: 0, 1982: 1, 1977: 2} node2 = {'id': 1, 'METAL': 5, 'MESON': 6, 'ASN.1': 7} node3 = {'id': 2, 1959: 8, 1982: 9, 1977: 10} node4 = {'id': 1, 'METAL': node1, 'MESON': 3, 'ASN.1': 4} node5 = {'id': 3, 2006: node2, 1989: node3} node6 = {'id': 0, 'COQ': node4, 'OOC': node5, 'SELF': 11} return reverse(arr, node6)" "def main(x): lll = {1959: 9} llr = {'LIMBO': 7, 'NESC': 8} rrl = {'CSS': 1, 'KIT': 2} ll = {'NSIS': 6, 'PHP': llr[x[3]], 'ALLOY': lll[x[0]]} rr = {'LIMBO': 0, 'NESC': rrl[x[4]]} rl = {1959: 4} r = {'NSIS': rr[x[3]], 'PHP': 3, 'ALLOY': rl[x[0]]} L = {'CSS': 5, 'KIT': ll[x[1]]} c = {'GOLO': r[x[1]], 'M': L[x[4]]} return c[x[2]]" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n7_2 = Node(10, [], []) n7_1 = Node(9, [], []) n6_3 = Node(8, [], []) n6_2 = Node(7, [], []) n6_1 = Node(6, [], []) n5_2 = Node(3, [], []) n5_1 = Node(2, [], []) n4_2 = Node(1, [], []) n4_1 = Node(0, [], []) n7 = Node(x[0], [1969, 1957], [n7_1, n7_2]) n6 = Node(x[2], ['NIX', 'CSON', 'NIT'], [n6_1, n6_2, n6_3]) n2_0 = Node(4, [], []) n5 = Node(x[0], [1969, 1957], [n5_1, n5_2]) n4 = Node(x[1], [2000, 1961], [n4_1, n4_2]) n3 = Node(x[1], [2000, 1961], [n6, n7]) n1_0 = Node(5, [], []) n2 = Node(x[2], ['NIX', 'CSON', 'NIT'], [n4, n5, n2_0]) n_1 = Node(11, [], []) n1 = Node(x[3], [1996, 1975, 1995], [n2, n1_0, n3]) n = Node(x[4], [1979, 2008], [n1, n_1]) while n: res = n.data n = n.find_next() return res" "_dict = {'MESON': {'XS': {'ALLOY': 5, 'SLASH': 6}, 'KRL': {'ALLOY': 7, 'SLASH': 8}, 'KICAD': {'NIX': 9, 'COOL': 10}}, 'VALA': {'XS': {'ALLOY': 0, 'SLASH': 1}, 'KRL': 2, 'KICAD': {'NIX': 3, 'COOL': 4}}, 'PAWN': 11} def main(_list): return helper(_list, _dict) def helper(_list, _dict2): for i in _list: if i in _dict2: if isinstance(_dict2[i], dict): return helper(_list, _dict2[i]) else: return _dict2[i]" "def main(path): s1 = s[path[2]] if path[2] == 'ZIMPL': s2 = s1[path[4]] if path[4] == 1963: s3 = s2[path[0]] if path[0] == 'RUBY': return s3 return s3[path[1]] elif path[4] == 1991: s3 = s2[path[0]] if path[0] == 'STON': return s3[path[1]] return s3 elif path[4] == 2001: return s2 elif path[2] == 'ASP': return s1 s = {'ZIMPL': {1963: {'RUBY': 0, 'XSLT': {2005: 1, 2012: 2, 1958: 3}, 'STON': {2005: 4, 2012: 5, 1958: 6}}, 1991: {'RUBY': 7, 'XSLT': 8, 'STON': {2005: 9, 2012: 10, 1958: 11}}, 2001: 12}, 'ASP': 13}" "s = {'J': {'URWEB': {1967: 0, 1973: 1}, 'SCSS': 2}, 'SMT': {1967: {1970: 3, 1976: 4, 1981: 5}, 1973: {1970: 6, 1976: 7, 1981: 8}}, 'X10': {1970: {1967: 9, 1973: 10}, 1976: 11, 1981: 12}} def main(path): s1 = s[path[2]] if path[2] == 'J': s2 = s1[path[3]] if isinstance(s2, int): return s2 else: return s2[path[0]] elif path[2] == 'SMT': s2 = s1[path[0]] return s2[path[1]] elif path[2] == 'X10': s2 = s1[path[1]] if isinstance(s2, int): return s2 else: return s2[path[0]]" "def main(find_text): return {2012: {'ECL': {1988: {'NINJA': 0, 'URWEB': 1}[find_text[1]], 1992: {'NINJA': 2, 'URWEB': 3}[find_text[1]], 2020: {2015: 4, 1957: 5}[find_text[2]]}[find_text[0]], 'XS': {2015: 6, 1957: 7}[find_text[2]]}[find_text[3]], 1957: {2015: 8, 1957: {1988: {'NINJA': 9, 'URWEB': 10}[find_text[1]], 1992: 11, 2020: 12}[find_text[0]]}[find_text[2]]}[find_text[4]]" "def funk_1(some_list): if some_list[1] == 1971: return 2 if some_list[1] == 2003: if some_list[0] == 2004: return 3 if some_list[0] == 1966: return 4 if some_list[1] == 2009: if some_list[3] == 1992: return 5 if some_list[3] == 1972: return 6 if some_list[3] == 1978: return 7 def funk_2(some_list): if some_list[2] == 1957: return 8 if some_list[2] == 1990: if some_list[0] == 2004: return 0 if some_list[0] == 1966: return 1 if some_list[2] == 1981: return funk_1(some_list) def main(some_list): if some_list[4] == 2010: return 11 if some_list[4] == 2003: if some_list[0] == 2004: return 9 if some_list[0] == 1966: return 10 if some_list[4] == 1980: return funk_2(some_list)" "def main(x): if x[3] == 'EC': if x[1] == 1959: if x[0] == 'PHP': return 0 elif x[0] == 'JULIA': return 1 return 2 if x[0] == 'PHP': return 3 elif x[0] == 'JULIA': return 4 return 5 elif x[3] == 'CUDA': if x[2] == 1994: if x[1] == 1959: return 8 return 9 return 7 return 6" "def null(x, up, down): if x[0] == 1957: return up if x[0] == 1983: return down def first(x, up, mid, down): if x[1] == 'LATTE': return up if x[1] == 'OX': return mid if x[1] == 'NUMPY': return down def main(x): if x[3] == 'NGINX': return first(x, null(x, 0, 1), null(x, 2, 3), 4) if x[3] == 'EDN': return first(x, 5, null(x, 6, 7), 8) if x[3] == 'MAX': return 9" "s = {1968: {'PIC': {2010: {'FLUX': 0, 'EC': 1, 'VUE': 2}, 1961: {'NU': 3, 'GDB': 4}}, 'SHEN': 5}, 2018: {'PIC': {2010: {'FLUX': 6, 'EC': 7, 'VUE': 8}, 1961: 9}, 'SHEN': 10}} def main(path): s1 = s[path[0]] s2 = s1[path[2]] if isinstance(s2, int): return s2 s3 = s2[path[4]] if isinstance(s3, int): return s3 if path[4] == 2010: return s3[path[1]] else: return s3[path[3]]" "def main(x): f = {0: -2, 'MIRAH': {0: -1, 1983: {0: -4, 1990: {0: -5, 'BLADE': {0: 0}, 'CMAKE': {0: 1}, 'PAN': {0: 2}}, 1961: {0: 3}, 2018: {0: 4}}, 2020: {0: -3, 'KICAD': {0: -5, 'BLADE': {0: 5}, 'CMAKE': {0: 6}, 'PAN': {0: 7}}, 'ROFF': {0: 8}, 'SCAML': {0: 9}}}, 'DIFF': {0: 10}, 'AGDA': {0: 11}} while True: if f[0] >= 0: return f[0] f = f[x[f[0] + 5]]" "def main(args): dict1 = {'MESON': 0, 'MQL5': 1, 'ORG': 2} dict2 = {'FISH': 3, 'TEX': 4, 'OZ': 5} dict11 = {'MESON': 6, 'MQL5': 7, 'ORG': 8} dict3 = {1973: dict1[args[1]], 1992: dict2[args[2]], 1969: dict11[args[1]]} dict111 = {'MESON': 9, 'MQL5': 10, 'ORG': 11} dict0 = {'FANCY': dict3[args[3]], 'SVG': dict111[args[1]]} return dict0[args[0]]" "from typing import List tree = {'1965': {'ABAP': {'PONY': 0, 'NCL': 1}, 'ARC': 2, 'OX': 3}, '1995': {'ABAP': {'1977': 4, '1986': 5}, 'ARC': 6, 'OX': {'1977': 7, '1986': 8}}, '2020': {'1977': 9, '1986': 10}} def main(arr: List) -> int: global tree step = tree while True: for item in arr[::-1]: key = str(item) if key in step.keys(): step = step[key] if isinstance(step, int): return step" "s = {'R': {1968: {'TEX': {'WISP': 0, 'PAN': 1, 'COQ': 2}, 'NUMPY': {2003: 3, 1970: 4}}, 1966: {'TEX': {'WISP': 5, 'PAN': 6, 'COQ': 7}, 'NUMPY': 8}, 1983: 9}, 'P4': 10, 'XBASE': 11} def main(path): s1 = s[path[0]] if isinstance(s1, int): return s1 s2 = s1[path[4]] if isinstance(s2, int): return s2 s3 = s2[path[1]] if isinstance(s3, int): return s3 if path[1] == 'NUMPY': return s3[path[2]] return s3[path[3]]" "def zero(items, left, middle, right): if items[0] == 'SASS': return left if items[0] == 'EQ': return middle if items[0] == 'CIRRU': return right def three(items, left, right): if items[3] == 2003: return left if items[3] == 1975: return right def two(items, left, middle, right): if items[2] == 'RUST': return left if items[2] == 'X10': return middle if items[2] == 'PIC': return right def one(items, left, middle, right): if items[1] == 'KRL': return left if items[1] == 'LASSO': return middle if items[1] == 'YAML': return right def main(items): return one(items, three(items, zero(items, 0, 1, 2), two(items, 3, 4, 5)), 6, three(items, two(items, 7, 8, 9), 10))" "def three(items, left, middle, right): if items[3] == 'ARC': return left if items[3] == 'GLSL': return middle if items[3] == 'OCAML': return right def two(items, left, middle, right): if items[2] == 'HYPHY': return left if items[2] == 'RHTML': return middle if items[2] == 'APL': return right def one(items, left, right): if items[1] == 'FISH': return left if items[1] == 'EQ': return right def zero(items, left, right): if items[0] == 1980: return left if items[0] == 1966: return right def four(items, left, middle, right): if items[4] == 'LIMBO': return left if items[4] == 'LUA': return middle if items[4] == 'MTML': return right def main(items): return three(items, two(items, zero(items, four(items, 0, 1, 2), four(items, 3, 4, 5)), 6, 7), 8, one(items, two(items, four(items, 9, 10, 11), 12, 13), 14))" "def main(x): match x[0]: case 'PIC': match x[4]: case 'CHUCK': match x[2]: case 1979: return 0 case 1980: match x[1]: case 2002: return 1 case 2012: return 2 case 'TCL': match x[1]: case 2002: match x[3]: case 1985: return 3 case 2017: return 4 case 2012: match x[2]: case 1979: return 5 case 1980: return 6 case 'LUA': match x[3]: case 1985: return 7 case 2017: match x[2]: case 1979: return 8 case 1980: return 9 case 'TEXT': return 10 case 'XML': return 11" "def four(item, left, middle, right): if item[4] == 'BISON': return right if item[4] == 'HLSL': return middle if item[4] == 'DYLAN': return left def two(item, right, left): if item[2] == 1978: return right if item[2] == 1972: return left def one(item, right, left): if item[1] == 1961: return right if item[1] == 1958: return left def three(item, right, left): if item[3] == 'HLSL': return right if item[3] == 'ABNF': return left def zero(item, right, left): if item[0] == 1994: return right if item[0] == 1966: return left def main(item): return four(item, 11, one(item, zero(item, two(item, 7, 8), 9), 10), two(item, zero(item, one(item, 0, 1), three(item, 2, 3)), three(item, 4, zero(item, 5, 6))))" "def main(arr: list): t = {1969: 13, 1966: 12, 2001: {1990: 11, 1971: {'CHUCK': 10, 'OPA': 9}, 1959: {2017: {2016: 8, 2008: 7, 1995: 6}, 1983: {2016: 5, 2008: 4, 1995: 3}, 1964: {2016: 2, 2008: 1, 1995: 0}}}} lst = [[3, -1], [0, -1], [4, 2], [1, -1]] num = iter(lst) def recr(x, dictionary): for (k, v) in dictionary.items(): if arr[x[0]] == k or arr[x[1]] == k: if isinstance(v, int) or isinstance(v, str): return v else: return recr(x=next(num), dictionary=v) return recr(x=next(num), dictionary=t)" "def main(x): if x[3] == 2010: if x[4] == 2010: dict1 = {1991: 0, 1976: 1, 1990: 2} dict2 = {'GLYPH': 4, 'HTTP': 5} dict3 = {'KRL': dict1[x[2]], 'P4': 3, 'MQL4': dict2[x[1]]} return dict3[x[0]] elif x[4] == 1986: return 6 elif x[3] == 1984: if x[1] == 'GLYPH': return 7 elif x[1] == 'HTTP': dict1 = {1991: 8, 1976: 9, 1990: 10} return dict1[x[2]]" "def two(items, left, right): if items[2] == 'YAML': return left if items[2] == 'OOC': return right def zero(items, left, middle, right): if items[0] == 'HCL': return left if items[0] == 'BLADE': return middle if items[0] == 'CSV': return right def four(items, left, middle, right): if items[4] == 1960: return left if items[4] == 2009: return middle if items[4] == 1988: return right def three(items, left, middle, right): if items[3] == 'GN': return left if items[3] == 'GOLO': return middle if items[3] == 'PERL': return right def main(items): return three(items, four(items, zero(items, two(items, 0, 1), 2, 3), 4, 5), four(items, 6, 7, 8), 9)" "def two(items, left, middle, right): if items[2] == 'YANG': return left if items[2] == 'PUG': return middle if items[2] == 'LFE': return right def zero(items, left, middle, right): if items[0] == 1961: return left if items[0] == 2017: return middle if items[0] == 1997: return right def one(items, left, right): if items[1] == 2015: return left if items[1] == 1964: return right def four(items, left, middle, right): if items[4] == 2003: return left if items[4] == 1963: return middle if items[4] == 1993: return right def three(items, left, middle, right): if items[3] == 'LATTE': return left if items[3] == 'ALLOY': return middle if items[3] == 'ORG': return right def main(items): return four(items, one(items, zero(items, 0, 1, 2), zero(items, 3, two(items, 4, 5, 6), 7)), 8, three(items, one(items, 9, 10), 11, 12))" "def x2(x): if x[4] == 'PONY': return 0 if x[4] == 'SCAML': if x[0] == 1968: return 1 else: return 2 if x[4] == 'CSON': return 3 def x3(x): if x[4] == 'PONY': return 4 if x[4] == 'SCAML': return 5 if x[4] == 'CSON': return 6 def x4(x): if x[4] == 'PONY': return 8 if x[4] == 'SCAML': return 9 if x[4] == 'CSON': return 10 def main(x): if x[3] == 1995: return 11 elif x[3] == 1991: return 12 elif x[1] == 'INI': return x2(x) else: if x[2] == 1975: return x3(x) if x[2] == 1973: return 7 if x[2] == 1959: return x4(x)" "import math def main(x): if x[0] == 2019: return 9 elif x[0] == 1964: if x[2] == 2001: data = {1975: 0, 1986: 1, 1990: 2} return data.get(x[3]) elif x[2] == 2014: data = {1975: 3, 1986: 4, 1990: 5} return data.get(x[3]) elif x[2] == 1994: data = {'ABAP': 6, 'ROFF': 7, 'JSX': 8} return data.get(x[1])" "def main(x): if x[4] == 2014: return 10 elif x[4] == 2006: return 11 elif x[4] == 1969: return x_2(x) def x_2(x): if x[2] == 1960: return x_11(x) elif x[2] == 1992: return x_12(x) def x_11(x): if x[1] == 'NSIS': if x[0] == 'MASK': return 0 elif x[0] == 'SWIFT': return 1 elif x[0] == 'COOL': return 2 elif x[1] == 'CLICK': return 3 elif x[1] == 'FANCY': return 4 def x_12(x): if x[1] == 'NSIS': if x[0] == 'MASK': return 5 elif x[0] == 'SWIFT': return 6 elif x[0] == 'COOL': return 7 elif x[1] == 'CLICK': return 8 elif x[1] == 'FANCY': return 9" "def main(keys): index = 4 key = (1974, 1) dictionary = {(1974, 1): {('HTTP', 3): {(1964, -1): 0, (1965, -1): 1}, ('ANTLR', 3): {(1964, -1): 2, (1965, -1): 3}, ('SCAML', 2): {('DIFF', 3): {(1964, -1): 4, (1965, -1): 5}, ('JFLEX', 0): {('UNO', -1): 6, ('PAWN', -1): 7}}}, (1967, 2): {('DIFF', 0): {('UNO', -1): 8, ('PAWN', 1): {('HTTP', -1): 9, ('ANTLR', -1): 10, ('SCAML', -1): 11}}, ('JFLEX', -1): 12}, (1958, -1): 13} while index != -1: for i in dictionary.keys(): if i[0] == keys[index]: index = i[1] key = i dictionary = dictionary[key] return dictionary" "def main(x): if x[2] == 'SLIM': if x[1] == 2015: if x[0] == 1989: return {2003: 0, 2000: 1}[x[3]] elif x[0] == 1960: return 2 elif x[0] == 2018: return {2003: 3, 2000: 4}[x[3]] elif x[1] == 1967: if x[4] == 1970: return {1989: 5, 1960: 6, 2018: 7}[x[0]] elif x[4] == 1988: return 8 elif x[4] == 2020: return {1989: 9, 1960: 10, 2018: 11}[x[0]] return {2008: 12}[x[1]] return {'LUA': 13, 'CSV': 14}[x[2]]" "def x1(args): if args[1] == 'SWIFT': return x31(args) if args[1] == 'MINID': return x32(args) else: return 7 def x21(args): if args[2] == 1961: return x12(args) else: return 12 def x31(args): if args[3] == 2012: return x4(args) else: return x2(args) def x32(args): if args[3] == 2012: return 5 else: return 6 def x12(args): if args[1] == 'SWIFT': return x33(args) if args[1] == 'MINID': return 10 else: return 11 def x4(args): if args[4] == 1981: return 0 if args[4] == 1992: return 1 else: return 2 def x2(args): if args[2] == 1961: return 3 else: return 4 def x33(args): if args[3] == 2012: return 8 else: return 9 def main(args): if args[0] == 1978: return x1(args) else: return x21(args)" "def main(x): if x[4] == 'VOLT': return F1(x) elif x[4] == 'QML': return 12 def F1(x): if x[3] == 2015: return F2(x) elif x[3] == 2008: return F5(x) def F2(x): if x[0] == 2012: return F3(x) elif x[0] == 1970: return F4(x) elif x[0] == 1986: return 3 def F3(x): if x[1] == 2002: return 0 elif x[1] == 1994: return 1 elif x[1] == 1961: return 2 def F4(x): if x[1] == 2002: return 4 elif x[1] == 1994: return 5 elif x[1] == 1961: return 6 def F5(x): if x[1] == 2002: return F6(x) elif x[1] == 1994: return 10 elif x[1] == 1961: return 11 def F6(x): if x[0] == 2012: return 7 elif x[0] == 1986: return 8 elif x[0] == 1970: return 9" "def main(x): match x[0]: case 'SELF': return 9 case 'PUG': match x[1]: case 'NIT': match x[2]: case 1971: return 0 case 2012: return 1 case 1969: return 2 case 'COQ': match x[3]: case 'QML': return 3 case 'ROUGE': return 4 case 'PERL6': return 5 case 'ANTLR': match x[3]: case 'QML': return 6 case 'ROUGE': return 7 case 'PERL6': return 8" "import math def main(x): if x[3] == 1979: if x[2] == 'RUBY': return 12 if x[2] == 'MIRAH': return 11 if x[2] == 'XS': list3 = {1991: 10, 2002: 9, 2011: 8} return list3[x[0]] if x[3] == 1962: return 7 if x[3] == 1969: if x[2] == 'RUBY': return 6 if x[2] == 'MIRAH': list2 = {1991: 5, 2002: 4, 2011: 3} return list2[x[0]] if x[2] == 'XS': list1 = {1991: 2, 2002: 1, 2011: 0} return list1[x[0]]" "def zero(items, left, right): if items[0] == 2018: return left if items[0] == 2005: return right def four(items, left, right): if items[4] == 'LLVM': return left if items[4] == 'XOJO': return right def three(items, left, middle, right): if items[3] == 1963: return left if items[3] == 2018: return right if items[3] == 1985: return middle def two(items, left, middle, right): if items[2] == 1999: return left if items[2] == 1981: return middle if items[2] == 1962: return right def one(items, left, middle, right): if items[1] == 1994: return left if items[1] == 1977: return middle if items[1] == 1993: return right def main(items): return four(items, three(items, one(items, 0, two(items, 1, 2, 3), 4), 5, two(items, zero(items, 6, 7), one(items, 8, 9, 10), 11)), 12)" "def zero(items, left, right): if items[0] == 1957: return left if items[0] == 1994: return right def three(items, left, right): if items[3] == 'SELF': return left if items[3] == 'VUE': return right def two(items, left, middle, right): if items[2] == 'LATTE': return left if items[2] == 'PLSQL': return middle if items[2] == 'GO': return right def one(items, left, middle, right): if items[1] == 'SCALA': return left if items[1] == 'YACC': return middle if items[1] == 'RAGEL': return right def main(items): return three(items, zero(items, one(items, 0, 1, 2), one(items, 3, 4, 5)), two(items, one(items, 6, 7, 8), 9, 10))" "def main(x): match x[0]: case 2004: match x[3]: case 'D': match x[2]: case 1958: return 0 case 1957: return 1 case 1966: return 2 case 'GOSU': return 3 case 'SCAML': match x[1]: case 'CSV': return 4 case 'WISP': return 5 case 'CLEAN': return 6 case 1986: match x[3]: case 'D': return 7 case 'GOSU': match x[1]: case 'CSV': return 8 case 'WISP': return 9 case 'CLEAN': return 10 case 'SCAML': return 11 case 1999: return 12" "def main(mass): if mass[1] == 'LLVM': if mass[3] == 'LEX': return fun2(mass) elif mass[3] == 'SCAML': return fun3(mass) elif mass[1] == 'D': return 12 elif mass[1] == 'MAKO': return 13 def fun2(mass): if mass[2] == 'PHP': if mass[0] == 'VHDL': return 0 elif mass[0] == 'LSL': return 1 elif mass[0] == 'RDOC': return 2 elif mass[2] == 'METAL': if mass[0] == 'VHDL': return 3 elif mass[0] == 'LSL': return 4 elif mass[0] == 'RDOC': return 5 elif mass[2] == 'ORG': return 6 def fun3(mass): if mass[0] == 'VHDL': if mass[4] == 'FREGE': return 7 elif mass[4] == 'XTEND': return 8 elif mass[4] == 'GLSL': return 9 elif mass[0] == 'LSL': return 10 elif mass[0] == 'RDOC': return 11" "def main(x): def a(z): if z == 1: if x[0] == 'STON': return 9 elif x[0] == 'SWIFT': return 10 elif x[0] == 'ABNF': return 11 elif z == 2: if x[0] == 'STON': return 3 elif x[0] == 'SWIFT': return 4 elif x[0] == 'ABNF': return 5 elif z == 3: if x[4] == 'TWIG': return 6 elif x[4] == 'GAP': return 7 elif x[4] == 'MUF': return 8 elif z == 4: if x[4] == 'TWIG': return 0 elif x[4] == 'GAP': return 1 elif x[4] == 'MUF': return 2 if x[2] == 'KRL': return 13 elif x[1] == 'CUDA': return 12 elif x[1] == 'HTTP': return a(1) elif x[3] == 1981: return a(2) elif x[3] == 1966: return a(4) elif x[3] == 1983: return a(3)" "def main(x): def f(y): if y == 1: if x[0] == 2006: return 3 elif x[0] == 2018: return 4 elif x[2] == 1975: return 0 elif x[2] == 1967: return 1 elif x[2] == 2017: return 2 elif x[0] == 2018: return 12 elif x[2] == 1975 and x[0] == 2006: return 9 elif x[2] == 1967 and x[0] == 2006: return 10 elif x[2] == 2017 and x[0] == 2006: return 11 elif x[1] == 'YAML': return 6 elif x[1] == 'MASK': return 7 elif x[1] == 'BRO': return 8 if x[3] == 'CSON': return 13 elif x[3] == 'M': return 14 elif x[4] == 2011: return 5 elif x[4] == 1994: return f(1) elif x[4] == 1988: return f(2)" "def main(x): s = {} s['JSON19671984'] = 0 s['JSON19671957'] = 1 s['JSON19671987APEX'] = 2 s['JSON19671987MTML'] = 3 s['JSON19671987TERRA'] = 4 s['JSON1997'] = 5 s['JSON1984APEXP4'] = 6 s['JSON1984APEXGLYPH'] = 7 s['JSON1984MTML'] = 8 s['JSON1984TERRA'] = 9 s['NIT'] = 10 ans = '' ans1 = '' ans2 = '' ans += str(x[4]) if ans in s: ans2 = s[ans] ans += str(x[1]) if ans in s: ans2 = s[ans] ans1 = ans ans1 += str(x[3]) ans += str(x[0]) if ans in s: ans2 = s[ans] if ans1 in s: ans2 = s[ans1] ans1 += str(x[0]) ans += str(x[2]) if ans in s: ans2 = s[ans] if ans1 in s: ans2 = s[ans1] return ans2" "def main(x): match x[0]: case 1964: return 10 case 1967: match x[1]: case 'GAMS': return 8 case 'SQLPL': return 9 case 1997: match x[3]: case 2002: match x[1]: case 'GAMS': match x[2]: case 'GLSL': return 0 case 'NSIS': return 1 case 'SQLPL': match x[4]: case 1967: return 2 case 1962: return 3 case 1983: return 4 case 1982: match x[1]: case 'GAMS': return 5 case 'SQLPL': match x[2]: case 'GLSL': return 6 case 'NSIS': return 7" "def zero(x, left, middle, right): if x[0] == 1985: return right if x[0] == 1984: return middle if x[0] == 2002: return left def first(x, left, middle, right): if x[1] == 'GAP': return left if x[1] == 'PONY': return middle if x[1] == 'SQF': return right def second(x, middle, right): if x[2] == 1993: return middle if x[2] == 2006: return right def third(x, left, middle, right): if x[3] == 'OX': return left if x[3] == 'X10': return middle if x[3] == 'XS': return right def main(x): if x[2] == 1959: return zero(x, third(x, 0, 1, 2), first(x, 3, 4, 5), first(x, 6, 7, 8)) if x[2] == 1993: return first(x, zero(x, 9, 10, 11), 12, 13) if x[2] == 2006: return 14" "def branch1(x): if x[2] == 'LEAN': return 0 elif x[2] == 'SAGE': if x[1] == 1988: return 1 else: return 2 elif x[2] == 'ABNF': return 3 def branch2(x): if x[2] == 'LEAN': return 6 elif x[2] == 'SAGE': return 7 elif x[2] == 'ABNF': return 8 def branch3(x): if x[2] == 'LEAN': return 9 elif x[2] == 'SAGE': return 10 elif x[2] == 'ABNF': return 11 def main(x): if x[0] == 1957: if x[4] == 'VALA': return branch1(x) elif x[4] == 'COOL': if x[3] == 'M': return 4 elif x[3] == 'TWIG': return 5 elif x[3] == 'XOJO': return branch2(x) elif x[4] == 'GLYPH': return branch3(x) elif x[0] == 2003: return 12 elif x[0] == 1975: return 13" "def main(x): def a(z): if z == 1: if x[2] == 'FLUX': return 8 elif x[2] == 'PIC': return 9 elif x[2] == 'NIX': return 10 if z == 2: if x[2] == 'FLUX': return 0 elif x[2] == 'PIC': return 1 elif x[3] == 1989: return 2 elif x[3] == 1967: return 3 elif x[3] == 1990: return 4 if x[0] == 1976: return 11 elif x[4] == 1999 and x[0] == 1995: return 6 elif x[4] == 2007 and x[0] == 1995: return 7 elif x[4] == 2001 and x[0] == 1995: return a(1) elif x[1] == 'SCAML': return a(2) elif x[1] == 'ALLOY': return 5" "def zero(items, left, right): if items[0] == 'HYPHY': return left if items[0] == 'BOO': return right def four(items, left, middle, right): if items[4] == 'CHUCK': return left if items[4] == 'XS': return middle if items[4] == 'PIKE': return right def three(items, left, middle, right): if items[3] == 'HTTP': return left if items[3] == 'ZIMPL': return middle if items[3] == 'SELF': return right def two(items, left, middle, right): if items[2] == 1974: return left if items[2] == 1969: return middle if items[2] == 1985: return right def one(items, left, right): if items[1] == 'NU': return left if items[1] == 'LEAN': return right def main(items): return one(items, four(items, zero(items, 0, 1), two(items, three(items, 2, 3, 4), three(items, 5, 6, 7), zero(items, 8, 9)), 10), 11)" "def x3(x): if x[3] == 'NESC': return 6 elif x[3] == 'SAGE': return xup0(x) else: return xdown4(x) def xup0(x): if x[0] == 'LSL': return x1up(x) elif x[0] == 'LUA': return x1middle(x) def x1up(x): if x[1] == 'SQF': return 0 elif x[1] == 'YACC': return 1 def x1middle(x): if x[1] == 'SQF': return x2(x) elif x[1] == 'YACC': return 5 def x2(x): if x[2] == 'NL': return 2 elif x[2] == 'SASS': return 3 else: return 4 def xdown4(x): if x[4] == 1979: return x1down(x) if x[4] == 2001: return 9 def x1down(x): if x[1] == 'SQF': return 7 else: return 8 def main(x): return x3(x)" "def main(x): if x[3] == 1990: return 9 elif x[4] == 'CMAKE': return [2004, 1972].index(x[2]) elif x[4] == 'RAGEL': if x[1] == 1963: return 2 elif x[1] == 2002: return [2004, 1972].index(x[2]) + 3 elif x[4] == 'HAXE': if x[1] == 1963: return ['IDL', 'GAP', 'RED'].index(x[0]) + 5 elif x[1] == 2002: return 8" "def main(x): match x[1]: case 'REBOL': match x[3]: case 1982: match x[2]: case 'XSLT': return 0 case 'HCL': return 1 case 'BRO': return 2 case 1983: return 3 case 2014: match x[2]: case 'XSLT': return 4 case 'HCL': return 5 case 'BRO': return 6 case 'GENIE': return 7 case 'D': match x[0]: case 'LIMBO': match x[2]: case 'XSLT': return 8 case 'HCL': return 9 case 'BRO': return 10 case 'SHEN': return 11 case 'JSON': return 12" "def main(x): return {'LEAN': {'LUA': {1972: {1977: 0, 1994: 1}[x[0]], 1977: 2, 1982: 3}[x[3]], 'MAKO': {1972: 4, 1977: 5, 1982: 6}[x[3]], 'LESS': 7}[x[1]], 'QML': {1977: {1987: 8, 2004: 9, 1999: 10}[x[2]], 1994: 11}[x[0]]}[x[4]]" "from unittest import case from re import match def main(x): match x[2]: case 'FLUX': return 10 case 'RAML': match x[0]: case 2005: return 8 case 1998: return 9 case 1977: match x[1]: case 1958: match x[3]: case 1995: return 0 case 1978: return 1 case 1972: return 2 case 1971: match x[3]: case 1995: return 3 case 1978: return 4 case 1972: return 5 case 1964: match x[4]: case 'COQ': return 6 case 'BRO': return 7" "def zero(items, left, middle, right): if items[0] == 'BISON': return left if items[0] == 'LATTE': return middle if items[0] == 'EC': return right def four(items, left, middle, right): if items[4] == 'P4': return left if items[4] == 'SHEN': return middle if items[4] == 'WISP': return right def three(items, left, right): if items[3] == 'XPROC': return left if items[3] == 'XSLT': return right def two(items, left, middle, right): if items[2] == 'XML': return left if items[2] == 'VCL': return middle if items[2] == 'CUDA': return right def one(items, left, middle, right): if items[1] == 1992: return left if items[1] == 2004: return middle if items[1] == 1959: return right def main(items): return three(items, four(items, two(items, 0, zero(items, 1, 2, 3), 4), two(items, one(items, 5, 6, 7), 8, 9), 10), 11)" "def main(x): if x[0] == 1965: return 12 if x[1] == 1966: return 11 if x[1] == 2004: if x[2] == 'SLIM': return 10 if x[2] == 'ZIMPL': return 7 if x[4] == 1989: return 8 return 9 if x[3] == 2006: return 0 return {1963: {'ZIMPL': 4, 'VUE': 5, 'SLIM': 6}, 1978: {'ZIMPL': 1, 'VUE': 2, 'SLIM': 3}}[x[3]][x[2]]" "def LEFTfirst(x): if x[0] == 1960: return LEFTsecondleft(x) elif x[0] == 1963: return left_second_right(x) else: return 11 def LEFTsecondleft(x): if x[4] == 'NIM': return 0 elif x[4] == 'MINID': return LEFTthirdright(x) else: return LEFTthirdleft(x) def LEFTthirdright(x): if x[3] == 'GRACE': return 1 elif x[3] == 'RHTML': return 2 else: return 3 def LEFTthirdleft(x): if x[1] == 2012: return 4 else: return 5 def left_second_right(x): if x[3] == 'GRACE': return left_third_right(x) elif x[3] == 'RHTML': return 9 else: return 10 def left_third_right(x): if x[4] == 'NIM': return 6 elif x[4] == 'MINID': return 7 else: return 8 def f(x): if x[2] == 'ATS': return LEFTfirst(x) elif x[2] == 'LIMBO': return 12 else: return 13 def main(x): return f(x)" "def main(x): if x[1] == 2019: return 10 elif x[0] == 'SQLPL': if x[2] == 'SELF': return ['ROFF', 'EAGLE'].index(x[3]) elif x[2] == 'RAGEL': return 2 elif x[2] == 'LUA': return [1972, 1962].index(x[4]) + 3 elif x[3] == 'ROFF': return ['SELF', 'RAGEL', 'LUA'].index(x[2]) + 5 else: return [1972, 1962].index(x[4]) + 8" "def main(x): if x[3] == 2003: return 9 elif x[4] == 2000: return 7 elif x[4] == 1970: return 8 elif x[0] == 1965: return ['PAWN', 'JSON5', 'QML'].index(x[2]) elif x[0] == 1990: return 3 else: return ['HACK', 'X10', 'IDRIS'].index(x[1]) + 4" "def f(x): match x[0]: case 'OX': match x[3]: case 'SVG': match x[1]: case 1974: return 0 case 1991: return 1 case 1972: return 2 case 'WISP': match x[1]: case 1974: return 3 case 1991: return 4 case 1972: return 5 case 'LLVM': match x[1]: case 1974: return 6 case 1972: return 9 case 1991: match x[2]: case 'STATA': return 7 case 'CLICK': return 8 def main(*args): return f(*args)" "def main(x): dict4_h = {'CLIPS': 1, 'EC': 2, 'JSON': 3} dict4_l = {'CLIPS': 4, 'EC': 5, 'JSON': 6} dict3 = {2017: 0, 1957: dict4_h[x[0]], 2014: dict4_l[x[0]]} dict2 = {1989: dict3[x[3]], 1995: 7, 1984: 8} dict1 = {'EBNF': dict2[x[4]], 'SLIM': 9} return dict1[x[2]]" "def main(a): third = {'KICAD': -2, 'DART': -1, 'AMPL': 0} second = {1984: -1, 2014: 0} first = {'D': 3, 'ASN.1': 7, 'URWEB': 9} ans = 0 if a[1] == 'URWEB': ans += first[a[1]] ans += second[a[2]] elif a[2] == 2014: ans += first[a[1]] + second[a[2]] else: ans += first[a[1]] + second[a[2]] + third[a[3]] return ans" "def main(x): if x[1] == 'MQL4': if x[3] == 2010: if x[4] == 1973: return {1992: 0, 1967: 1, 1979: 2}[x[0]] else: return {1992: 3, 1967: 4, 1979: 5}[x[0]] else: return 6 elif x[3] == 2010: if x[4] == 1973: return 7 else: return {'KIT': 8, 'DM': 9}[x[2]] else: return 10" "def main(x): if x[2] == 1970: if x[0] == 1997: return {'HLSL': 0, 'GLYPH': 1}[x[4]] elif x[0] == 2010: return 2 else: return {'NCL': 3, 'MTML': 4}[x[1]] elif x[3] == 'FORTH': if x[0] == 1997: return {'HLSL': 5, 'GLYPH': 6}[x[4]] elif x[0] == 2010: return {'HLSL': 7, 'GLYPH': 8}[x[4]] else: return {'NCL': 9, 'MTML': 10}[x[1]] else: return 11" "def main(x): if x[4] == 'OOC': return 13 elif x[4] == 'XPROC': if x[2] == 'RUST': return 12 elif x[2] == 'CSON': return 11 elif x[0] == 'NGINX': return 6 elif x[0] == 'YACC': return ['DART', 'REBOL'].index(x[1]) + 7 else: return ['TERRA', 'OCAML'].index(x[3]) + 9 elif x[1] == 'REBOL': return 5 elif x[2] == 'RHTML': return 0 elif x[2] == 'CSON': return 1 else: return ['NGINX', 'YACC', 'D'].index(x[0]) + 2" "def main(x): match x[3]: case 'XPROC': match x[0]: case 1979: match x[2]: case 'HACK': return 0 case 'TCSH': return 1 case 1958: match x[1]: case 'JSON5': return 2 case 'APL': return 3 case 'SAS': return 4 case 'REXX': return 5 case 'HLSL': match x[1]: case 'JSON5': return 6 case 'APL': match x[2]: case 'HACK': return 7 case 'TCSH': return 8 case 'SAS': return 9" "def main(x): slov_1962_2009 = {2002: 0, 1971: 1} slov_1962_1971 = {'HACK': 3, 'SAGE': 4, 'GLYPH': 5} slov_2007_1989_2009 = {2002: 6, 1971: 7} slov_2007_1965_2009 = {'HACK': 9, 'SAGE': 10, 'GLYPH': 11} if int(x[2]) == 1962: if x[4] == 2009: return slov_1962_2009.get(x[1]) elif x[4] == 1962: if x[1] == 1971: return slov_1962_1971.get(x[3]) else: return 2 elif int(x[2]) == 2007: if x[0] == 1989: if x[4] == 2009: return slov_2007_1989_2009.get(x[1]) else: return 8 elif x[0] == 1965: if x[4] == 2009: return slov_2007_1965_2009.get(x[3]) else: return 12 else: return 13" "def main(xx): x = xx def x0_0(): if x[0] == 'TCSH': return 0 elif x[0] == 'R': return 1 elif x[0] == 'NIM': return 2 def x0_1(): if x[0] == 'TCSH': return 3 elif x[0] == 'R': return 4 elif x[0] == 'NIM': return 5 def x1(): if x[1] == 'POD': return x0_0() elif x[1] == 'REXX': return x0_1() def x3_0(): if x[3] == 1985: return 7 elif x[3] == 1967: return 8 def x3_1(): if x[3] == 1985: return 9 elif x[3] == 1967: return 10 def x2x0(): if x[0] == 'TCSH': return 6 elif x[0] == 'R': return x3_0() elif x[0] == 'NIM': return x3_1() else: return 'x2x0' if x[2] == 'GOSU': return x1() elif x[2] == 'TERRA': return x2x0()" "def main(res): F = {3: {1977: {2: {2012: 2, 1991: {4: {'LEAN': 1, 'STON': 0}}}}, 2010: {0: {1998: {1: {2015: {2: {1991: 4, 2012: 5}}, 2000: 3}}, 1970: {2: {1991: {1: {2000: 6, 2015: 7}}, 2012: {4: {'STON': 8, 'LEAN': 9}}}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "from collections import defaultdict def tree(): return defaultdict(tree) d_tree = tree() d_tree[0]['FISH'] = 11 d_tree[0]['MUPAD'] = 12 d_tree[0]['GOSU'][3][1995][2][1970][1]['SHELL'] = 0 d_tree[0]['GOSU'][3][1995][2][1970][1]['NL'] = 1 d_tree[0]['GOSU'][3][1995][2][1970][1]['LIMBO'] = 2 d_tree[0]['GOSU'][3][1995][2][2006] = 3 d_tree[0]['GOSU'][3][2008][1]['SHELL'][2][1970] = 4 d_tree[0]['GOSU'][3][2008][1]['SHELL'][2][2006] = 5 d_tree[0]['GOSU'][3][2008][1]['NL'][4][2005] = 6 d_tree[0]['GOSU'][3][2008][1]['NL'][4][2013] = 7 d_tree[0]['GOSU'][3][2008][1]['NL'][4][1958] = 8 d_tree[0]['GOSU'][3][2008][1]['LIMBO'] = 9 d_tree[0]['GOSU'][3][1964] = 10 def get_value(dd, keys): get_value.val = None for (k, v) in dd.items(): if isinstance(k, int) and len(str(k)) == 1: state_keys = list(v.keys()) if keys[k] in state_keys: if isinstance(v[keys[k]], dict): get_value(v[keys[k]], keys) else: get_value.val = v[keys[k]] return get_value.val def main(tree_nodea): return get_value(d_tree, tree_nodea)" "def main(x): a = [3, {1998: [4, {'RUST': [0, {1983: 0, 1959: 1, 2013: [1, {'PERL': 2, 'GENIE': 3, 'PAN': 4}]}], 'AGDA': 5, 'OOC': 6}], 1980: [4, {'RUST': 7, 'AGDA': 8, 'OOC': 9}], 1987: 10}] while type(a) is not int: a = a[1][x[a[0]]] return a" "s = {'OPAL': {1976: {'ECL': 0, 'PHP': 1, 'ORG': 2}, 1972: {'ECL': 3, 'PHP': 4, 'ORG': 5}}, 'APL': {'M4': {1976: 6, 1972: 7}, 'JSX': 8}, 'GDB': {'M4': 9, 'JSX': 10}} def main(path): s1 = s[path[3]] if path[3] == 'OPAL': s2 = s1[path[1]] direction = 1 elif path[3] == 'APL': s2 = s1[path[0]] direction = 0 elif path[3] == 'GDB': s2 = s1[path[0]] direction = 0 if isinstance(s2, int): return s2 if direction == 1: return s2[path[2]] else: return s2[path[1]]" "def main(x): if x[0] == 'AGDA': return x_1(x) elif x[0] == 'SHELL': return x_2(x, 0) elif x[0] == 'MTML': return 11 def x_1(x): if x[1] == 'NINJA': return 5 elif x[1] == 'RED': return x_2(x, 1) elif x[1] == 'MUF': return x_3(x, 0) def x_2(x, n): if n == 0: if x[2] == 1984: return x_3(x, 1) elif x[2] == 1963: return x_3(x, 2) elif x[2] == 2008: return 10 elif n == 1: if x[2] == 1984: return 2 elif x[2] == 1963: return 3 elif x[2] == 2008: return 4 def x_3(x, n): if x[3] == 'JSX': if n == 0: return 0 elif n == 1: return 6 elif n == 2: return 8 if x[3] == 'ABNF': if n == 0: return 1 elif n == 1: return 7 elif n == 2: return 9" "def main(f): return f1(f) def f1(f): if f[1] == 2008: return f02(f) elif f[1] == 1980: return f2(f) elif f[1] == 1963: return 9 def f0(f): if f[0] == 'TCSH': return f03(f) elif f[0] == 'SAGE': return f4(f) def f4(f): if f[4] == 'TWIG': return 2 if f[4] == 'GO': return 3 def f02(f): if f[2] == 'DYLAN': return f0(f) elif f[2] == 'DM': return f3(f) def f03(f): if f[3] == 'TCL': return 0 elif f[3] == 'CIRRU': return 1 def f2(f): if f[2] == 'DYLAN': return 7 elif f[2] == 'DM': return 8 def f3(f): if f[3] == 'TCL': return 4 elif f[3] == 'CIRRU': return f00(f) def f00(f): if f[0] == 'TCSH': return 5 if f[0] == 'SAGE': return 6 main(['TCSH', 2008, 'DYLAN', 'CIRRU', 'TWIG'])" "def main(x): data = {1969: 14, 1980: {2014: 8, 1991: 13, 1966: {2019: 12, 2006: 11, 1999: {2020: 10, 2011: 9}}}, 1959: {1991: 7, 1966: 6, 2014: {'KICAD': {2019: 5, 2006: 4, 1999: 3}, 'SQF': {2019: 2, 2006: 1, 1999: 0}}}} try: return data[x[3]][x[1]][x[2]][x[4]] except TypeError: try: return data[x[3]][x[1]][x[4]][x[0]] except TypeError: try: return data[x[3]][x[1]][x[4]] except TypeError: try: return data[x[3]][x[1]] except TypeError: return data[x[3]] except KeyError: try: return data[x[3]][x[1]][x[4]][x[0]] except TypeError: try: return data[x[3]][x[1]][x[4]] except KeyError: try: return data[x[3]][x[1]] except KeyError: return data[x[3]]" "pic_urweb_smt = ['PIC', 'URWEB', 'SMT'] opa_fish_gn = ['OPA', 'FISH', 'GN'] minid_wisp_zimpl = ['MINID', 'WISP', 'ZIMPL'] def main(x): if x[1] == 1968: if x[0] == 'OPA': return 9 + pic_urweb_smt.index(x[3]) else: return 11 + opa_fish_gn.index(x[0]) elif x[3] == 'SMT': return 6 + minid_wisp_zimpl.index(x[2]) elif x[3] == 'URWEB': return 3 + minid_wisp_zimpl.index(x[2]) else: return opa_fish_gn.index(x[0])" "def main(find_text): tree = {'2010': {'': 0, 'FORTH': {'': 3, 'OX': 0, 'TWIG': 1, 'MUF': 2}, 'OPAL': {'': 4, '1988': {'': 1, 'MUPAD': 3, 'GAP': 4, 'LIMBO': 5}, '1985': 6, '1989': {'': 3, 'OX': 7, 'TWIG': 8, 'MUF': 9}}, 'LOGOS': 10}, '1996': 11} way = tree itr = 2 while True: key = find_text[itr] value = way.get(str(key)) if type(value) is int: return value else: way = value itr = value.get('')" "def main(x): adr = {0: 1, 'NL': {0: 2, 'TXL': {0: 0, 'NIX': {0: 4, 1984: {0: 5}, 2001: {0: 6}, 1958: {0: 7}}, 'XSLT': {0: 4, 1984: {0: 8}, 2001: {0: 9}, 1958: {0: 10}}, 'HY': {0: 11}}, 'P4': {0: 0, 'NIX': {0: 12}, 'XSLT': {0: 13}, 'HY': {0: 4, 1984: {0: 14}, 2001: {0: 15}, 1958: {0: 16}}}, 'XS': {0: 17}}, 'SAS': {0: 18}, 'RHTML': {0: 19}} buf = adr while 1: if buf[0] > 4: return buf[0] - 5 buf = buf[x[buf[0]]]" "def main(f): return f1(f) def f1(f): if f[1] == 1957: return f03(f) elif f[1] == 1983: return f3(f) elif f[1] == 1993: return 10 def f02(f): if f[2] == 'GAMS': return 0 elif f[2] == 'METAL': return 1 elif f[2] == 'TEA': return 2 def f03(f): if f[3] == 1975: return f02(f) elif f[3] == 1980: return f2(f) elif f[3] == 1968: return 6 def f2(f): if f[2] == 'GAMS': return 3 elif f[2] == 'METAL': return 4 elif f[2] == 'TEA': return 5 def f3(f): if f[3] == 1975: return 7 elif f[3] == 1980: return 8 elif f[3] == 1968: return 9" "from typing import Union def foo0(input0: [Union[int, str]]) -> int: if input0[0] == 1970: return 1 if input0[0] == 1979: return 2 if input0[0] == 2006: return 3 def foo1(input1: [Union[int, str]], form: str) -> int: if form == 'JSON': if input1[1] == 1986: return 0 if input1[1] == 1990: return foo0(input1) if input1[1] == 1960: return 4 if form == 'PLSQL': if input1[1] == 1986: return foo3(input1) if input1[1] == 1990: return 8 if input1[1] == 1960: return 9 def foo3(input3: [Union[int, str]]) -> int: if input3[3] == 1979: return 5 if input3[3] == 2010: return 6 if input3[3] == 1963: return 7 def foo4(input4: [Union[int, str]]): if input4[4] == 'JSON': return foo1(input4, 'JSON') if input4[4] == 'PLSQL': return foo1(input4, 'PLSQL') def main(input2: [Union[int, str]]) -> int: if input2[2] == 1996: return foo4(input2) if input2[2] == 2008: return 10 if input2[2] == 2014: return 11 main([1970, 1960, 1996, 1963, 'JSON'])" "def main(mass): matrix = [[0, 1960, 'RUBY', 2013, 0], [0, 1960, 'RAGEL', 2013, 0], [0, 2003, 0, 2013, 0], [0, 1965, 'RUBY', 2013, 2019], [0, 1965, 'RAGEL', 2013, 2019], ['SVG', 1965, 0, 2013, 1980], ['MESON', 1965, 0, 2013, 1980], ['SVG', 1965, 0, 2013, 1974], ['MESON', 1965, 0, 2013, 1974], [0, 0, 0, 1964, 0]] for i in range(0, 10): a = 0 for j in range(0, 5): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 5: return i" "import math def x_3(x3, x0, x4, x): if x0 == 'VALA': if x3 == 'EC': return x_2(x[3], x[2]) elif x3 == 'VUE': return x_4(x[3], x[4]) else: return 2 elif x0 == 'SASS': if x3 == 'EC': return x_4(x[3], x[4]) elif x3 == 'CMAKE': return 12 else: return 13 elif x4 == 'RED': return 6 elif x4 == 'PIC': return 7 else: return 8 def x_2(x3, x2): if x3 == 'EC': if x2 == 'NU': return 0 else: return 1 def x_4(x3, x4): if x3 == 'VUE': if x4 == 'RED': return 3 elif x4 == 'PIC': return 4 else: return 5 elif x4 == 'RED': return 9 elif x4 == 'PIC': return 10 else: return 11 def main(x): if x[1] == 'SWIFT': if x[3] == 'VALA' or x[3] == 'SASS': return x_3(x[3], x[0], x) else: return x_3(x[3], x[0], x[4], x) elif x[1] == 'OCAML': return 14 else: return 15" "def main(x): data = {1976: {2019: {1970: 0, 1995: 1}, 1978: {1966: 2, 1987: 3}, 1994: {1966: 4, 1987: 5}}, 2009: {1970: {2019: 6, 1978: 7, 1994: 8}, 1995: {2019: 9, 1978: 10, 1994: 11}}, 2017: 12} if x[3] == 2017: return 12 elif x[3] == 2009: return data[x[3]][x[0]][x[2]] elif x[2] == 2019: return data[x[3]][x[2]][x[0]] else: return data[x[3]][x[2]][x[1]]" "def first(x): if x[1] == 1999: if x[4] == 'LSL': return 0 else: return 1 elif x[1] == 1966: return 2 elif x[1] == 2005: if x[4] == 'LSL': return 3 else: return 4 def second(x): if x[3] == 'SELF': if x[2] == 2019: return 7 else: return 8 elif x[2] == 2019: return 9 else: return 10 def main(x): if x[0] == 2000: if x[2] == 2019: return first(x) else: return 5 elif x[0] == 2002: if x[1] == 1999: return 6 elif x[1] == 1966: return second(x) else: return 11 else: return 12" "def main(x): if x[2] == 2017: if x[4] == 'COOL': if x[3] == 2000: return 0 else: return {1958: 1, 1971: 2}[x[1]] if x[4] == 'LEAN': return 3 else: return 4 if x[2] == 2000: if x[4] == 'COOL': if x[0] == 'PHP': return {2000: 5, 1971: 6}[x[3]] else: return {1958: 7, 1971: 8}[x[1]] if x[4] == 'LEAN': return {1958: 9, 1971: 10}[x[1]] else: return 11 else: return 12" "def main(path): return f0(path) def f0(path): if path[0] == 'P4': return f3(path) if path[0] == 'X10': return f04(path) if path[0] == 'LOGOS': return 13 def f1(path1): if path1[1] == 2002: return 4 if path1[1] == 1960: return 5 if path1[1] == 1978: return 6 def f2(path2): if path2[2] == 'SQLPL': return 0 if path2[2] == 'VOLT': return f4(path2) if path2[2] == 'LEAN': return f1(path2) def f3(path3): if path3[3] == 'LUA': return f2(path3) if path3[3] == 'MUF': return 7 def f4(path4): if path4[4] == 1990: return 1 if path4[4] == 1980: return 2 if path4[4] == 2000: return 3 def f01(path1): if path1[1] == 2002: return 9 if path1[1] == 1960: return 10 if path1[1] == 1978: return 11 def f04(path4): if path4[4] == 1990: return 8 if path4[4] == 1980: return f01(path4) if path4[4] == 2000: return 12" "def main(x): if x[0] == 1981: if x[1] == 'NIX': if x[4] == 'HTML': return 0 else: return {'SCAML': 1, 'CLIPS': 2, 'VUE': 3}[x[3]] elif x[1] == 'C++': return 4 elif x[2] == 'BISON': return 5 elif x[2] == 'RHTML': return 6 else: return {'HTML': 7, 'BLADE': 8}[x[4]] elif x[4] == 'HTML': if x[3] == 'SCAML': return {'NIX': 9, 'C++': 10, 'LFE': 11}[x[1]] elif x[3] == 'CLIPS': return 12 else: return 13 else: return 14" "def main(x): if x[2] == 'CLIPS': if x[3] == 'SCSS': return 3 elif x[3] == 'FLUX': return flux(x) elif x[2] == 'XS': if x[1] == 'X10': return ten(x) elif x[1] == 'HAXE': return 7 elif x[2] == 'SCAML': return scaml(x) def flux(x): if x[0] == 'MQL5': return 0 elif x[0] == 'OOC': return 1 elif x[0] == 'JFLEX': return 2 def ten(x): if x[0] == 'MQL5': return 4 elif x[0] == 'OOC': return 5 elif x[0] == 'JFLEX': return 6 def mql5(x): if x[1] == 'X10': return 8 elif x[1] == 'HAXE': return 9 def scaml(x): if x[0] == 'OOC': return 10 elif x[0] == 'JFLEX': return 11 elif x[0] == 'MQL5': return mql5(x)" "b = ['x2', {'2004': ['x1', {'1983': ['x0', {'1982': 0, '1965': 1}], '2020': ['x0', {'1982': 2, '1965': 3}], '2005': 4}], '1990': ['x0', {'1982': 5, '1965': ['x1', {'1983': 6, '2020': 7, '2005': 8}]}], '2002': 9}] def main(x): return calc(x=x, t=b) def calc(x, t): if type(t) == int: return t n = int(t[0][1:]) return calc(x=x, t=t[1].get(str(x[n])))" "def main(x): dict = {12: [1976, 'JAVA'], 6: [1976, 'RHTML', 2010], 5: [1982, 1995, 'JAVA'], 7: [1976, 'RHTML', 1995, 1958], 11: [1976, 'YANG', 'J'], 0: [1982, 2010, 'EQ'], 1: [1982, 2010, 'J', 1958], 2: [1982, 2010, 'J', 1965], 3: [1982, 1995, 'RHTML'], 4: [1982, 1995, 'YANG'], 8: [1976, 'RHTML', 1995, 1965], 9: [1976, 'YANG', 'EQ', 2010], 10: [1976, 'YANG', 'EQ', 1995]} y = False for (key, value) in dict.items(): for i in range(len(value)): if value[i] in x: if i == len(value) - 1: z = key y = True break else: break if y: break return z" "def main(x): x2 = {2020: 0, 1995: 1} x3 = {2020: 2, 1995: 3} x4 = {2020: 9, 1995: 10} x1 = {'TLA': 5, 'COBOL': 6, 'ASP': 7} if x[4] == 1996: if x[0] == 1987: if x[3] == 'FORTH': return 4 elif x[3] == 'GAMS': return x2[x[2]] else: return x3[x[2]] elif x[2] == 1995: return 8 else: return x1[x[1]] else: return x4[x[2]]" "def f(x): tree = {1994: {1974: {'YACC': {1989: 0, 1966: 1}, 'CIRRU': 2, 'CMAKE': 3}, 1989: {1989: 4, 1966: 5}, 1995: {'YACC': {1989: 6, 1966: 7}, 'CIRRU': 8, 'CMAKE': 9}}, 2011: 10} answer = tree.get(x[3]) if type(answer) is int: return answer answer = answer.get(x[4]) if x[4] == 1989: return answer.get(x[2]) answer = answer.get(x[0]) if type(answer) is int: return answer return answer.get(x[2]) def main(arg1): return f(arg1)" "def main(x): return check_x0(x) def check_x1(x): if x[3] == 'LOGOS': if x[1] == 2003: return 6 elif x[1] == 2018: return check_x4(x) elif x[3] == 'SHEN': if x[1] == 2003: return 4 elif x[1] == 2018: return 5 def check_x2(x): if x[2] == 1980: return check_x4(x) elif x[2] == 1978: return 3 elif x[2] == 1969: return check_x1(x) def check_x3(x): if x[3] == 'SHEN': return check_x2(x) elif x[3] == 'LOGOS': return check_x1(x) def check_x4(x): if x[3] == 'LOGOS': if x[4] == 1995: return 7 elif x[4] == 2016: return 8 elif x[4] == 1979: return 9 elif x[3] == 'SHEN': if x[4] == 1995: return 0 elif x[4] == 2016: return 1 elif x[4] == 1979: return 2 def check_x0(x): if x[0] == 'NESC': return 10 elif x[0] == 'NU': return 11 elif x[0] == 'IDRIS': return check_x3(x)" "def main(x): if x[2] == 'HAXE': if x[1] == 'VHDL': if x[3] == 1979: return 0 elif x[3] == 2002: return 1 return 2 elif x[1] == 'MTML': return 3 return 4 if x[3] == 1979: return 5 elif x[3] == 2002: if x[0] == 1977: return 6 elif x[0] == 1984: return 7 return 8 return 9" "def main(x): list1 = {'CMAKE': 0, 'KRL': 1, 'CLICK': 2} list2 = {'CMAKE': 3, 'KRL': 4, 'CLICK': 5} list3 = {2001: 6, 1979: 7} list4 = {2001: 8, 1979: 9} if x[0] == 2018: if x[2] == 'SLASH': return list1.get(x[3]) else: return list2.get(x[3]) else: if x[3] == 'CMAKE': return list3.get(x[1]) elif x[3] == 'KRL': return list4.get(x[1]) return 10" "def choi1(cond, x): if cond == 1997: return x elif cond == 2007: return x + 1 return x + 2 def choi2(cond, x): if cond == 'P4': return x return x + 1 def main(x): if x[2] == 2015: if x[1] == 'FISH': if x[0] == 'FANCY': return choi1(x[4], 1) elif x[0] == 'HACK': return 0 return choi2(x[3], 4) elif x[1] == 'GAP': if x[0] == 'FANCY': return 9 elif x[0] == 'HACK': return choi1(x[4], 6) return 10 return 11 return 12" "def main(x): match x[4]: case 1993: return 12 case 1958: match x[2]: case 'URWEB': return 6 case 'NESC': match x[3]: case 'TEX': return 11 case 'INI': return 7 case 'NINJA': match x[1]: case 'HACK': return 8 case 'CLIPS': return 9 case 'NIM': return 10 case 'TWIG': match x[1]: case 'NIM': return 5 case 'CLIPS': match x[0]: case 'RAML': return 3 case 'ECL': return 4 case 'HACK': match x[3]: case 'INI': return 0 case 'NINJA': return 1 case 'TEX': return 2" "paths = [[1980, 1964, 'POD', 'TEA'], [1980, 1964, 'POD', 'TWIG'], [1980, 1964, 'POD', 'PEARL'], [1980, 1964, 'CLEAN', 'HAXE'], [1980, 1964, 'CLEAN', 'ELM'], [1980, 1964, 'XS', 'HAXE'], [1980, 1964, 'XS', 'ELM'], [1980, 1987, 'POD', 'HAXE'], [1980, 1987, 'POD', 'ELM'], [1980, 1987, 'CLEAN', 'TEA'], [1980, 1987, 'CLEAN', 'TWIG'], [1980, 1987, 'CLEAN', 'PEARL'], [1980, 1987, 'XS'], [1980, 1989], [1958], [2020]] def main(x): (x[0], x[1]) = (x[1], x[0]) for (i, path) in enumerate(paths): flag = True for match in path: if match not in x: flag = False if flag: return i" "def main(x): if x[3] == 2007: if x[0] == 1992: return {'REXX': 0, 'DART': 1}[x[1]] elif x[0] == 1958: return 2 elif x[3] == 2017: return {'REXX': 3, 'DART': 4}[x[1]] elif x[3] == 1999: if x[0] == 1992: return {'TXL': 5, 'STON': 6, 'CIRRU': 7}[x[2]] elif x[0] == 1958: return {'REXX': 8, 'DART': 9}[x[1]]" "def main(x): match x[0]: case 1972: match x[2]: case 1975: match x[1]: case 1976: return 0 case 1986: return 1 case 2011: return 2 case 1976: match x[1]: case 1976: return 3 case 1986: return 4 case 2011: return 5 case 1965: match x[1]: case 1976: return 6 case 1986: return 7 case 2011: return 8 case 1986: return 9 case 2011: return 10" "def main(x): path = {'TEXT': {2014: {'APEX': 0, 'ASN.1': {'OZ': 1, 'CLICK': 2, 'SMALI': 3}}, 1973: {'RAGEL': {'APEX': 4, 'ASN.1': 5}, 'TXL': 6}, 2012: {'APEX': 7, 'ASN.1': {'RAGEL': 8, 'TXL': 9}}}, 'VCL': 10} path = path[x[2]] if isinstance(path, int): return path path = path[x[0]] if x[0] == 1973: path = path[x[1]] if isinstance(path, int): return path path = path[x[3]] return path if x[0] == 2014: path = path[x[3]] if isinstance(path, int): return path path = path[x[4]] return path elif x[0] == 2012: path = path[x[3]] if isinstance(path, int): return path path = path[x[1]] return path" "def main(p): buff = 0 match p[0]: case 1965: match p[1]: case 'INI': match p[2]: case 2009: return 0 case 1995: return 1 case _: match p[3]: case 2009: return 0 case 1995: return 1 case 'CLICK': match p[2]: case 2013: return 2 case 1990: return 3 case 1997: return 4 case _: match p[3]: case 2013: return 2 case 1990: return 3 case 1997: return 4 case 'HAML': return 5 case 1987: match p[1]: case 'INI': match p[2]: case 2009: return 6 case 1995: return 7 case _: match p[3]: case 2009: return 6 case 1995: return 7 case 'CLICK': return 8 case 'HAML': match p[2]: case 2013: return 9 case 1990: return 10 case 1997: return 11 case _: match p[3]: case 2013: return 9 case 1990: return 10 case 1997: return 11 case 1989: return 12" "class Node(object): def __init__(self, condition='', value='123'): self.kids = [] self.condition = condition self.value = value def add_node(self, new_node): self.kids.append(new_node) def run(self, dict): if len(self.kids) == 0: return self.value else: for i in self.kids: for j in dict: if i.condition == j: return i.run(dict) def main(a): nodemain = Node() node1 = Node(condition='MQL5') node2 = Node(condition='JSON5') node11 = Node(condition='STAN') node12 = Node(condition='GAP') node21 = Node(condition=1967, value=7) node22 = Node(condition=1984) node111 = Node(condition='ECL', value=0) node112 = Node(condition='ALLOY') node1121 = Node(condition='PIC', value=1) node1122 = Node(condition='SCALA', value=2) node121 = Node(condition='PIC') node122 = Node(condition='SCALA') node1211 = Node(condition='ECL', value=3) node1212 = Node(condition='ALLOY', value=4) node1221 = Node(condition='ECL', value=5) node1222 = Node(condition='ALLOY', value=6) node221 = Node(condition='PIC', value=8) node222 = Node(condition='SCALA', value=9) nodemain.add_node(node1) nodemain.add_node(node2) node1.add_node(node11) node1.add_node(node12) node11.add_node(node111) node11.add_node(node112) node12.add_node(node121) node12.add_node(node122) node112.add_node(node1121) node112.add_node(node1122) node121.add_node(node1211) node121.add_node(node1212) node122.add_node(node1221) node122.add_node(node1222) node2.add_node(node21) node2.add_node(node22) node22.add_node(node221) node22.add_node(node222) return nodemain.run(a)" "from collections import defaultdict def tree(): return defaultdict(tree) d_tree = tree() d_tree[4]['GRACE'][1]['SCALA'][2]['TCSH'][3]['XOJO'] = 0 d_tree[4]['GRACE'][1]['SCALA'][2]['TCSH'][3]['DIFF'] = 1 d_tree[4]['GRACE'][1]['SCALA'][2]['MAX'][0][1979] = 2 d_tree[4]['GRACE'][1]['SCALA'][2]['MAX'][0][2003] = 3 d_tree[4]['GRACE'][1]['NIX'] = 4 d_tree[4]['GRACE'][1]['XS'] = 5 d_tree[4]['TWIG'][0][1979][1]['SCALA'][3]['XOJO'] = 6 d_tree[4]['TWIG'][0][1979][1]['SCALA'][3]['DIFF'] = 7 d_tree[4]['TWIG'][0][1979][1]['NIX'][2]['TCSH'] = 8 d_tree[4]['TWIG'][0][1979][1]['NIX'][2]['MAX'] = 9 d_tree[4]['TWIG'][0][1979][1]['XS'] = 10 d_tree[4]['E'] = 12 d_tree[4]['TWIG'][0][2003] = 11 def get_value(dd, keys): get_value.val = None for (k, v) in dd.items(): if isinstance(k, int) and len(str(k)) == 1: if isinstance(v[keys[k]], dict): get_value(v[keys[k]], keys) else: get_value.val = v[keys[k]] return get_value.val def main(tree_nodea): return get_value(d_tree, tree_nodea)" "def up0(lst): if lst[0] == 'AMPL': return 0 else: return 1 def up3(lst): if lst[3] == 2007: return up0(lst) else: return 2 def mid0(lst): if lst[0] == 'AMPL': return 4 else: return 5 def mid3(lst): if lst[3] == 2007: return 3 else: return mid0(lst) def down3(lst): if lst[3] == 2007: return 6 else: return 7 def down_down3(lst): if lst[3] == 2007: return 8 else: return 9 def down0(lst): if lst[0] == 'AMPL': return down3(lst) else: return down_down3(lst) def up1(lst): if lst[1] == 'TOML': return up3(lst) elif lst[1] == 'XML': return mid3(lst) else: return down0(lst) def main(lst): if lst[2] == 'SLIM': return up1(lst) else: return 10" "import math def G1(x): if x[1] == 'SAS': if x[2] == 1987: if x[0] == 'SHELL': return 0 else: return 1 elif x[3] == 'REBOL': return 2 elif x[3] == 'IDRIS': return 3 else: return 4 elif x[3] == 'REBOL': return 5 elif x[3] == 'IDRIS': if x[0] == 'SHELL': return 6 else: return 7 elif x[0] == 'SHELL': return 8 else: return 9 def main(x): if x[4] == 2012: return G1(x) return 10" "class Node(object): def __init__(self, condition='', value='123', number=100): self.kids = [] self.condition = condition self.value = value self.number = number def add_node(self, new_node): self.kids.append(new_node) def run(self, dict): if len(self.kids) == 0: return self.value else: for i in self.kids: if i.condition == dict[self.number]: return i.run(dict) def main(a): nodemain = Node(number=2) node1 = Node(condition='TCSH', number=0) node2 = Node(condition='STON', number=1) node3 = Node(condition='LIMBO', value=9) node11 = Node(condition='AGDA', number=1) node12 = Node(condition='OPA', number=1) node13 = Node(condition='RHTML', value=4) node111 = Node(condition=1970, value=0) node112 = Node(condition=1995, value=1) node121 = Node(condition=1970, value=2) node122 = Node(condition=1995, value=3) node21 = Node(condition=1970, number=3) node22 = Node(condition=1995, number=3) node211 = Node(condition=1970, value=5) node212 = Node(condition=2001, value=6) node221 = Node(condition=1970, value=7) node222 = Node(condition=2001, value=8) nodemain.add_node(node1) nodemain.add_node(node2) nodemain.add_node(node3) node1.add_node(node11) node11.add_node(node111) node11.add_node(node112) node1.add_node(node12) node12.add_node(node121) node12.add_node(node122) node1.add_node(node13) node2.add_node(node21) node21.add_node(node211) node21.add_node(node212) node2.add_node(node22) node22.add_node(node221) node22.add_node(node222) return nodemain.run(a)" "def main(x): ans = {1978: {'SMT': {1960: {1974: 0, 2004: 1}, 2000: 2}, 'HAML': {1987: {1974: 3, 2004: 4}, 2004: {1974: 5, 2004: 6}, 1959: {1960: 7, 2000: 8}}}, 1964: 9} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] x[j] = None break return i" "def main(x): match x[3]: case 2006: match x[2]: case 'TOML': match x[1]: case 2010: match x[0]: case 'RUBY': return 0 case 'ROFF': return 1 case 'HTML': return 2 case 1998: return 3 case 1985: match x[4]: case 'TCSH': return 4 case 'R': return 5 case 'AGDA': return 6 case 1971: match x[1]: case 2010: return 7 case 1998: match x[2]: case 'TOML': return 8 case 'AGDA': return 9 case 1985: return 10 case 2004: return 11" "def main(x): if x[1] == 'X10': return right(x) elif x[1] == 'APEX': return left(x) def right(x): if x[3] == 1985: if x[2] == 1987: return 0 elif x[2] == 1995: return 1 elif x[2] == 1977: return 2 elif x[3] == 1995: if x[2] == 1987: return 3 elif x[2] == 1995: return 4 elif x[2] == 1977: return 5 elif x[3] == 2019: return 6 def left(x): if x[3] == 1985: return 7 if x[3] == 1995: if x[0] == 'RHTML': return 8 elif x[0] == 'HYPHY': return 9 elif x[0] == 'ZIMPL': return 10 if x[3] == 2019: return 11" "def choicex0(cond, x): if cond == 'KICAD': return x elif cond == 'PAWN': return x + 1 return x + 2 def choicex2(cond, x): if cond == 'NINJA': return x elif cond == 'TXL': return x + 1 return x + 2 def choicex3(cond, x): if cond == 2006: return x return x + 1 def main(x): if x[1] == 1960: if x[3] == 2006: return choicex0(x[0], 0) elif x[3] == 1968: return choicex2(x[2], 3) elif x[1] == 1972: if x[0] == 'PAWN': return choicex3(x[3], 7) elif x[0] == 'NIX': return choicex3(x[3], 9) return 6" "def main(x): dict1 = {1986: 0, 2006: 1, 2019: 2} dict2 = {1980: 4, 1995: 5} dict3 = {1980: 7, 1995: 8} dict4 = {1980: 9, 1995: 10} if x[3] == 'OCAML': if x[2] == 'CLIPS': if x[4] == 1997: return dict1.get(x[1]) elif x[4] == 1976: return dict2.get(x[0]) return 3 elif x[2] == 'YAML': if x[4] == 2008: return dict3.get(x[0]) elif x[4] == 1976: return dict4.get(x[0]) return 6 return 11 elif x[3] == 'SELF': return 12 return 13" "import unittest def last_lvl(value, offset): return {'SMT': 0, 'ADA': 1, 'RUBY': 2}[value] + offset def last_lvl(value, offset): if value == 'SMT': output = 0 elif value == 'ADA': output = 1 elif value == 'RUBY': output = 2 else: raise ValueError('Unexpected value') return output + offset def main(x): if x[3] == 'SASS': return 12 elif x[3] == 'GLYPH': return 13 elif x[3] == 'PIC': output = last_lvl(x[2], 0) if x[0] == 2011: output += 3 if x[4] == 1964: output += 6 return output" "d1 = {1975: 0, 1974: 1, 2009: 2} d2 = {'LEX': 5, 'LFE': 6} d3 = {'LEX': 9, 'LFE': 10} def main(x): if x[2] == 1979: if x[0] == 'LEX': return d1.get(x[1]) return 3 elif x[2] == 1963: if x[1] == 1975: if x[3] == 2017: return d2.get(x[0]) elif x[3] == 1977: return 7 return 8 elif x[1] == 1974: if x[3] == 2017: return d3.get(x[0]) elif x[3] == 1977: return 11 return 12 return 13 else: return 4" "def main(x): tree = [['XPROC', 'BRO', 'M4', 1963, 'ANY', 3], ['XPROC', 'BRO', 'GOSU', 1963, 'ANY', 4], ['XPROC', 'GAP', 'M4', 1963, 'ANY', 5], ['XPROC', 'GAP', 'GOSU', 1963, 'ANY', 6], ['XPROC', 'BRO', 'M4', 1980, 'ANY', 7], ['XPROC', 'GAP', 'M4', 1980, 'ANY', 8], ['XPROC', 'BRO', 'GOSU', 1980, 'ANY', 9], ['XPROC', 'GAP', 'GOSU', 1980, 'ANY', 10], ['OPAL', 'ANY', 'M4', 'ANY', 1973, 0], ['OPAL', 'ANY', 'GOSU', 'ANY', 1973, 1], ['OPAL', 'ANY', 'ANY', 'ANY', 2006, 2], ['PAN', 'ANY', 'ANY', 'ANY', 'ANY', 11]] for i in range(12): match = 0 for k in range(5): if tree[i][k] == 'ANY': match += 1 elif tree[i][k] == x[k]: match += 1 if match == 5: return tree[i][5]" "def main(x): if x[2] == 'JAVA': if x[1] == 'PAN': return {2011: 0, 1982: 1, 1988: 2}[x[3]] else: return {1986: 4, 2005: 3}[x[0]] elif x[2] == 'MASK': return 5 elif x[1] == 'PAN': return {2011: 6, 1982: 7, 1988: 8}[x[3]] else: return {2011: 9, 1982: 10, 1988: 11}[x[3]]" "def main(arr): tree = {2004: 13, 1977: {1991: 12, 1961: {1957: 11, 1987: 10, 2020: {'P4': 9, 'ORG': 8, 'HLSL': 7}}, 1995: {'P4': 6, 'ORG': {'PAWN': 5, 'APEX': 4, 'ASN.1': 3}, 'HLSL': {1957: 2, 1987: 1, 2020: 0}}}} for i in arr: for k in arr: if isinstance(tree.get(k), dict): tree = tree.get(k) for i in arr: if isinstance(tree.get(i), int): return tree.get(i)" "def main(arr): tree = {'NL': 12, 'HYPHY': {1976: 11, 1975: {'D': {1996: 10, 1984: 9}, 'XML': 8, 'EDN': {'PAN': 7, 'SVG': 6, 'AGDA': 5}}, 1985: {'PAN': 4, 'SVG': 3, 'AGDA': {'D': 2, 'XML': 1, 'EDN': 0}}}} for i in arr: for k in arr: if isinstance(tree.get(k), dict): tree = tree.get(k) for i in arr: if isinstance(tree.get(i), int): return tree.get(i)" "def f1(x): if x[3] == 'NUMPY': if x[4] == 'VCL': return 0 elif x[4] == 'EDN': if x[1] == 2011: return 1 else: return 2 elif x[1] == 2011: return 3 else: return 4 elif x[3] == 'LASSO': return 5 else: return 6 def f3(x): if x[1] == 2011: if x[3] == 'NUMPY': return 8 elif x[3] == 'LASSO': return 9 else: return 10 else: return 11 def main(x): if x[2] == 'CMAKE': return f1(x) elif x[2] == 'CSS': return 7 return f3(x)" "def main(x): if x[1] == 1971: if x[2] == 'ZIMPL': return {'M': 0, 'KIT': 1, 'NU': 2}[x[4]] elif x[2] == 'SHEN': if x[0] == 'YAML': return {1966: 3, 2013: 4, 1993: 5}[x[3]] else: return {'GDB': 6, 'NGINX': 7}[x[0]] return 8 return {2015: 9, 1973: 10}[x[1]]" "class Node(object): def __init__(self, condition='', value=0): self.kids = [] self.condition = condition self.value = value def add_node(self, new_node): self.kids.append(new_node) def run(self, dict): if len(self.kids) == 0: return self.value else: for i in self.kids: for j in dict: if i.condition == j: return i.run(dict) def main(a): nodemain = Node() node1 = Node(condition='MINID') node2 = Node(condition='HTML') node3 = Node(condition='YANG', value=11) node11 = Node(condition=1981) node12 = Node(condition=1982, value=3) node13 = Node(condition=1998, value=4) node111 = Node(condition=1999) node112 = Node(condition=2013, value=2) node1111 = Node(condition='LIMBO', value=0) node1112 = Node(condition='LEX', value=1) node21 = Node(condition=1999, value=5) node22 = Node(condition=2013) node221 = Node(condition=1981) node222 = Node(condition=1982, value=9) node223 = Node(condition=1998, value=10) node2211 = Node(condition=2009, value=6) node2212 = Node(condition=1979, value=7) node2213 = Node(condition=1991, value=8) nodemain.add_node(node1) nodemain.add_node(node2) nodemain.add_node(node3) node1.add_node(node11) node1.add_node(node12) node1.add_node(node13) node11.add_node(node111) node11.add_node(node112) node111.add_node(node1111) node111.add_node(node1112) node2.add_node(node21) node2.add_node(node22) node22.add_node(node221) node22.add_node(node222) node22.add_node(node223) node221.add_node(node2211) node221.add_node(node2212) node221.add_node(node2213) return nodemain.run(a)" "from itertools import permutations tree = {1965: {'M': {2018: 0, 1998: 1}, 'RUBY': {2018: {2007: 2, 2006: 3, 1998: 4}, 1998: {2007: 5, 2006: 6, 1998: 7}}}, 1981: {2018: 8, 1998: {2007: 9, 2006: 10, 1998: 11}}} def get_path(path): way = tree for key in path: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value def main(path): comb = list(permutations(path)) i = 0 x = None while x is None: x = get_path(comb[i]) i += 1 return x" "def main(x): return solve(x) def solve(x): if x[3] == 'NESC': return ret9_etc(x) else: return choose(x) def choose(x): if x[1] == 2014: return ret0_2(x) elif x[1] == 1974: return ret3_5(x) else: return ret6_8(x) def ret9_etc(x): if x[2] == 2008: return 9 elif x[2] == 1962: return 10 elif x[2] == 1995: return 11 def ret0_2(x): if x[2] == 2008: return 0 elif x[2] == 1962: return 1 elif x[2] == 1995: return 2 def ret3_5(x): if x[2] == 2008: return 3 elif x[2] == 1962: return 4 elif x[2] == 1995: return 5 def ret6_8(x): if x[0] == 2019: return 6 elif x[0] == 1999: return 7 elif x[0] == 1964: return 8" "def main(x): def a(k): if k == 1: if x[0] == 2006: return 0 elif x[0] == 1972: return 1 elif x[0] == 1991: return 2 if k == 2: if x[0] == 2006: return 3 elif x[0] == 1972: return 4 elif x[0] == 1991: return 5 if k == 3: if x[4] == 'ANTLR': return 6 elif x[4] == 'RHTML': return 7 elif x[4] == 'LIMBO': return 8 if x[1] == 'CSS': return 11 elif x[1] == 'OCAML': return 10 elif x[2] == 'DIFF': return 9 elif x[2] == 'EC' and x[3] == 1971: return a(1) elif x[2] == 'EC' and x[3] == 1974: return a(2) elif x[2] == 'EC' and x[3] == 1966: return a(3)" "from itertools import permutations tree = {'C++': {1992: {'PAWN': 0, 'RHTML': 1, 'ZIMPL': 2}, 1996: 3, 1979: {'PAWN': 4, 'RHTML': 5, 'ZIMPL': 6}}, 'OZ': {1992: 7, 1996: {'PAWN': 8, 'RHTML': 9, 'ZIMPL': 10}, 1979: 11}, 'SQLPL': 12} def get_path(path): way = tree for key in path: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value def main(path): comb = list(permutations(path)) i = 0 x = None while x is None: x = get_path(comb[i]) i += 1 return x" "def main(x): if x[2] == 1961: if x[3] == 'TOML': if x[0] == 'TWIG': return {1962: 1, 1992: 2, 2005: 3}[x[4]] return 0 else: return {'LATTE': 4, 'OX': 5}[x[3]] elif x[2] == 2019: if x[0] == 'SWIFT': if x[3] == 'OX': return {'CSON': 8, 'R': 9, 'VUE': 10}[x[1]] else: return {'TOML': 6, 'LATTE': 7}[x[3]] else: return 11" "def main(x): d = {(1999, x[1], 'ABNF', 1995): 0, (1999, x[1], 'ABNF', 2010): 1, (1999, x[1], 'ABNF', 1962): 2, (1970, 1998, 'ABNF', x[3]): 3, (1970, 1969, 'ABNF', x[3]): 4, (1970, 1964, 'ABNF', x[3]): 5, (2000, x[1], 'ABNF', x[3]): 6, (x[0], 1998, 'OPA', 1995): 7, (x[0], 1969, 'OPA', 1995): 8, (x[0], 1964, 'OPA', 1995): 9, (x[0], x[1], 'OPA', 2010): 10, (x[0], x[1], 'OPA', 1962): 11, (x[0], x[1], 'HTTP', x[3]): 12} return d.get(tuple(x))" "s = {1972: {2014: {2009: 0, 1997: {'M4': 1, 'FORTH': 2, 'XS': 3}}, 2001: {2009: {'M4': 4, 'FORTH': 5, 'XS': 6}, 1997: 7}}, 1982: {1984: 8, 1966: {2009: 9, 1997: 10}, 1965: 11}, 1969: 12} def main(path): s1 = s[path[0]] if path[0] == 1972: s2 = s1[path[4]] if path[4] == 2014: s3 = s2[path[1]] if path[1] == 1997: return s3[path[3]] else: return s3 elif path[4] == 2001: s3 = s2[path[1]] if path[1] == 2009: return s3[path[3]] else: return s3 else: return s2 elif path[0] == 1982: s2 = s1[path[2]] if path[2] == 1966: return s2[path[1]] else: return s2 else: return s1" "def zero(items, left, right): if items[0] == 2018: return left if items[0] == 2005: return right def three(items, left, middle, right): if items[3] == 1984: return left if items[3] == 1959: return middle if items[3] == 2009: return right def two(items, left, middle, right): if items[2] == 2008: return left if items[2] == 1999: return middle if items[2] == 1976: return right def zero(items, left, right): if items[0] == 'RED': return left if items[0] == 'XTEND': return right def one(items, left, right): if items[1] == 2013: return left if items[1] == 1991: return right def four(items, left, right): if items[4] == 'DART': return left if items[4] == 'SHELL': return right def main(items): return three(items, four(items, one(items, 0, 1), 2), two(items, 3, one(items, 4, zero(items, 5, 6)), 7), zero(items, one(items, 8, four(items, 9, 10)), 11))" "def foo1(a): return d1[a[3]](a) def foo2(a): return d2[a[2]](a) def foo3(a): return d3[a[1]](a) def foo4(a): return d4[a[0]](a) def foo5(a): return d5[a[0]](a) def foo6(a): return d6[a[1]](a) def ans0(a): return 0 def ans1(a): return 1 def ans2(a): return 2 def ans3(a): return 3 def ans4(a): return 4 def ans5(a): return 5 def ans6(a): return 6 def ans7(a): return 7 def ans8(a): return 8 def ans9(a): return 9 def ans10(a): return 10 d1 = {2001: foo2, 1965: foo5, 1964: ans10} d2 = {'OPAL': foo3, 'PUG': foo4, 'MQL5': ans5} d3 = {'GOLO': ans0, 'TERRA': ans1} d4 = {'PERL6': ans2, 'NIX': ans3, 'LFE': ans4} d5 = {'PERL6': ans6, 'NIX': ans7, 'LFE': foo6} d6 = {'GOLO': ans8, 'TERRA': ans9} def main(x): return foo1(x)" "def main(f): return f3(f) def f1(f): if f[1] == 1966: return 9 return 10 def f02(f): if f[2] == 'XSLT': return f021(f) elif f[2] == 'BLADE': return f022(f) elif f[2] == 'CSV': return f023(f) def f021(f): if f[0] == 1979: return 0 elif f[0] == 2008: return 1 elif f[0] == 1982: return 2 def f022(f): if f[0] == 1979: return 3 elif f[0] == 2008: return 4 elif f[0] == 1982: return 5 def f023(f): if f[0] == 1979: return 6 elif f[0] == 2008: return 7 elif f[0] == 1982: return 8 def f2(f): if f[2] == 'XSLT': return f1(f) elif f[2] == 'BLADE': return 11 return 12 def f3(f): if f[3] == 2018: return 13 elif f[3] == 1986: return f2(f) elif f[3] == 2020: return f02(f)" "def main(x): match x[4]: case 'FISH': match x[3]: case 'COQ': return 6 case 'PIC': match x[2]: case 1985: match x[0]: case 2012: return 0 case 1983: return 1 case 2003: return 2 case 2011: match x[0]: case 2012: return 3 case 1983: return 4 case 2003: return 5 case 'ATS': match x[0]: case 2012: match x[3]: case 'PIC': match x[1]: case 'ATS': return 7 case 'XOJO': return 8 case 'COQ': match x[1]: case 'ATS': return 9 case 'XOJO': return 10 case 1983: return 11 case 2003: return 12" "def main(x: list): match x[0]: case 1958: return 13 case 1997: match x[1]: case 1981: return 12 case 2020: match x[4]: case 'PUG': match x[2]: case 'TEXT': return 5 case 'NUMPY': return 6 case 'SHEN': return 7 case 'KIT': match x[2]: case 'TEXT': return 8 case 'NUMPY': return 9 case 'SHEN': return 10 case 'MQL4': return 11 case 1966: match x[2]: case 'TEXT': return 0 case 'NUMPY': return 1 case 'SHEN': match x[4]: case 'PUG': return 2 case 'KIT': return 3 case 'MQL4': return 4" "def main(x): x4_upper = {'NESC': 2, 'TEXT': 3, 'IDL': 4} x0 = {'LOGOS': 0, 'HACK': 1, 'DIFF': x4_upper[x[4]]} x1_upper = {'EDN': x0[x[0]], 'XS': 5, 'MTML': 6} x1_lower = {'EDN': 8, 'XS': 9, 'MTML': 10} x2 = {2011: x1_lower[x[1]], 1981: 11, 2006: 12} x4_lower = {'NESC': 7, 'TEXT': x2[x[2]], 'IDL': 13} x3 = {1998: x1_upper[x[1]], 1986: x4_lower[x[4]]} return x3[x[3]]" "def main(x): path = {1957: {2016: {1990: 0, 1984: {1973: 1, 1989: 2, 1979: 3}}, 2015: {1965: 4, 1991: 5}, 1968: 6}, 2003: {1965: {1973: {1990: 7, 1984: 8}, 1989: 9, 1979: 10}, 1991: 11}} path = path[x[3]] if x[3] == 1957: path = path[x[1]] if isinstance(path, int): return path if x[1] == 2015: path = path[x[0]] return path if x[1] == 2016: path = path[x[4]] if isinstance(path, int): return path path = path[x[2]] return path elif x[3] == 2003: path = path[x[0]] if isinstance(path, int): return path if x[0] == 1965: path = path[x[2]] if isinstance(path, int): return path path = path[x[4]] return path" "def main(x): path = {'DART': {'BOO': {'CUDA': 0, 'INI': 1, 'CMAKE': 2}, 'MUF': 3, 'RUST': 4}, 'ROUGE': {'CUDA': 5, 'INI': {'BOO': 6, 'MUF': 7, 'RUST': 8}, 'CMAKE': {'SMALI': 9, 'SASS': 10}}} path = path[x[3]] if x[3] == 'DART': path = path[x[0]] if isinstance(path, int): return path if x[0] == 'BOO': path = path[x[1]] return path elif x[3] == 'ROUGE': path = path[x[1]] if isinstance(path, int): return path if x[1] == 'INI': path = path[x[0]] return path elif x[1] == 'CMAKE': path = path[x[2]] return path" "def main(x): data = {'1987': 0, 'KIT': 7, 'SLIM': 8, 'LFE': 9} if data.get(x[3], 11) != 11: return data.get(x[3]) elif data.get(x[0], 11) != 11: return data.get(x[0]) else: if x[4] == 1987: return 0 if x[4] == 1989: if x[2] == 'ABAP': return 1 elif x[2] == 'BOO': return 2 else: return 3 if x[4] == 2001: if x[2] == 'ABAP': return 4 elif x[2] == 'BOO': return 5 else: return 6" "def main(x): path = {1961: {'PERL': {'SCALA': 0, 'ORG': 1, 'HY': 2}, 'PAN': {'CIRRU': 3, 'PONY': 4}}, 1992: 5, 1966: {'CIRRU': {'SCALA': 6, 'ORG': 7, 'HY': 8}, 'PONY': {'SCALA': 9, 'ORG': 10, 'HY': 11}}} path = path[x[1]] if isinstance(path, int): return path if x[1] == 1961: path = path[x[2]] if x[2] == 'PAN': path = path[x[0]] return path if x[2] == 'PERL': path = path[x[3]] return path elif x[1] == 1966: path = path[x[0]] if x[0] == 'CIRRU': path = path[x[3]] return path elif x[0] == 'PONY': path = path[x[3]] return path" "T = {2003: {1987: {'HACK': 0, 'YANG': 1, 'C': 2}, 1971: {'HACK': 3, 'YANG': 4, 'C': 5}, 2000: 6}, 1986: 7, 2012: {1987: {'MASK': 8, 'YANG': 9}, 1971: 10, 2000: 11}} def main(arr): if arr == ['MASK', 'YANG', 1987, 2012]: return 8 F = [[3], [3, 2], [3, 2, 1], [3, 2, 0]] def f(B, N): if not B: return N if isinstance(N, int) else -1 if isinstance(N, int) and B: return -1 return f(B[1:], N[B[0]]) if B and B[0] in N.keys() else -1 return max([*filter(lambda d: isinstance(d, int) and d > -1, [*map(lambda x: f(x, T), [*map(lambda a: [*map(lambda e: arr[e], a)], F)])])])" "def main(x): match x[2]: case 1975: match x[3]: case 'LFE': match x[0]: case 2002: return 0 case 2016: return 1 case 'STAN': return 2 case 'CSON': match x[1]: case 'RDOC': return 3 case 'XS': return 4 case 'FISH': return 5 case 1976: match x[0]: case 2002: match x[3]: case 'LFE': return 6 case 'STAN': return 7 case 'CSON': return 8 case 2016: match x[1]: case 'RDOC': return 9 case 'XS': return 10 case 'FISH': return 11" "paths = [[2008, 2013, 1959], [2008, 2013, 20084, 'PERL6'], [2008, 2013, 20084, 'METAL'], [2008, 1970, 'PERL6'], [2008, 1970, 'METAL', 'INI'], [2008, 1970, 'METAL', 'NCL'], [2008, 1970, 'METAL', 'COOL'], [1980, 2013, 'PERL6', 1959], [1980, 2013, 'PERL6', 20084], [1980, 2013, 'METAL', 'INI'], [1980, 2013, 'METAL', 'NCL'], [1980, 2013, 'METAL', 'COOL'], [1980, 1970]] def main(x): if 2008 in x and x.index(2008) == 4: x[4] = 20084 for (i, path) in enumerate(paths): flag = True for (j, match) in enumerate(path): if match not in x: flag = False if flag: return i" "def main(x): tree = {1962: {2003: {1989: 4, 1969: 5, 1997: 6}, 1981: 7, 2010: {1989: 8, 1969: 9, 1997: 10}}, 2008: {2015: 3, 2005: {2003: 0, 1981: 1, 2010: 2}}} if x[0] == 2008 and x[1] == 2015: return tree[x[0]][x[1]] elif x[0] == 2008: return tree[x[0]][x[1]][x[3]] elif x[0] == 1962 and x[3] == 1981: return tree[x[0]][x[3]] else: return tree[x[0]][x[3]][x[2]]" "def main(x): tree = {'MAKO': 9, 'J': {1996: {'HAML': 8, 'JAVA': {'GDB': 6, 'LFE': 7}, 'ROUGE': {'GDB': 4, 'LFE': 5}}, 1988: {2012: 3, 1978: {'ROUGE': 0, 'JAVA': 1, 'HAML': 2}}}} if x[1] == 'MAKO': return tree[x[1]] elif x[4] == 1988 and x[0] == 1978: return tree[x[1]][x[4]][x[0]][x[2]] elif x[4] == 1988 and x[0] == 2012: return tree[x[1]][x[4]][x[0]] elif x[4] == 1996 and x[2] == 'HAML': return tree[x[1]][x[4]][x[2]] else: return tree[x[1]][x[4]][x[2]][x[3]]" "def x41(x): if x[4] == 'YAML': return 0 elif x[4] == 'METAL': return 1 else: return 2 def x42(x): if x[4] == 'YAML': return 3 elif x[4] == 'METAL': return 4 else: return 5 def x43(x): if x[4] == 'YAML': return 9 elif x[4] == 'METAL': return 10 else: return 11 def x21(x): if x[2] == 'MTML': return 6 else: return 7 def x22(x): if x[2] == 'MTML': return 8 else: return x43(x) def x0(x): if x[0] == 'PERL': return x41(x) elif x[0] == 'LSL': return x42(x) else: return x21(x) def x3(x): if x[3] == 'PUG': return x0(x) else: return x22(x) def x1(x): if x[1] == 'PLSQL': return x3(x) else: return 12 def main(x): return x1(x)" "def main(x): a = [4, {1975: [1, {'APL': [2, {'XBASE': [0, {1959: 0, 2016: 1, 1957: 2}], 'LEAN': [0, {1959: 3, 2016: 4, 1957: 5}]}], 'IOKE': [0, {1959: 6, 2016: 7, 1957: 8}]}], 1986: 9}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(res): f = {3: {'JSX': {4: {'PUG': {1: {'ALLOY': 0, 'QMAKE': 1, 'HCL': {2: {'STATA': 2, 'ALLOY': 3}}}}, 'OOC': 4, 'MESON': 5}}, 'MUF': {4: {'PUG': {1: {'ALLOY': {2: {'STATA': 6, 'ALLOY': 7}}, 'QMAKE': 8, 'HCL': {0: {'CMAKE': 9, 'SAGE': 10}}}}, 'OOC': 11, 'MESON': 12}}, 'IDL': 13}} while isinstance(f, dict): index = int(*f) f = f[index] key = res[index] f = f[key] return f" "def main(x): dict4 = {'WISP': lambda : 0, 'OX': lambda : 1, 'X10': lambda : 2} dict2 = {1992: lambda : dict4[x[3]](), 1989: lambda : 3, 2007: lambda : 4} dict5 = {'XML': lambda : 5, 'MAX': lambda : 6, 'SWIFT': lambda : 7} dict6 = {'XML': lambda : 8, 'MAX': lambda : 9, 'SWIFT': lambda : 10} dict3 = {'WISP': lambda : dict5[x[0]](), 'OX': lambda : dict6[x[0]](), 'X10': lambda : 11} dict1 = {'SMALI': lambda : dict2[x[2]](), 'AMPL': lambda : dict3[x[3]]()} return dict1[x[1]]()" "def main(x): dict3 = {'PIC': lambda : 0, 'TOML': lambda : 1, 'BLADE': lambda : 2} dict0 = {'M4': lambda : 3, 'KRL': lambda : 4} dict1 = {1966: lambda : dict3[x[3]](), 1996: lambda : dict0[x[0]]()} dict4 = {1966: lambda : dict1[x[1]](), 2000: lambda : 5, 2011: lambda : 6} dict7 = {1966: lambda : 8, 2000: lambda : 9, 2011: lambda : 10} dict6 = {1966: lambda : dict7[x[4]](), 1996: lambda : 11} dict5 = {'PIC': lambda : dict6[x[1]](), 'TOML': lambda : 12, 'BLADE': lambda : 13} dict2 = {'NIM': lambda : dict4[x[4]](), 'QML': lambda : dict5[x[3]](), 'EJS': lambda : 7} return dict2[x[2]]()" "def main(x): dict7 = {'YANG': lambda : 6, 'MASK': lambda : 7} dict4 = {1981: lambda : dict7[x[4]](), 1991: lambda : 8} dict5 = {'YANG': lambda : 0, 'MASK': lambda : 1} dict6 = {'YANG': lambda : 3, 'MASK': lambda : 4} dict3 = {2010: lambda : dict5[x[4]](), 1967: lambda : 2, 1970: lambda : dict6[x[4]]()} dict2 = {1979: lambda : dict3[x[1]](), 1986: lambda : 5, 1974: lambda : dict4[x[2]]()} dict1 = {1961: lambda : dict2[x[3]](), 1963: lambda : 9, 1985: lambda : 10} return dict1[x[0]]()" "def main(x): if x[2] == 1989: if x[4] == 'GO': if x[0] == 'OCAML': return {'FORTH': 0, 'LASSO': 1}[x[1]] else: return {'SQL': 2, 'QMAKE': 3}[x[0]] else: return 4 elif x[2] == 2018: if x[0] == 'OCAML': if x[1] == 'LASSO': return {'GO': 6, 'RAGEL': 7}[x[4]] else: return 5 else: return {'SQL': 8, 'QMAKE': 9}[x[0]]" "s = {2017: {2005: {'CLEAN': 0, 'LSL': 1}, 2014: {'OX': 2, 'BLADE': 3, 'PAN': 4}, 2018: {'CLEAN': 5, 'LSL': {'OX': 6, 'BLADE': 7, 'PAN': 8}}}, 1995: {'CLEAN': {'OX': 9, 'BLADE': 10, 'PAN': 11}, 'LSL': 12}, 2002: 13} def main(path): s1 = s[path[2]] if path[2] == 2017: s2 = s1[path[0]] if path[0] == 2005: s3 = s2[path[1]] return s3 elif path[0] == 2014: s3 = s2[path[3]] return s3 else: s3 = s2[path[1]] if isinstance(s3, int): return s3 return s3[path[3]] elif path[2] == 1995: s2 = s1[path[1]] if isinstance(s2, int): return s2 return s2[path[3]] else: return 13" "def main(x): match x[2]: case 1979: match x[1]: case 1988: match x[3]: case 'GN': match x[4]: case 1997: return 0 case 2011: return 1 case 1975: return 2 case 'BLADE': match x[4]: case 1997: return 3 case 2011: return 4 case 1975: return 5 case 'COQ': return 6 case 1990: match x[0]: case 2001: match x[4]: case 1997: return 7 case 2011: return 8 case 1975: return 9 case 1982: return 10 case 1993: return 11 case 1971: return 12" "def main(path): match path[2]: case 1975: return 14 case 1974: return 13 case 1980: match path[4]: case 1999: return 12 case 1985: match path[1]: case 2001: match path[0]: case 1963: return 6 case 2004: return 7 case 2013: return 8 case 1963: match path[0]: case 1963: return 9 case 2004: return 10 case 2013: return 11 case 1980: match path[1]: case 2001: match path[0]: case 1963: return 0 case 2004: return 1 case 2013: return 2 case 1963: match path[3]: case 'XML': return 3 case 'SELF': return 4 case 'TEX': return 5" "def main(path): match path[0]: case 'EDN': return 10 case 'OX': match path[3]: case 'TEXT': match path[1]: case 2004: return 9 case 1980: match path[2]: case 1990: return 6 case 1982: return 7 case 1959: return 8 case 'LLVM': match path[1]: case 2004: match path[2]: case 1990: return 3 case 1982: return 4 case 1959: return 5 case 1980: match path[2]: case 1990: return 0 case 1982: return 1 case 1959: return 2" "def main(x): if x[2] == 'JFLEX': if x[3] == 'SQLPL': if x[4] == 1987: return {'COOL': 0, 'KRL': 1}[x[1]] elif x[4] == 1983: return {'COOL': 2, 'KRL': 3}[x[1]] elif x[4] == 2008: return {'COOL': 4, 'KRL': 5}[x[1]] elif x[3] == 'CLEAN': if x[1] == 'KRL': return {'EJS': 7, 'DM': 8, 'KIT': 9}[x[0]] else: return 6 else: return 10" "def main(x): match x[1]: case 1959: match x[0]: case 1986: match x[2]: case 'OX': return 0 case 'APL': return 1 case 'QML': return 2 case 1967: return 3 case 2008: match x[0]: case 1986: return 4 case 1967: match x[3]: case 'RAGEL': return 5 case 'XTEND': return 6 case 'RUST': return 7 case 2009: match x[0]: case 1986: match x[3]: case 'RAGEL': return 8 case 'XTEND': return 9 case 'RUST': return 10 case 1967: return 11" "from statistics import variance variant1 = {2016: 1, 2006: 2, 1961: 3} variant2 = {1981: 5, 1994: 6, 2014: 7} variant3 = {1981: 8, 1994: 9, 2014: 10} def main(x): if x[4] == 'ORG': if x[0] == 1983: return first(x) elif x[0] == 1993: return second(x) elif x[0] == 1988: return 11 elif x[4] == 'RAGEL': return 12 def first(x): if x[2] == 1970: return 0 elif x[2] == 2019: return variant1.get(x[3]) def second(x): if x[3] == 2016: return 4 elif x[3] == 2006: return variant2.get(x[1]) elif x[3] == 1961: return variant3.get(x[1])" "def x1(cond, c2, x): if cond == 'HLSL': return 0 elif cond == 'LEAN': return 1 if c2 == 1993: return 2 elif c2 == 1962: return 3 return 4 def main(x): if x[1] == 1981: if x[0] == 'LIMBO': return x1(x[3], x[2], 0) elif x[0] == 'NESC': return 5 if x[3] == 'HLSL': return 6 elif x[3] == 'LEAN': return 7 if x[2] == 1993: return 8 elif x[2] == 1962: return 9 return 10 elif x[1] == 2000: return 11 return 12" "def main(args): dict2 = {'NIX': 0, 'CIRRU': 1} dict22 = {'NIX': 2, 'CIRRU': 3} dict4 = {1980: 8, 1961: 9, 1993: 10} dict0 = {'FORTH': dict2[args[2]], 'SMT': dict22[args[2]]} dict2_up = {'NIX': dict4[args[4]], 'CIRRU': 11} dict44 = {1980: dict0[args[0]], 1961: 4, 1993: 5} dict3 = {1999: 6, 1962: 7, 2011: dict2_up[args[2]]} dict1 = {1965: dict44[args[4]], 1966: dict3[args[3]], 1995: 12} return dict1[args[1]]" "def main(args): dict0 = {1972: 0, 2018: 1, 1995: 2} dict00 = {1972: 3, 2018: 4, 1995: 5} dict4 = {1980: 7, 1978: 8} dict3 = {1958: dict0[args[0]], 1977: dict00[args[0]]} dict0_up = {1972: 6, 2018: dict4[args[4]], 1995: 9} dict1 = {'DIFF': dict3[args[3]], 'KRL': dict0_up[args[0]]} dict2 = {1962: dict1[args[1]], 1958: 10} return dict2[args[2]]" "def main(args): dict1 = {'ECL': 0, 'E': 1, 'VCL': 2} dict3 = {'MQL5': 3, 'BOO': 4, 'NIT': 5} dict33 = {'MQL5': 6, 'BOO': 7, 'NIT': 8} dict333 = {'MQL5': 9, 'BOO': 10, 'NIT': 11} dict0 = {2004: dict1[args[1]], 1998: dict3[args[3]]} dict1_up = {'ECL': dict33[args[3]], 'E': dict333[args[3]], 'VCL': 12} dict2 = {'JAVA': dict0[args[0]], 'CLIPS': dict1_up[args[1]]} return dict2[args[2]]" "class Node: children = {} def __init__(self, ans=0, is_leaf=False, idx=-1): self.idx = idx self.is_leaf = is_leaf self.ans = ans self.children = {} NODE_0 = Node(0, True) NODE_1 = Node(1, True) NODE_2 = Node(2, True) NODE_3 = Node(3, True) NODE_4 = Node(4, True) NODE_5 = Node(5, True) NODE_6 = Node(6, True) NODE_7 = Node(7, True) NODE_8 = Node(8, True) NODE_9 = Node(9, True) node_10 = Node(-1, False, 0) node_10.children['GOSU'] = NODE_0 node_10.children['URWEB'] = NODE_1 node_11 = Node(-1, False, 1) node_11.children['TEX'] = node_10 node_11.children['DART'] = NODE_2 node_12 = Node(-1, False, 0) node_12.children['GOSU'] = NODE_4 node_12.children['URWEB'] = NODE_5 node_13 = Node(-1, False, 4) node_13.children[2008] = NODE_3 node_13.children[2007] = node_12 node_14 = Node(-1, False, 1) node_14.children['TEX'] = NODE_7 node_14.children['DART'] = NODE_8 node_15 = Node(-1, False, 0) node_15.children['GOSU'] = NODE_6 node_15.children['URWEB'] = node_14 node_16 = Node(-1, False, 2) node_16.children['ASN.1'] = node_13 node_16.children['LOGOS'] = node_15 node_16.children['LEX'] = NODE_9 node_17 = Node(-1, False, 3) node_17.children[1984] = node_11 node_17.children[1967] = node_16 def main(arr): cur = node_17 while not cur.is_leaf: cur = cur.children[arr[cur.idx]] return cur.ans" "items = {'PONY': {1997: {'SCALA': 0, 'APEX': {'SAGE': 1, 'XS': 2}}, 1958: {'SCALA': {'SAGE': 3, 'XS': 4}, 'APEX': {'SAGE': 5, 'XS': 6}}, 1969: {'SCALA': {'SAGE': 7, 'XS': 8}, 'APEX': {'SAGE': 9, 'XS': 10}}}, 'GO': 11, 'KIT': 12} def main(x: list): i = items[x[2]] if i == 11 or i == 12: return i if x[0] == 1997 and x[3] == 'SCALA': return 0 j = i[x[0]] return j[x[3]][x[4]]" "def main(res): F = {3: {2017: {0: {'POD': 5, 'FREGE': {1: {'XOJO': {4: {'COOL': 6, 'RUBY': 7}}, 'STATA': 8}}, 'GO': {1: {'STATA': 11, 'XOJO': {2: {2013: 10, 1994: 9}}}}}}, 1980: {4: {'RUBY': 4, 'COOL': {1: {'XOJO': {0: {'GO': 2, 'FREGE': 1, 'POD': 0}}, 'STATA': 3}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(x): if x[1] == 'XBASE': if x[0] == 'ABAP': return 9 elif x[3] == 1959: return 6 elif x[3] == 1974: return 7 else: return 8 elif x[0] == 'ABAP': if x[2] == 1998: return 3 elif x[2] == 2008: return 4 else: return 5 elif x[3] == 1959: return 0 elif x[3] == 1974: return 1 else: return 2" "def main(args): dict2 = {'TEA': 1, 'LASSO': 2} dict3 = {'LLVM': 6, 'REXX': 7} dict22 = {'TEA': 8, 'LASSO': 9} dict4 = {'GLSL': 0, 'KIT': dict2[args[2]], 'TCSH': 3} dict1 = {'POD': 5, 'KIT': dict3[args[3]], 'SMT': dict22[args[2]]} dict3_up = {'LLVM': dict4[args[4]], 'REXX': 4} dict4_up = {'GLSL': dict1[args[1]], 'KIT': 10, 'TCSH': 11} dict0 = {'MAKO': dict3_up[args[3]], 'TEA': dict4_up[args[4]], 'SLIM': 12} return dict0[args[0]]" "def RIGHTsecondright(x): if x[0] == 'OCAML': return 7 else: return 8 def LEFTsecondleft(x): if x[2] == 'D': return 0 if x[2] == 'PUG': return 1 else: return 2 def LEFTfirst(x): if x[1] == 'TERRA': return LEFTsecondleft(x) elif x[1] == 'TEX': return 3 else: return 4 def RIGHTfirst(x): if x[1] == 'TERRA': return 5 elif x[1] == 'TEX': return 6 else: return RIGHTsecondright(x) def f(x): if x[3] == 1975: return LEFTfirst(x) elif x[3] == 1981: return RIGHTfirst(x) else: return 9 def main(x): return f(x)" "def main(x): match x[1]: case 1988: return 11 case 1997: match x[0]: case 1968: return 8 case 1957: return 9 case 1973: return 10 case 1984: match x[2]: case 'STON': match x[4]: case 'SCALA': return 4 case 'DM': match x[0]: case 1968: return 5 case 1957: return 6 case 1973: return 7 case 'OPAL': match x[3]: case 'LESS': return 0 case 'XBASE': match x[0]: case 1968: return 1 case 1957: return 2 case 1973: return 3" "def main(x): match x[3]: case 'NIT': match x[1]: case 'M4': match x[0]: case 1970: return 0 case 2012: return 1 case 1964: return 2 case 'LFE': match x[0]: case 1970: return 3 case 2012: return 4 case 1964: return 5 case 'KIT': match x[0]: case 1970: return 6 case 2012: return 7 case 1964: return 8 case 'SMT': match x[0]: case 1970: return 9 case 2012: return 10 case 1964: return 11" "def main(x): match x[1]: case 1980: match x[3]: case 'XS': match x[2]: case 'PHP': match x[4]: case 'JULIA': return 0 case 'RAML': return 1 case 'SLASH': return 2 case 'MASK': match x[0]: case 1961: return 3 case 1980: return 4 case 'AMPL': match x[2]: case 'PHP': match x[0]: case 1961: return 5 case 1980: return 6 case 'SLASH': return 7 case 'MASK': match x[0]: case 1961: return 8 case 1980: return 9 case 'GOSU': return 10 case 1976: return 11 case 1998: return 12" "def a1(x): if x[3] == 2001: return 1 if x[3] == 2009: return 2 if x[3] == 1980: return 3 def a2(x): if x[0] == 1967: return 6 if x[0] == 2009: return 7 if x[0] == 1960: return 8 def a3(x): if x[4] == 'RAGEL': return 0 if x[4] == 'MAX': return a1(x) if x[4] == 'MIRAH': return 4 def a4(x): if x[4] == 'RAGEL': return 5 if x[4] == 'MAX': return a2(x) if x[4] == 'MIRAH': return 9 def a5(x): if x[2] == 'VHDL': return a3(x) if x[2] == 'OPA': return a4(x) def main(x): if x[1] == 'PIKE': if x[2] == 'VHDL': return a3(x) if x[2] == 'OPA': return a4(x) if x[1] == 'D': return 10 if x[1] == 'LATTE': return 11" "def a1(x): if x[4] == 'SAGE': return 0 if x[4] == 'GOSU': return 1 def a2(x): if x[2] == 'KIT': return a1(x) if x[2] == 'REBOL': return 2 def a3(x): if x[1] == 'E': return a2(x) if x[1] == 'RAML': return 3 if x[1] == 'XBASE': return 4 def a4(x): if x[1] == 'E': return 6 if x[1] == 'RAML': return 7 if x[1] == 'XBASE': return 8 def a5(x): if x[4] == 'SAGE': return 5 if x[4] == 'GOSU': return a4(x) def a6(x): if x[2] == 'KIT': return a5(x) if x[2] == 'REBOL': return 9 def main(x): if x[3] == 'ABNF': if x[1] == 'E': return a2(x) if x[1] == 'RAML': return 3 if x[1] == 'XBASE': return 4 if x[3] == 'MAX': if x[2] == 'KIT': return a5(x) if x[2] == 'REBOL': return 9 if x[3] == 'CLIPS': return 10" "def main(x): match x[2]: case 1957: match x[0]: case 'GOSU': match x[3]: case 1976: return 0 case 1992: return 1 case 'HAXE': match x[1]: case 1991: return 2 case 2005: return 3 case 'KICAD': match x[3]: case 1976: return 4 case 1992: return 5 case 1961: match x[0]: case 'GOSU': match x[3]: case 1976: return 6 case 1992: return 7 case 'HAXE': return 8 case 'KICAD': match x[3]: case 1976: return 9 case 1992: return 10" "def main(args): dict1 = {1985: 1, 1972: 2, 1957: 3} dict4 = {1961: 8, 1993: 9} dict4_up = {1961: 0, 1993: dict1[args[1]]} dict1_up = {1985: dict4[args[4]], 1972: 10, 1957: 11} dict2 = {'TEX': dict4_up[args[4]], 'D': 4, 'YANG': 5} dict4_dup = {1961: 6, 1993: 7} dict22 = {'TEX': dict1_up[args[1]], 'D': 12, 'YANG': 13} dict3 = {1961: dict2[args[2]], 1968: dict4_dup[args[4]], 2004: dict22[args[2]]} return dict3[args[3]]" "def main(x): array = [[2003, 'JFLEX', x[2], 1965, 1961], [2003, 'JFLEX', x[2], 1965, 1969], [2003, 'JFLEX', x[2], 1965, 2010], [2003, 'NCL', x[2], 1965, 1961], [2003, 'NCL', x[2], 1965, 1969], [2003, 'NCL', x[2], 1965, 2010], [2003, 'CLICK', x[2], 1965, x[4]], [1957, x[1], x[2], 1965, 1961], [1957, x[1], x[2], 1965, 1969], [1957, x[1], x[2], 1965, 2010], [x[0], x[1], x[2], 1964, x[4]]] if x in array: return array.index(x)" "def main(x): if x[3] == 2004: return x4(x) elif x[3] == 1994: return 12 def x4(x): if x[4] == 1968: return x1(x) elif x[4] == 1992: return 5 elif x[4] == 1969: return x0_up(x) def x1(x): if x[1] == 2000: return 0 elif x[1] == 1977: return x0_down(x) elif x[1] == 1980: return 4 def x0_down(x): if x[0] == 1980: return 1 elif x[0] == 1960: return 2 elif x[0] == 1987: return 3 def x0_up(x): if x[0] == 1980: return x2(x) elif x[0] == 1960: return x1_down(x) elif x[0] == 1987: return 11 def x2(x): if x[2] == 1976: return 6 elif x[2] == 2007: return 7 def x1_down(x): if x[1] == 2000: return 8 elif x[1] == 1977: return 9 elif x[1] == 1980: return 10" "def main(res): F = {0: {2015: {1: {1991: 4, 2010: {2: {'HYPHY': 2, 'DYLAN': 3}}, 1978: {2: {'DYLAN': 1, 'HYPHY': 0}}}}, 1970: {2: {'HYPHY': {3: {'DYLAN': 5, 'SQLPL': 6, 'GDB': 7}}, 'DYLAN': {1: {1978: 8, 2010: 9, 1991: 10}}}}}} while isinstance(F, dict): Ind = int(*F) F = F[Ind] Key = res[Ind] F = F[Key] return F" "def main(x): match x[3]: case 'GOLO': match x[2]: case 2008: match x[0]: case 'CRL': return 9 case 'DART': return 10 case 1995: return 11 case 'YANG': match x[2]: case 1995: match x[0]: case 'KRL': return 7 case 'DART': return 8 case 2008: return 6 case 'SLIM': match x[2]: case 1995: match x[1]: case 'NCL': return 5 case 'EBNF': return 4 case 'MINID': return 3 case 2008: match x[1]: case 'NCL': return 2 case 'EBNF': return 1 case 'MINID': return 0" "def main(x): d1 = {1979: 0, 2018: 1, 2020: 2} d2 = {'QML': 5, 'KRL': 6, 'COOL': 7} d3 = {'QML': 8, 'KRL': 9, 'COOL': 10} d4 = {'QML': d1, 'KRL': 3, 'COOL': 4} d5 = {'FREGE': d2, 'XSLT': d3} d6 = {'ABNF': d4, 'ASP': d5, 'LEX': 11} y = d6 while 1: cur = '' if y == d6: cur = d6.get(x[0]) elif y == d5: cur = d5.get(x[1]) elif y == d4: cur = d4.get(x[3]) elif y == d3: cur = d3.get(x[3]) elif y == d2: cur = d2.get(x[3]) elif y == d1: cur = d1.get(x[2]) else: return None if isinstance(cur, int): return cur else: y = cur" "def choicex0(cond, x): if cond == 'M': return x return x + 1 def choicex1(cond, x): if cond == 'KICAD': return x return x + 1 def choicex2(cond, x): if cond == 'ADA': return x elif cond == 'HAXE': return x + 1 return x + 2 def main(x): if x[4] == 1990: if x[0] == 'JULIA': if x[2] == 'ADA': return 0 elif x[2] == 'HAXE': return choicex1(x[1], 1) return 3 return choicex0(x[0], 4) elif x[4] == 1987: if x[1] == 'KICAD': if x[0] == 'JULIA': return choicex2(x[2], 6) return choicex0(x[0], 9) return 11 return 12" "def main(x): match x[0]: case 1961: return 12 case 1990: return 11 case 2020: match x[3]: case 'GOLO': return 10 case 'TXL': match x[1]: case 'PONY': return 6 case 'ANTLR': match x[4]: case 2008: return 9 case 2019: return 8 case 2006: return 7 case 'R': match x[2]: case 'ADA': return 5 case 'MUPAD': match x[1]: case 'PONY': return 3 case 'ANTLR': return 4 case 'SASS': match x[4]: case 2008: return 2 case 2019: return 1 case 2006: return 0" "def main(x): match x[3]: case 'NGINX': match x[0]: case 1997: match x[2]: case 1980: return 0 case 2008: return 1 case 2011: return 2 case 2011: match x[1]: case 2010: return 3 case 2019: return 4 case 1958: return 5 case 'XC': match x[2]: case 1980: return 6 case 2008: match x[1]: case 2010: return 7 case 2019: return 8 case 1958: return 9 case 2011: return 10" "import math def main(x): data = {1998: 12, 1970: {2009: 11, 1997: {1968: 10, 1964: 9, 2005: 8}, 1994: {1967: 7, 1996: 6, 1997: 5}}, 1985: {2009: 4, 1997: 3, 1994: {1967: 2, 1996: 1, 1997: 0}}} try: return data[x[3]][x[0]][x[1]] except TypeError: try: return data[x[3]][x[0]][x[2]] except TypeError: try: return data[x[3]][x[0]] except TypeError: return data[x[3]] except KeyError: try: return data[x[3]][x[0]][x[2]] except TypeError: try: return data[x[3]][x[0]] except TypeError: return data[x[3]]" "import math import random import copy tree = {'MQL5': {2006: {'RAGEL': 0, 'DYLAN': 1}, 1984: 2, 1968: {2000: 3, 1988: 4, 1997: 5}}, 'GLYPH': 10, 'NUMPY': {'RAGEL': {2006: 6, 1984: 7, 1968: 8}, 'DYLAN': 9}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "import math import random import copy tree = {1979: {1958: {1971: 0, 1999: 1, 1990: 2}, 1963: {1971: 3, 1999: 4, 1990: 5}, 2007: 6}, 1973: 7, 1984: {1968: {1971: 8, 1999: 9, 1990: 10}, 2019: 11}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "import math import random import copy tree = {1971: {'OCAML': {'LEAN': {1973: 0, 1972: 1, 1958: 2}, 'HTTP': {1973: 3, 1972: 4, 1958: 5}, 'SHEN': 6}, 'TCSH': 7}, 1978: 8, 1983: {1973: 9, 1972: 10, 1958: 11}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "def css(x): if x[4] == 'SCSS': if x[3] == 'PIC': return 0 elif x[3] == 'ANTLR': return 1 else: return 2 elif x[0] == 1968: return 3 elif x[0] == 2016: return 4 else: return 5 def main(x): if x[1] == 'METAL': return 11 elif x[2] == 'REBOL': return css(x) elif x[2] == 'GAMS': return 6 elif x[3] == 'PIC': if x[4] == 'SCSS': return 7 else: return 8 elif x[3] == 'ANTLR': return 9 else: return 10" "def main(arr): if arr[3] == 2018: return func2018(arr) if arr[3] == 1969: return 7 if arr[3] == 2012: return func2012(arr) def func2018(arr): if arr[0] == 'PAWN': return pawn1(arr) if arr[0] == 'MINID': return minid1(arr) if arr[0] == 'LIMBO': return 6 def pawn1(arr): if arr[2] == 1966: return 0 if arr[2] == 2008: return 1 if arr[2] == 1968: return 2 def minid1(arr): if arr[2] == 1966: return 3 if arr[2] == 2008: return 4 if arr[2] == 1968: return 5 def func2012(arr): if arr[0] == 'PAWN': return 8 if arr[0] == 'MINID': return minid2(arr) if arr[0] == 'LIMBO': return 12 def minid2(arr): if arr[2] == 1966: return 9 if arr[2] == 2008: return 10 if arr[2] == 1968: return 11" "def main(x): ans = {'URWEB': {1997: {1994: {1974: 0, 1981: 1}, 1998: {1974: 2, 1981: 3}, 2006: {1974: 4, 1981: 5}}, 2020: 6}, 'SHEN': {1974: {1997: 7, 2020: 8}, 1981: {1998: 9, 1991: 10, 1958: 11}}} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] x[j] = None break return i" "def x_0(data_arr): if data_arr[0] == 'ASN.1': return x_2(data_arr) elif data_arr[0] == 'NU': return x_3(data_arr) else: return 13 def x_1(data_arr): if data_arr[0] == 'ASN.1': if data_arr[1] == 1964: return 1 elif data_arr[1] == 2012: return 2 else: return 3 elif data_arr[1] == 1964: return 7 elif data_arr[1] == 2012: return x_4(data_arr) else: return 11 def x_2(data_arr): if data_arr[2] == 2004: return x_4(data_arr) else: return 5 def x_3(data_arr): if data_arr[3] == 'GOSU': return 6 elif data_arr[3] == 'ZIMPL': return x_1(data_arr) else: return 12 def x_4(data_arr): if data_arr[0] == 'ASN.1': if data_arr[4] == 'STAN': return 0 elif data_arr[4] == 'METAL': return x_1(data_arr) else: return 4 elif data_arr[4] == 'STAN': return 8 elif data_arr[4] == 'METAL': return 9 else: return 10 def main(data_arr): return x_0(data_arr)" "def first(x): if x[1] == 'PONY': if x[2] == 2000: return 0 elif x[2] == 1959: return 1 elif x[2] == 1993: return 2 elif x[1] == 'TLA': if x[0] == 1994: return 3 elif x[0] == 1977: return 4 elif x[1] == 'OX': return 5 def second(x): if x[2] == 2000: if x[1] == 'PONY': return 6 elif x[1] == 'TLA': return 7 elif x[1] == 'OX': return 8 elif x[2] == 1959: if x[0] == 1994: return 9 elif x[0] == 1977: return 10 elif x[2] == 1993: return 11 def main(x): if x[3] == 'LSL': return first(x) elif x[3] == 'CUDA': return second(x)" "def first(x): if x[0] == 'DM': if x[3] == 1959: return 0 elif x[3] == 1969: return 1 elif x[0] == 'SLASH': if x[3] == 1959: return 2 elif x[3] == 1969: return 3 def second(x): if x[3] == 1959: return 6 elif x[3] == 1969: if x[4] == 'TCSH': return 7 elif x[4] == 'SMALI': return 8 def main(x): if x[2] == 'GAMS' and x[1] == 1986: return first(x) elif x[2] == 'GAMS' and x[1] == 2003: return 4 elif x[2] == 'P4' and x[1] == 1986: return 5 elif x[2] == 'P4' and x[1] == 2003: return second(x) else: return 9" "x = {'SCSS': {1966: {'ATS': {'STATA': 0, 'PONY': 1}, 'PERL': 2}, 1958: 3, 1976: 4}, 'J': {'ATS': {2004: {1966: 5, 1958: 6, 1976: 7}, 2018: {1966: 8, 1958: 9, 1976: 10}, 1986: 11}, 'PERL': 12}} def main(p): x3 = x[p[3]] if p[3] == 'SCSS': d = 1 x1 = x3[p[1]] if p[1] == 1966: x1 = x1[p[0]] if p[0] == 'ATS': x1 = x1[p[2]] else: d = 0 x1 = x3[p[0]] if p[0] == 'ATS': x1 = x1[p[4]] if p[4] == 2004 or p[4] == 2018: x1 = x1[p[1]] if d == 1: return x1 else: return x1 main(['PERL', 1966, 'PONY', 'J', 2004])" "from math import factorial from random import shuffle from copy import copy tree = {1962: {2016: {'JFLEX': 0, 'NIT': 1, 'JSON': {1975: 2, 2015: 3}}, 1969: {2001: {1975: 4, 2015: 5}, 1965: {1975: 6, 2015: 7}}}, 2001: {1975: 8, 2015: 9}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = factorial(len(path)) true_path = [] while len(true_path) != z: true_tr = [path[4]] tr = copy(path) tr.pop(4) shuffle(tr) true_tr.extend(tr) if tr not in true_path: true_path.append(true_tr) for i in range(0, z, 1): number = run(tree, true_path[i], 0) if number is not None: return number" "def main(x): x0 = {'1997': 7, '1984': 8, '1977': 9} x3_1 = {'NIX': 4, 'LOGOS': 3} x3_2 = {'NIX': 6, 'LOGOS': 5} x1 = {'1999': x3_1[str(x[3])], '1992': x3_2[x[3]], '2018': x0[str(x[0])]} x2 = {'1957': x1[str(x[1])], '1989': 10} x2_1 = {'1957': 0, '1989': 1} x3 = {'LOGOS': x2_1[str(x[2])], 'NIX': 2} x4 = {'1986': x3[x[3]], '2009': x2[str(x[2])]} return x4[str(x[4])]" "def fourth_layer_x4(x4): if x4 == 'EAGLE': return 0 elif x4 == 'TXL': return 1 elif x4 == 'MQL5': return 2 def fourth_layer_x4v2(x4): if x4 == 'EAGLE': return 3 elif x4 == 'TXL': return 4 elif x4 == 'MQL5': return 5 def third_layer_x1(x1, x4): if x1 == 'ALLOY': return fourth_layer_x4(x4) elif x1 == 'KIT': return fourth_layer_x4v2(x4) def second_layer_x1(x1): if x1 == 'ALLOY': return 7 elif x1 == 'KIT': return 8 def second_layer_x3(x1, x3, x4): if x3 == 'WISP': return third_layer_x1(x1, x4) elif x3 == 'XPROC': return 6 def main(x): if x[0] == 'GLYPH': return second_layer_x3(x[1], x[3], x[4]) elif x[0] == 'ATS': return second_layer_x1(x[1]) else: return 9" "def main(x): if x[1] == 2016: if x[2] == 1990: if x[0] == 'ROUGE': return 0 elif x[0] == 'SWIFT': return 1 return 2 else: if x[0] == 'ROUGE': return 3 elif x[0] == 'SWIFT': return 4 return 5 else: if x[2] == 1976: if x[0] == 'ROUGE': return 7 elif x[0] == 'SWIFT': return 8 return 9 return 6" "from typing import List tree = {'2017': {'TEXT': {'POD': 0, 'MQL4': {'2003': 1, '2000': 2, '1973': 3}, 'SCALA': 4}, 'SQL': {'2003': 5, '2000': 6, '1973': {'POD': 7, 'MQL4': 8, 'SCALA': 9}}, 'OZ': 10}, '1970': 11} def main(arr: List) -> int: global tree step = tree while True: for item in arr[::-1]: key = str(item) if key in step.keys(): step = step[key] if isinstance(step, int): return step" "class Node: def __init__(self, branch='', value=-1, position=-1): self.branch = branch self.value = value self.position = position self.nodes = [] def add_node(self, branch='', value=-1, position=-1): self.nodes.append(Node(branch, value, position)) def build_tree(root): root.position = 0 root.add_node(branch=2005, position=3) root.nodes[0].add_node(branch='EQ', position=1) root.nodes[0].nodes[0].add_node(branch=1975, value=0) root.nodes[0].nodes[0].add_node(branch=1964, value=1) root.nodes[0].nodes[0].add_node(branch=1963, position=4) root.nodes[0].nodes[0].nodes[0].add_node(branch=1972, value=0) root.nodes[0].nodes[0].nodes[0].add_node(branch=2011, value=1) root.nodes[0].nodes[0].nodes[0].add_node(branch=2002, value=1) root.nodes[0].add_node(branch='RHTML', position=1) root.nodes[0].nodes[1].add_node(branch=1975, value=5) root.nodes[0].nodes[1].add_node(branch=1964, value=6) root.nodes[0].nodes[1].add_node(branch=1963, value=7) root.nodes[0].add_node(branch='LEX', value=8) root.add_node(branch=1965, position=3) root.nodes[1].add_node(branch='EQ', position=1) root.nodes[1].nodes[0].add_node(branch=1975, value=9) root.nodes[1].nodes[0].add_node(branch=1964, value=10) root.nodes[1].nodes[0].add_node(branch=1963, position=11) root.nodes[1].add_node(branch='RHTML', value=12) root.nodes[1].add_node(branch='LEX', value=13) root.add_node(branch=1982, value=14) def start_tree(node, x): if node.position != -1: for next_node in node.nodes: if next_node.branch == x[node.position]: return start_tree(next_node, x) else: return node.value def main(x): root = Node() build_tree(root) return start_tree(root, x)" "def main(x): if x[0] == 1975: return level21(x) elif x[0] == 2011: return level22(x) elif x[0] == 1994: return 9 def level21(x): if x[1] == 1974: return level3(x, 0) elif x[1] == 2005: return 2 def level22(x): if x[3] == 2010: return level3(x, 3) elif x[3] == 1968: return level3(x, 5) elif x[3] == 1967: return level3(x, 7) def level3(x, res): if x[2] == 'GLYPH': return res elif x[2] == 'OOC': return res + 1" "import math import random import copy tree = {'TEA': {'XBASE': {1973: 0, 2018: 1, 1964: {'YACC': 2, 'M4': 3, 'LATTE': 4}}, 'APEX': {1973: {2008: 5, 1994: 6, 1990: 7}, 2018: {'YACC': 8, 'M4': 9, 'LATTE': 10}, 1964: 11}, 'AGDA': 12}, 'ROUGE': 13} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "def main(x): x1b = {'GLSL': 1, 'ZIMPL': 2, 'LSL': 3} x0b = {'YANG': 0, 'AMPL': x1b[x[1]], 'APEX': 4} x2 = {'GLSL': x0b[x[0]], 'XC': 5} x1a = {'GLSL': 7, 'ZIMPL': 8, 'LSL': 9} x0a = {'YANG': 6, 'AMPL': x1a[x[1]], 'APEX': 10} x3 = {'INI': x0a[x[0]], 'COQ': 11} x4 = {'GDB': x2[x[2]], 'CSV': x3[x[3]]} return x4[x[4]]" "def main(x): if x[2] == 'AWK': if x[1] == 'GRACE': if x[4] == 1991: return [2009, 1996].index(x[3]) elif x[4] == 1999: return ['TEA', 'SLIM'].index(x[0]) + 2 else: return 4 else: return [2009, 1996].index(x[3]) + 5 elif x[2] == 'SQL': if x[4] == 1991: return 7 elif x[4] == 1990: return 11 elif x[1] == 'ALLOY': return [2009, 1996].index(x[3]) + 9 else: return 8 else: return 12" "def main(args): dict4 = {'FREGE': 4, 'RUST': 5} dict44 = {'FREGE': 6, 'RUST': 7} dict3 = {1959: 9, 2019: 10} dict4_up = {'FREGE': 0, 'RUST': 1} dict44_up = {'FREGE': 2, 'RUST': 3} dict0 = {'STON': dict4[args[4]], 'SCAML': dict44[args[4]], 'GLYPH': 8} dict00 = {'STON': dict3[args[3]], 'SCAML': 11, 'GLYPH': 12} dict2 = {1973: dict4_up[args[4]], 1971: dict44_up[args[4]], 2012: dict0[args[0]]} dict22 = {1973: dict00[args[0]], 1971: 13, 2012: 14} dict1 = {'LSL': dict2[args[2]], 'GAP': dict22[args[2]], 'SLIM': 15} return dict1[args[1]]" "import math mass = ['3:1979-1:TXL-2:EQ-0:XTEND', '3:1979-1:TXL-2:EQ-0:NU', '3:1979-1:TXL-2:NCL-4:1958', '3:1979-1:TXL-2:NCL-4:1959', '3:1979-1:VALA-2:EQ-0:XTEND', '3:1979-1:VALA-2:EQ-0:NU', '3:1979-1:VALA-2:NCL-0:XTEND', '3:1979-1:VALA-2:NCL-0:NU', '3:1979-1:NU', '3:2002-4:1958-0:XTEND-1:TXL', '3:2002-4:1958-0:XTEND-1:VALA', '3:2002-4:1958-0:XTEND-1:NU', '3:2002-4:1958-0:NU', '3:2002-4:1959', '3:2003'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def main(x): match x[2]: case 2019: return 12 case 2000: match x[4]: case 1996: return 11 case 1981: return 10 case 2014: return 9 case 2008: match x[0]: case 'SCSS': return 8 case 'OOC': return 7 case 'PUG': match x[1]: case 'ATS': return 0 case 'NSIS': match x[3]: case 'LIMBO': return 1 case 'TXL': return 2 case 'KIT': return 3 case 'GLYPH': match x[3]: case 'LIMBO': return 4 case 'TXL': return 5 case 'KIT': return 6" "import math mass = ['0:1999-1:MUF-3:TCSH', '0:1999-1:MUF-3:STATA', '0:1999-1:EAGLE', '0:1999-1:OOC-3:TCSH', '0:1999-1:OOC-3:STATA', '0:1970', '0:2008-1:MUF-2:1986', '0:2008-1:MUF-2:2010', '0:2008-1:MUF-2:2003', '0:2008-1:EAGLE-3:TCSH', '0:2008-1:EAGLE-3:STATA', '0:2008-1:OOC'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def main(x): return three(x) def three(x): if x[3] == 'FANCY': return 13 else: return four(x) def four(x): if x[4] == 'RHTML': return 12 if x[4] == 'ZIMPL': return zero(x) else: return first2(x) def zero(x): if x[0] == 2002: return 11 if x[0] == 1976: return 10 elif x[0] == 1964: return first(x) def first(x): if x[1] == 'XBASE': return 9 if x[1] == 'CLICK': return 8 else: return 7 def first2(x): if x[1] == 'XBASE': second(x) if x[1] == 'CLICK': return 3 else: return zero2(x) def second(x): if x[2] == 1961: return 6 if x[2] == 2000: return 5 else: return 4 def zero2(x): if x[0] == 2002: return 2 if x[0] == 1976: return 1 else: return 0" "def func_four(data): match data[1]: case 2012: return 0 case 2005: return 1 def func_one(data: tuple): match data[3]: case 'XTEND': return func_four(data) case 'LEX': return 2 def func_five(data: tuple): match data[2]: case 1987: return 3 case 1970: return 4 case 2008: return 5 def func_six(data: tuple): match data[2]: case 1987: return 6 case 1970: return 7 case 2008: return 8 def func_two(data: tuple): match data[3]: case 'XTEND': return func_five(data) case 'LEX': return func_six(data) def func_seven(data: tuple): match data[2]: case 1987: return 9 case 1970: return 10 case 2008: return 11 def func_three(data: tuple): match data[1]: case 2012: return func_seven(data) case 2005: return 12 def main(data: tuple): match data[0]: case 2015: return func_one(data) case 2011: return func_two(data) case 1973: return func_three(data)" "def main(a): if a[4] == 1970 and a[0] == 2015: if a[2] == 'ADA': list1 = {1991: 1, 1972: 2} return list1[a[1]] else: list4 = {'GN': 0, 'VHDL': 3} return list4[a[2]] if a[4] == 1970 and a[0] == 1990: if a[1] == 1991: list2 = {'IO': 4, 'NINJA': 5, 'ORG': 6} return list2[a[3]] else: return 7 if a[4] == 1961: if a[2] == 'GN': if a[0] == 2015: list3 = {1991: 9, 1972: 10} return list3[a[1]] else: return 11 else: list5 = {'ADA': 12, 'VHDL': 13} return list5[a[2]] else: return 8" "def main(x): if x[2] == 2002: if x[3] == 'LIMBO': if x[1] == 'XS': return 0 else: return {'HAML': 1, 'SLIM': 2}[x[1]] elif x[1] == 'XS': return 3 else: return {'HAML': 4, 'SLIM': 5}[x[1]] if x[2] == 1958: if x[1] == 'XS': if x[3] == 'LIMBO': return 6 else: return 7 if x[1] == 'HAML': if x[0] == 'J': return 8 else: return {'GN': 9, 'SQLPL': 10}[x[0]] else: return 11 else: return 12" "def choicex1(status, pos): if status == 2015: return pos return pos + 1 def choicex4(status, pos): if status == 2002: return pos elif status == 1975: return pos + 1 return pos + 2 def main(x): if x[3] == 1990: if x[0] == 'LFE': if x[2] == 1978: return choicex1(x[1], 0) elif x[2] == 1971: return 2 return 3 elif x[0] == 'MESON': return 4 if x[1] == 2015: return choicex4(x[4], 5) return 8 if x[4] == 2002: if x[0] == 'LFE': return choicex1(x[1], 9) elif x[0] == 'MESON': return 11 return 12 return choicex4(x[4], 12)" "import math mass = ['3:2005-2:GOLO-1:NL', '3:2005-2:GOLO-1:KIT', '3:2005-2:GOLO-1:MESON', '3:2005-2:XML', '3:1974', '3:1980-4:1971-1:NL-0:1988', '3:1980-4:1971-1:NL-0:1977', '3:1980-4:1971-1:KIT-0:1988', '3:1980-4:1971-1:KIT-0:1977', '3:1980-4:1971-1:MESON-2:GOLO', '3:1980-4:1971-1:MESON-2:XML', '3:1980-4:1976', '3:1980-4:2007'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def main(x): match x[0]: case 2005: match x[2]: case 1980: return 3 case 2003: match x[3]: case 1968: return 0 case 1991: return 1 case 1997: return 2 case 1963: match x[1]: case 1967: return 4 case 2007: return 5 case 2010: return 6 case 1970: match x[3]: case 1968: match x[2]: case 2003: return 8 case 1980: return 9 case 1963: return 10 case 1991: return 11 case 1997: return 12 case 1959: return 7" "def main(x): if x[1] == 'MTML': a = {1963: {2005: 4, 2019: 5}, 1994: {'UNO': 6, 'VOLT': 7}, 1958: {'UNO': 8, 'VOLT': 9}} return a[x[3]][x[0] if x[3] == 1963 else x[2]] elif x[1] == 'LLVM': if x[3] == 1963: b = {2005: 0, 2019: 1} return b[x[0]] else: c = {1994: 2, 1958: 3} return c[x[3]] else: return 10" "def main(args): dict0 = {'OX': 0, 'M4': 1, 'PHP': 2} dict00 = {'OX': 3, 'M4': 4, 'PHP': 5} dict2 = {'MASK': 6, 'OCAML': 7, 'AGDA': 8} dict1 = {1985: 9, 1989: 10, 1960: 11} dict1_up = {1985: dict0[args[0]], 1989: dict00[args[0]], 1960: dict2[args[2]]} dict0_up = {'OX': dict1[args[1]], 'M4': 12, 'PHP': 13} dict3 = {1995: dict1_up[args[1]], 1988: dict0_up[args[0]]} return dict3[args[3]]" "def main(x): if x[4] == 1995: if x[3] == 'YACC': dict1 = {2013: 0, 1999: 1} return dict1[x[2]] elif x[3] == 'JAVA': if x[1] == 1978: dict2 = {'CLIPS': 3, 'BRO': 4} return dict2[x[0]] if x[1] == 1968: dict3 = {2013: 5, 1999: 6} return dict3[x[2]] else: return 2 elif x[4] == 2007: if x[3] == 'YACC': return 8 elif x[3] == 'EJS': dict4 = {1978: 9, 1968: 10} return dict4[x[1]] else: return 11 else: return 7" "def main(x): tree = {3: {1991: {0: {2014: {4: {'RUBY': {1: {'HTML': 0, 'SQLPL': 1}}, 'NIT': 2}}, 2003: 3, 1971: 4}}, 1972: {1: {'HTML': {2: {1971: 5, 1966: 6}}, 'SQLPL': 7}}, 1965: {0: {2014: 8, 2003: 9, 1971: 10}}}} while type(tree) != int: index = list(tree.keys())[0] tree = tree[index][x[index]] return tree" "def main(arr): w = 'w' tree = {'NIX': {2011: {2004: {'PLSQL': 0, 'EAGLE': 1, w: 2}, 2016: 2, w: 3}, 1987: {2004: 3, 2016: 4, w: 3}, 1962: {'PLSQL': 5, 'EAGLE': 6, w: 2}, w: 1}, 'TEA': {'PLSQL': {2011: 7, 1987: {1983: 8, 1961: 9, 2014: 10, w: 0}, 1962: 11, w: 1}, 'EAGLE': 12, w: 2}, w: 4} node = tree while type(node) is dict: weight = node[w] branch = arr[weight] if branch in node: node = node[branch] else: return None return node" "def main(x): x_0_b = {'ECL': 8, 'PERL': 9} x_1_b = {'LESS': 3, 'D': 4, 'SCAML': 5} x_1_c = {'LESS': 0, 'D': 1, 'SCAML': 2} x_1_a = {'LESS': 7, 'D': x_0_b[x[0]], 'SCAML': 10} x_0_a = {'ECL': x_1_c[x[1]], 'PERL': x_1_b[x[1]]} x_2 = {2014: x_0_a[x[0]], 2011: 6, 1976: x_1_a[x[1]]} return x_2[x[2]]" "def main(x): tree = {2005: {1994: 3, 2015: {'UNO': 0, 'LOGOS': 1, 'KRL': 2}}, 1958: {1990: 4, 1972: {2015: 5, 1994: 6}, 1980: {2015: 7, 1994: 8}}, 1995: {1990: 9, 1972: 10, 1980: 11}} i = 0 while not isinstance(tree.get(x[i]), dict): i += 1 k = list(tree.get(x[i]).keys()) for o in range(len(k)): for j in range(len(x)): if k[o] == x[j]: ans = x[j] temp1 = tree[x[i]].get(ans) if isinstance(temp1, int): return tree[x[i]].get(ans) else: temp = tree[x[i]].get(ans) k = list(temp.keys()) for o in range(len(k)): for j in range(len(x)): if k[o] == x[j]: ans = x[j] return temp.get(ans)" "def f(x): if x[0] == 2017: return LEFTsecondleft(x) elif x[0] == 1958: return RIGHTsecondleft(x) else: return 11 def LEFTsecondleft(x): if x[2] == 'LEX': return LEFTthirdleft(x) elif x[2] == 'XOJO': return LEFTthirdright(x) else: return 5 def LEFTthirdleft(x): if x[3] == 'SQF': return 0 else: return 1 def LEFTthirdright(x): if x[1] == 'LSL': return 2 elif x[1] == 'SCALA': return 3 else: return 4 def RIGHTsecondleft(x): if x[1] == 'LSL': return 6 elif x[1] == 'SCALA': return 7 else: return RIGHTthirdright(x) def RIGHTthirdright(x): if x[2] == 'LEX': return 8 elif x[2] == 'XOJO': return 9 else: return 10 def main(x): return f(x)" "def main(x): dict4 = {1964: lambda : 0, 1973: lambda : 1} dict5 = {1964: lambda : 2, 1973: lambda : 3} dict2 = {'GOSU': lambda : dict4[x[0]](), 'SMT': lambda : dict5[x[0]](), 'IDRIS': lambda : 4} dict6 = {'GOSU': lambda : 6, 'SMT': lambda : 7, 'IDRIS': lambda : 8} dict3 = {1992: lambda : dict6[x[1]](), 1958: lambda : 9, 1979: lambda : 10} dict1 = {2002: lambda : dict2[x[1]](), 1998: lambda : 5, 1960: lambda : dict3[x[3]]()} return dict1[x[2]]()" "def main(a): if a == ['TOML', 1974, 1978, 'POD', 2017]: return 11 elif a == ['PLSQL', 1974, 1998, 'LSL', 2016]: return 8 elif a == ['TOML', 1974, 1978, 'POD', 2016]: return 4 elif a == ['REBOL', 2016, 1978, 'POD', 2016]: return 0 elif a == ['REBOL', 1974, 1998, 'POD', 2016]: return 5 elif a == ['REBOL', 2016, 1998, 'POD', 2016]: return 6 elif a == ['PLSQL', 2016, 1978, 'POD', 2016]: return 2 elif a == ['PLSQL', 1974, 1978, 'LSL', 2016]: return 3 elif a == ['REBOL', 2016, 1978, 'LSL', 2016]: return 1 else: return 10" "def main(x): if x[0] == 1984: return 11 elif x[0] == 1996: if x[2] == 'TLA': return ['R', 'TEX'].index(x[4]) + 7 elif x[2] == 'METAL': return 9 else: return 10 elif x[3] == 1960: if x[4] == 'R': return 0 else: return [1958, 1971].index(x[1]) + 1 elif x[2] == 'TLA': return ['R', 'TEX'].index(x[4]) + 3 elif x[2] == 'METAL': return 5 else: return 6" "def main(x): if x[0] == 'JAVA': return 11 elif x[0] == 'GAMS': if x[3] == 'RHTML': return choicex1(x[1], 8) else: return choicex1(x[1], 5) elif x[3] == 'RHTML': return choicex2(x[2], 3) else: return choicex1(x[1], 0) def choicex1(cond, x): if cond == 1976: return x elif cond == 2004: return x + 1 return x + 2 def choicex2(cond, x): if cond == 1978: return x return x + 1" "def four(item, right, left): if item[4] == 1990: return right if item[4] == 2001: return left def two(item, right, middle, left): if item[2] == 'GO': return right if item[2] == 'SCSS': return middle if item[2] == 'LESS': return left def one(item, right, middle, left): if item[1] == 1958: return right if item[1] == 1965: return middle if item[1] == 1994: return left def three(item, right, middle, left): if item[3] == 'MIRAH': return right if item[3] == 'JSON': return middle if item[3] == 'POD': return left def zero(item, right, middle, left): if item[0] == 'FORTH': return right if item[0] == 'ROFF': return middle if item[0] == 'INI': return left def main(item): return three(item, two(item, four(item, 0, 1), 2, 3), 4, zero(item, four(item, 5, one(item, 6, 7, 8)), one(item, two(item, 9, 10, 11), 12, 13), 14))" "def help_func(key, kwargs): if type(kwargs[key]) == tuple: return help_func(kwargs[key][0], kwargs[key][1]) else: return kwargs[key] def main(x): return help_func(x[3], {2015: 12, 1969: 13, 1985: (x[0], {'C': 4, 'AMPL': (x[4], {'D': 0, 'CIRRU': (x[2], {1976: 1, 1962: 2, 2014: 3})}), 'INI': (x[2], {2014: 11, 1976: (x[1], {'OPA': 5, 'MESON': 6, 'SLASH': 7}), 1962: (x[1], {'OPA': 8, 'MESON': 9, 'SLASH': 10})})})})" "def f6(list_of_shit): match list_of_shit[0]: case 'APEX': match list_of_shit[2]: case 1966: match list_of_shit[4]: case 1986: return 0 case 1990: return 1 case 1965: match list_of_shit[1]: case 1975: return 2 case 2005: return 3 case 1972: match list_of_shit[3]: case 'LATTE': match list_of_shit[1]: case 1975: return 4 case 2005: return 5 case 'CHUCK': match list_of_shit[4]: case 1986: return 6 case 1990: return 7 case 1965: return 8 case 'C++': match list_of_shit[1]: case 1975: return 9 case 2005: return 10 case 'IO': return 11 def main(n): return f6(n)" "import math def one(items, left, right): if items[1] == 1967: return left if items[1] == 1983: return right def three(items, left, middle, right): if items[3] == 'IOKE': return left if items[3] == 'FORTH': return middle if items[3] == 'METAL': return right def zero(items, left, right): if items[0] == 'GENIE': return left if items[0] == 'EQ': return right def two(items, left, middle, right): if items[2] == 'OPA': return left if items[2] == 'MESON': return middle if items[2] == 'ROUGE': return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), 3), three(items, one(items, 4, 5), one(items, 6, 7), one(items, 8, 9)), 10)" "def zero(items, left, right): if items[0] == 'C++': return left if items[0] == 'ZIMPL': return right def three(items, left, middle, right): if items[3] == 2020: return left if items[3] == 2007: return middle if items[3] == 1999: return right def two(items, left, right): if items[2] == 'QMAKE': return left if items[2] == 'NCL': return right def one(items, left, right): if items[1] == 2005: return left if items[1] == 2020: return right def four(items, left, middle, right): if items[4] == 'ATS': return left if items[4] == 'ASP': return middle if items[4] == 'C': return right def main(items): return four(items, two(items, three(items, 0, 1, one(items, 2, 3)), three(items, one(items, 4, 5), 6, zero(items, 7, 8))), 9, 10)" "def main(x): array = [[x[0], 2019, 'VUE', x[3], 'ECL'], [x[0], 2019, 'OCAML', x[3], 'ECL'], [x[0], 2019, 'FANCY', x[3], 'ECL'], [x[0], 2019, 'VUE', 'OCAML', 'YANG'], [x[0], 2019, 'VUE', 'JULIA', 'YANG'], [x[0], 2019, 'OCAML', 'OCAML', 'YANG'], [x[0], 2019, 'OCAML', 'JULIA', 'YANG'], [1992, 2019, 'FANCY', x[3], 'YANG'], [1957, 2019, 'FANCY', x[3], 'YANG'], [x[0], 2019, x[2], x[3], 'HAML'], [x[0], 1981, x[2], x[3], x[4]], [x[0], 2016, x[2], x[3], x[4]]] if x in array: return array.index(x)" "def main(x): match x[2]: case 2007: return 13 case 1959: match x[3]: case 1983: return 12 case 2009: match x[1]: case 'COQ': match x[0]: case 1978: return 8 case 2019: return 7 case 1973: return 6 case 'EC': match x[0]: case 1978: return 11 case 2019: return 10 case 1973: return 9 case 2002: match x[4]: case 'BISON': return 2 case 'NU': match x[3]: case 1983: return 5 case 2009: match x[1]: case 'COQ': return 3 case 'EC': return 4 case 'SMT': match x[3]: case 1983: return 1 case 2009: return 0" "def zero(items, left, right): if items[0] == 2016: return left if items[0] == 2002: return right def two(items, left, middle, right): if items[2] == 'C++': return left if items[2] == 'M4': return middle if items[2] == 'NGINX': return right def one(items, left, middle, right): if items[1] == 'XC': return left if items[1] == 'PUG': return middle if items[1] == 'PONY': return right def three(items, left, right): if items[3] == 1957: return left if items[3] == 2004: return right def main(items): return zero(items, two(items, one(items, 0, 1, 2), one(items, three(items, 3, 4), 5, three(items, 6, 7)), three(items, 8, one(items, 9, 10, 11))), 12)" "def zero(items, right, left): if items[0] == 'GRACE': return right if items[0] == 'URWEB': return left def one(items, left, right): if items[1] == 1965: return right if items[1] == 1977: return left def two(items, left, right): if items[2] == 1979: return left if items[2] == 2000: return right def three(items, left, right): if items[3] == 1999: return left if items[3] == 2011: return right def four(items, left, middle, right): if items[4] == 1982: return right if items[4] == 1959: return middle if items[4] == 1958: return left def main(items): return zero(items, two(items, three(items, four(items, 7, 6, 5), 4), four(items, 3, three(items, 2, 1), 0)), three(items, one(items, 10, 9), 8))" "from typing import List da = {'ELM': 10, 'COQ': {'1961': 9, '2007': {'1995': 0, '1997': 1}, '1965': {'1978': 5, '1994': {'1990': 6, '2001': 7, '1967': 8}, '1966': {'1990': 2, '2001': 3, '1967': 4}}}} def main(arr: List) -> int: global da spusk = da while True: for item in arr[::-1]: key = str(item) if key in spusk.keys(): spusk = spusk[key] if isinstance(spusk, int): return spusk" "import math mass = ['0:EQ-1:1990-2:NSIS', '0:EQ-1:1990-2:XSLT', '0:EQ-1:1990-2:GLSL-3:ATS', '0:EQ-1:1990-2:GLSL-3:URWEB', '0:EQ-1:1990-2:GLSL-3:GO', '0:EQ-1:1982-4:CSS', '0:EQ-1:1982-4:SMALI', '0:EQ-1:1982-4:BOO', '0:EQ-1:2011-2:NSIS', '0:EQ-1:2011-2:XSLT-4:CSS', '0:EQ-1:2011-2:XSLT-4:SMALI', '0:EQ-1:2011-2:XSLT-4:BOO', '0:EQ-1:2011-2:GLSL', '0:EJS', '0:VALA'] def main(x): ans = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return ans ans += 1" "def zero(items, left, middle, right): if items[0] == 2011: return left if items[0] == 2018: return middle if items[0] == 1960: return right def four(items, left, middle, right): if items[4] == 'JSX': return left if items[4] == 'GOLO': return middle if items[4] == 'NIM': return right def three(items, left, right): if items[3] == 'COBOL': return left if items[3] == 'P4': return right def two(items, left, middle, right): if items[2] == 'EC': return left if items[2] == 'VUE': return middle if items[2] == 'STATA': return right def one(items, left, right): if items[1] == 'CLEAN': return left if items[1] == 'YAML': return right def main(items): return three(items, two(items, one(items, 0, four(items, 1, 2, 3)), zero(items, one(items, 4, 5), four(items, 6, 7, 8), 9), 10), 11)" "import math mass = ['2:BRO-1:SCAML-3:2005-0:ECL', '2:BRO-1:SCAML-3:2005-0:NESC', '2:BRO-1:SCAML-3:2005-0:SQL', '2:BRO-1:SCAML-3:1957', '2:BRO-1:SCAML-3:1972-0:ECL', '2:BRO-1:SCAML-3:1972-0:NESC', '2:BRO-1:SCAML-3:1972-0:SQL', '2:BRO-1:APL-0:ECL-4:GN', '2:BRO-1:APL-0:ECL-4:GRACE', '2:BRO-1:APL-0:NESC', '2:BRO-1:APL-0:SQL', '2:C++', '2:FANCY'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "s = {'PERL6': {'GO': {'KRL': {'TEX': 0, 'VOLT': 1}, 'LEAN': 2}, 'MAX': {'LASSO': {'KRL': 3, 'LEAN': 4}, 'GDB': {'TEX': 5, 'VOLT': 6}}, 'ADA': 7}, 'BISON': {'KRL': {'LASSO': 8, 'GDB': {'GO': 9, 'MAX': 10, 'ADA': 11}}, 'LEAN': 12}} def main(path): s1 = s[path[3]] if path[3] == 'BISON': s2 = s1[path[0]] if path[0] == 'KRL': s3 = s2[path[2]] if isinstance(s3, int): return s3 return s3[path[1]] else: return 12 else: s2 = s1[path[1]] if path[1] == 'GO': s3 = s2[path[0]] if isinstance(s3, int): return s3 return s3[path[4]] elif path[1] == 'MAX': s3 = s2[path[2]] if path[2] == 'LASSO': return s3[path[0]] else: return s3[path[4]] else: return 7" "s = {1975: {'LOGOS': {2020: 0, 2019: 1, 1968: 2}, 'GENIE': {'OX': 3, 'BLADE': 4, 'RED': 5}}, 1982: {'OX': 6, 'BLADE': 7, 'RED': {'LOGOS': 8, 'GENIE': 9}}} def main(path): s1 = s[path[2]] if path[2] == 1975: s2 = s1[path[3]] direction = 1 elif path[2] == 1982: s2 = s1[path[1]] direction = 0 if isinstance(s2, int): return s2 if direction == 1: if path[3] == 'LOGOS': s3 = s2[path[0]] elif path[3] == 'GENIE': s3 = s2[path[1]] if isinstance(s3, int): return s3 else: return s2[path[3]]" "def zero(items, left, middle, right): if items[0] == 'IDL': return left if items[0] == 'GDB': return middle if items[0] == 'HLSL': return right def four(items, left, middle, right): if items[4] == 'GENIE': return left if items[4] == 'KRL': return middle if items[4] == 'NGINX': return right def three(items, left, middle, right): if items[3] == 'MIRAH': return left if items[3] == 'VALA': return middle if items[3] == 'EJS': return right def two(items, left, middle, right): if items[2] == 2004: return left if items[2] == 1989: return middle if items[2] == 1971: return right def one(items, left, right): if items[1] == 1999: return left if items[1] == 1984: return right def main(items): return three(items, four(items, zero(items, two(items, 0, 1, 2), 3, two(items, 4, 5, 6)), 7, one(items, 8, 9)), 10, 11)" "def main(x): right = [3, 4, 1] left = [0, 3, 4] if x[2] == 'PAWN': r_br = {2017: 4, 1964: {2019: 3, 2020: 0, 2013: {1974: 1, 2014: 2}}} for i in range(4): buf = r_br.get(x[right[i]]) if type(buf) == dict: r_br = buf else: return buf if x[2] == 'TLA': l_br = {'TERRA': 5, 'COBOL': 6, 'XS': {2017: 10, 1964: {2020: 7, 2013: 8, 2019: 9}}} for i in range(4): buf = l_br.get(x[left[i]]) if type(buf) == dict: l_br = buf else: return buf" "_dict = {1996: {1984: {'CIRRU': {'RUBY': 0, 'MIRAH': 1, 'MUF': 2}, 'AGDA': {2006: 3, 1982: 4, 1981: 5}, 'HTML': {'RUBY': 6, 'MIRAH': 7, 'MUF': 8}}, 2005: {'CIRRU': {2006: 9, 1982: 10, 1981: 11}, 'AGDA': 12, 'HTML': 13}}, 2019: 14} def main(_list): return search(_list, _dict) def search(_list, _dict): for i in _list: if i in _dict: if not isinstance(_dict[i], dict): return _dict[i] return search(_list, _dict[i])" "class TreeNode: def __init__(self, target_index): self.connected_nodes = [] self.value = target_index def connect(self, condition, node): connected_node = (condition, node) self.connected_nodes.append(connected_node) def iterate(self, input_array): for node in self.connected_nodes: if node[0] == input_array[self.value]: return node[1].iterate(input_array) class ResultNode: def __init__(self, value): self.value = value def iterate(self, input_array): return self.value def init_tree(): node_0 = TreeNode(4) node_1 = TreeNode(2) node_2 = TreeNode(1) node_0.connect(2003, node_1) node_0.connect(1960, node_2) node_3 = TreeNode(3) node_4 = TreeNode(1) node_5 = ResultNode(7) node_6 = ResultNode(8) node_7 = TreeNode(0) node_1.connect('UNO', node_3) node_1.connect('HYPHY', node_4) node_1.connect('DART', node_5) node_2.connect(2016, node_6) node_2.connect(1983, node_7) node_8 = TreeNode(0) node_9 = TreeNode(0) node_10 = TreeNode(0) node_11 = ResultNode(6) node_12 = TreeNode(3) node_13 = ResultNode(11) node_3.connect('EC', node_8) node_3.connect('GN', node_9) node_4.connect(2016, node_10) node_4.connect(1983, node_11) node_7.connect('NESC', node_12) node_7.connect('BLADE', node_13) node_14 = ResultNode(0) node_15 = ResultNode(1) node_16 = ResultNode(2) node_17 = ResultNode(3) node_18 = ResultNode(4) node_19 = ResultNode(5) node_20 = ResultNode(9) node_21 = ResultNode(10) node_8.connect('NESC', node_14) node_8.connect('BLADE', node_15) node_9.connect('NESC', node_16) node_9.connect('BLADE', node_17) node_10.connect('NESC', node_18) node_10.connect('BLADE', node_19) node_12.connect('EC', node_20) node_12.connect('GN', node_21) return node_0 def main(input_params): return init_tree().iterate(input_params)" "def main(items): if items[3] == 2018: return re2018(items) if items[3] == 2005: return re2005(items) def re2018(items): if items[0] == 'COBOL': return reupcobol(items) if items[0] == 'LLVM': return reupllvm(items) if items[0] == 'SMALI': return 5 def re2005(items): if items[0] == 'COBOL': return redowncobol(items) if items[0] == 'LLVM': return redownllvm(items) if items[0] == 'SMALI': return 11 def reupcobol(items): if items[4] == 'EBNF': return reebnf(items) if items[4] == 'PAWN': return 2 def reupllvm(items): if items[4] == 'EBNF': return 3 if items[4] == 'PAWN': return 4 def redowncobol(items): if items[2] == 1992: return 6 if items[2] == 1987: return 7 def redownllvm(items): if items[1] == 'SELF': return reself(items) if items[1] == 'ASN.1': return 10 def reebnf(items): if items[2] == 1992: return 0 if items[2] == 1987: return 1 def reself(items): if items[2] == 1992: return 8 if items[2] == 1987: return 9" "import math import random import copy tree = {'RAML': {'LSL': {'SMALI': 0, 'MAKO': 1}, 'SELF': {'JSX': 2, 'EAGLE': 3, 'PHP': 4}, 'E': 5}, 'M4': {'LSL': 6, 'SELF': {'SMALI': 7, 'MAKO': 8}, 'E': {'JSX': 9, 'EAGLE': 10, 'PHP': 11}}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(path)) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "def func_1(x): if x[3] == 1975: return func_1_1(x) elif x[3] == 1960: return func_1_2(x) def func_1_1(x): if x[0] == 'XS': if x[1] == 1977: return 0 elif x[1] == 1969: return 1 elif x[0] == 'M4': return 2 def func_1_2(x): if x[1] == 1977: return 3 elif x[1] == 1969: return 4 def func_2(x): if x[3] == 1975: return 5 elif x[3] == 1960: if x[0] == 'XS': return func_2_1(x) elif x[0] == 'M4': return func_2_2(x) def func_2_1(x): if x[4] == 1990: return 6 elif x[4] == 2020: return 7 elif x[4] == 1974: return 8 def func_2_2(x): if x[1] == 1977: return 9 elif x[1] == 1969: return 10 def main(x): answer = -1 if x[2] == 'COBOL': return func_1(x) elif x[2] == 'HCL': return func_2(x) return answer" "def zero(items, left, right): if items[0] == 2000: return left if items[0] == 2011: return right def one(items, left, right): if items[1] == 2020: return left if items[1] == 2015: return right def two(items, left, middle, right): if items[2] == 'PAN': return left if items[2] == 'DM': return middle if items[2] == 'LUA': return right def three(items, left, middle, right): if items[3] == 1981: return left if items[3] == 2015: return middle if items[3] == 1989: return right def main(items): return three(items, two(items, zero(items, 0, 1), zero(items, one(items, 2, 3), 4), zero(items, one(items, 5, 6), one(items, 7, 8))), one(items, 9, 10), 11)" "import math def tr(x): if x[4] == 1968: if x[1] == 1964: if x[3] == 2016: return 0 else: return 1 elif x[2] == 'TWIG': return 2 else: return 3 elif x[4] == 1971: return 4 else: return 5 def trr(x): if x[4] == 1968: if x[1] == 1964: return 6 elif x[3] == 2016: return 7 else: return 8 elif x[4] == 1971: if x[1] == 1964: if x[2] == 'TWIG': return 9 else: return 10 else: return 11 else: return 12 def main(x): if x[0] == 1986: return 13 elif x[0] == 1962: return tr(x) elif x[0] == 1991: return trr(x)" "def zero(items, left, middle, right): if items[0] == 'KIT': return left if items[0] == 'RUBY': return middle if items[0] == 'SLASH': return right def one(items, left, right): if items[1] == 'YACC': return left if items[1] == 'SQF': return right def two(items, left, middle, right): if items[2] == 'PONY': return left if items[2] == 'ASN.1': return middle if items[2] == 'KRL': return right def four(items, left, right): if items[4] == 'MQL4': return left if items[4] == 'PERL6': return right def main(items): return two(items, zero(items, one(items, four(items, 0, 1), 2), four(items, one(items, 3, 4), 5), 6), 7, zero(items, 8, 9, 10))" "def func(s, e): if e in s.keys(): return s[e] def func1(el, lis): if el == 'x0': return lis[0] if el == 'x1': return lis[1] if el == 'x2': return lis[2] if el == 'x3': return lis[3] def main(lis): dictt = {'s3_2': {'x3': {1963: 8, 1997: 9, 1996: 10}}, 's3_1': {'x3': {1963: 5, 1997: 6, 1996: 7}}, 's3': {'x0': {'ROUGE': 0, 'TXL': 1}}, 's2_1': {'x2': {2003: 's3_1', 2010: 's3_2', 2018: 11}}, 's2': {'x3': {1963: 's3', 1997: 2, 1996: 3}}, 's1': {'x1': {1967: 's2', 2016: 4, 2007: 's2_1'}}} s = dictt['s1'] x = list(dictt['s1'].keys())[0] res1 = func(s[str(x)], func1(x, lis)) while type(res1) != int: s = dictt[res1] x = list(s.keys())[0] res1 = func(s[str(x)], func1(x, lis)) return res1 '/n'" "def zero(items, left, right): if items[0] == 'LATTE': return left if items[0] == 'GOSU': return right def one(items, left, right): if items[1] == 'VCL': return left if items[1] == 'SMALI': return right def two(items, left, middle, right): if items[2] == 'XC': return left if items[2] == 'TOML': return middle if items[2] == 'LLVM': return right def three(items, left, middle, right): if items[3] == 1965: return left if items[3] == 1966: return middle if items[3] == 1991: return right def main(items): return zero(items, one(items, 10, three(items, 9, 8, 7)), two(items, three(items, 6, 5, 4), one(items, 3, 2), one(items, 1, 0)))" "def main(args): dict2 = {'NU': 0, 'HCL': 1} dict0 = {2000: 3, 1962: 4, 1964: 5} dict1 = {'ELM': 6, 'XML': 7, 'STAN': 8} dict11 = {'ELM': 9, 'XML': 10, 'STAN': 11} dict1_up = {'ELM': dict2[args[2]], 'XML': 2, 'STAN': dict0[args[0]]} dict0_up = {2000: dict1[args[1]], 1962: dict11[args[1]], 1964: 12} dict3 = {'SASS': dict1_up[args[1]], 'JAVA': dict0_up[args[0]], 'D': 13} return dict3[args[3]]" "def zero(items, left, right): if items[0] == 'PIC': return left if items[0] == 'REXX': return right def four(items, left, right): if items[4] == 2009: return left if items[4] == 1970: return right def three(items, left, middle, right): if items[3] == 'M4': return left if items[3] == 'MASK': return middle if items[3] == 'IDL': return right def two(items, left, middle, right): if items[2] == 'SASS': return left if items[2] == 'AGDA': return middle if items[2] == 'EAGLE': return right def one(items, left, middle, right): if items[1] == 1992: return left if items[1] == 1980: return middle if items[1] == 1964: return right def main(items): return one(items, two(items, three(items, four(items, 0, 1), 2, four(items, 3, 4)), zero(items, 5, three(items, 6, 7, 8)), three(items, four(items, 9, 10), 11, 12)), 13, 14)" "def zero(items, left, middle, right): if items[0] == 1988: return left if items[0] == 1979: return middle if items[0] == 1998: return right def one(items, left, right): if items[1] == 'MASK': return left if items[1] == 'XBASE': return right def two(items, left, middle, right): if items[2] == 1990: return left if items[2] == 1957: return middle if items[2] == 2009: return right def three(items, left, middle, right): if items[3] == 'FISH': return left if items[3] == 'TXL': return middle if items[3] == 'HACK': return right def four(items, left, right): if items[4] == 2013: return left if items[4] == 1957: return right def main(items): return three(items, zero(items, one(items, two(items, 0, 1, 2), four(items, 3, 4)), two(items, four(items, 5, 6), 7, 8), 9), 10, 11)" "def zero(items, left, middle, right): if items[0] == 2020: return left if items[0] == 1966: return middle if items[0] == 1992: return right def three(items, left, middle, right): if items[3] == 'COBOL': return left if items[3] == 'RAGEL': return middle if items[3] == 'PUG': return right def two(items, left, right): if items[2] == 'SWIFT': return left if items[2] == 'OX': return right def one(items, left, middle, right): if items[1] == 'TLA': return left if items[1] == 'ELM': return middle if items[1] == 'M4': return right def main(items): return two(items, three(items, zero(items, 0, one(items, 1, 2, 3), 4), zero(items, one(items, 5, 6, 7), one(items, 8, 9, 10), 11), 12), 13)" "def zero(items, left, middle, right): if items[0] == 1974: return left if items[0] == 2007: return middle if items[0] == 1978: return right def three(items, left, middle, right): if items[3] == 1998: return left if items[3] == 1990: return middle if items[3] == 2010: return right def two(items, left, right): if items[2] == 2020: return left if items[2] == 2017: return right def one(items, left, right): if items[1] == 1969: return left if items[1] == 2008: return right def main(items): return zero(items, two(items, one(items, 0, 1), three(items, 2, 3, 4)), one(items, two(items, 5, 6), 7), two(items, 8, three(items, 9, 10, 11)))" "def zero(items, left, right): if items[0] == 'MAKO': return left if items[0] == 'TEA': return right def one(items, left, m, right): if items[1] == 2017: return left if items[1] == 1995: return m if items[1] == 1990: return right def two(items, left, right): if items[2] == 2004: return left if items[2] == 2013: return right def three(items, left, m, right): if items[3] == 'HTML': return left if items[3] == 'NCL': return m if items[3] == 'ECL': return right def four(items, left, m, right): if items[4] == 'ECL': return left if items[4] == 'NL': return m if items[4] == 'LUA': return right def main(items): return zero(items, two(items, three(items, 0, 1, one(items, 2, 3, 4)), 5), four(items, three(items, 6, 7, two(items, 8, 9)), 10, 11))" "def zero(items, left, middle, right): if items[0] == 1965: return left if items[0] == 1982: return middle if items[0] == 2009: return right def one(items, left, right): if items[1] == 2004: return left if items[1] == 1981: return right def two(items, left, middle, right): if items[2] == 'TEA': return left if items[2] == 'SASS': return middle if items[2] == 'NUMPY': return right def three(items, left, middle, right): if items[3] == 'VCL': return left if items[3] == 'RHTML': return middle if items[3] == 'NCL': return right def four(items, left, middle, right): if items[4] == 'E': return left if items[4] == 'XTEND': return middle if items[4] == 'PAN': return right def main(items): return two(items, one(items, three(items, four(items, 0, 1, 2), 3, zero(items, 4, 5, 6)), three(items, four(items, 7, 8, 9), 10, 11)), 12, 13)" "s = ({1998, 'J', 1976}, {1998, 'J', 1960}, {1998, 'J', 1980}, {1998, 'C++'}, {1998, 'VHDL', 1976}, {1998, 'VHDL', 1960}, {1998, 'VHDL', 1980}, {1997, 'VUE', 'J'}, {1997, 'VUE', 'C++'}, {1997, 'VUE', 'VHDL'}, {1997, 'REBOL'}, {1978}) def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "def main(x): res = 0 if x[1] == 1970: if x[2] == 'GENIE': return 4 if x[2] == 'GDB': res = 2 return (x[0] == 'COBOL') + res else: if x[0] == 'COBOL': res += 3 res += 5 if x[2] == 'COOL': return 0 + res if x[2] == 'GDB': return 1 + res if x[2] == 'GENIE': return 2 + res" "def main(args): dict3 = {1968: 0, 1965: 1, 2003: 2} dict33 = {1968: 7, 1965: 8, 2003: 9} dict4 = {'XML': dict33[args[3]], 'R': 10, 'GO': 11} dict0 = {'SVG': dict3[args[3]], 'SQL': 3, 'NIT': 4} dict00 = {'SVG': 6, 'SQL': dict4[args[4]], 'NIT': 12} dict1 = {1979: dict0[args[0]], 1986: 5, 2019: dict00[args[0]]} return dict1[args[1]]" "def zero(items, left, right): if items[0] == 1961: return left if items[0] == 1981: return right def four(items, left, middle, right): if items[4] == 1966: return left if items[4] == 2015: return middle if items[4] == 1979: return right def three(items, left, middle, right): if items[3] == 'NIX': return left if items[3] == 'P4': return middle if items[3] == 'MESON': return right def two(items, left, right): if items[2] == 1996: return left if items[2] == 2003: return right def one(items, left, right): if items[1] == 2001: return left if items[1] == 2009: return right def main(items): return two(items, three(items, zero(items, four(items, 0, 1, 2), one(items, 3, 4)), 5, zero(items, one(items, 6, 7), 8)), one(items, four(items, 9, 10, 11), 12))" "def zero(items, left, middle, right): if items[0] == 'CSON': return left if items[0] == 'M4': return middle if items[0] == 'CIRRU': return right def four(items, left, middle, right): if items[4] == 'R': return left if items[4] == 'PIKE': return middle if items[4] == 'MUPAD': return right def three(items, left, middle, right): if items[3] == 1965: return left if items[3] == 2002: return middle if items[3] == 1981: return right def two(items, left, right): if items[2] == 2002: return left if items[2] == 2018: return right def one(items, left, middle, right): if items[1] == 'DM': return left if items[1] == 'VCL': return middle if items[1] == 'R': return right def main(items): return two(items, three(items, one(items, zero(items, 0, 1, 2), four(items, 3, 4, 5), zero(items, 6, 7, 8)), 9, 10), 11)" "from itertools import permutations tree = {'HAML': {'HAXE': {'APL': 0, 'CLICK': 1, 'SQF': 2}, 'MUPAD': {1980: 3, 2007: 4}, 'APL': 5}, 'PIKE': 6, 'MAKO': {'HAXE': {'APL': 7, 'CLICK': 8, 'SQF': 9}, 'MUPAD': 10, 'APL': 11}} def get_path(path): way = tree for key in path: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value def main(path): comb = list(permutations(path)) t = comb[1] comb[1] = comb[2] comb[2] = t i = 0 x = None while x is None: x = get_path(comb[i]) i += 1 return x" "s = ({2009, 'XTEND', 'ORG', 'ABAP'}, {2009, 'XTEND', 'ORG', 'UNO'}, {2009, 'XTEND', 'LATTE', 'ABAP'}, {2009, 'XTEND', 'LATTE', 'UNO'}, {2009, 'XTEND', 'HTTP', 'ABAP'}, {2009, 'XTEND', 'HTTP', 'UNO'}, {2009, 'SHELL', 'ABAP'}, {2009, 'SHELL', 'UNO', 'ORG'}, {2009, 'SHELL', 'UNO', 'LATTE'}, {2009, 'SHELL', 'UNO', 'HTTP'}, {2009, 'DM'}, {1983}) def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "def main(x): dict1 = {'NGINX': 0, 'JSX': 1, 'APEX': 2} dict2 = {'NGINX': 6, 'JSX': 7, 'APEX': 8} dict3 = {'NGINX': 9, 'JSX': 10, 'APEX': 11} if x[3] == 1980: if x[2] == 'APL': return dict1.get(x[1]) elif x[2] == 'DM': return 3 elif x[3] == 1964: if x[2] == 'APL': return 4 elif x[2] == 'DM': return 5 elif x[3] == 1958: if x[0] == 2013: return dict2.get(x[1]) elif x[0] == 2000: return dict3.get(x[1])" "def zero(items, left, right): if items[0] == 1963: return left if items[0] == 1986: return right def four(items, left, middle, right): if items[4] == 1978: return left if items[4] == 1974: return middle if items[4] == 1989: return right def three(items, left, right): if items[3] == 'ATS': return left if items[3] == 'LEAN': return right def two(items, left, right): if items[2] == 'DIFF': return left if items[2] == 'NIT': return right def one(items, left, middle, right): if items[1] == 1988: return left if items[1] == 1977: return middle if items[1] == 1972: return right def main(items): return one(items, four(items, two(items, three(items, 0, 1), zero(items, 2, 3)), zero(items, three(items, 4, 5), three(items, 6, 7)), two(items, three(items, 8, 9), 10)), 11, 12)" "def zero(items, left, middle, right): if items[0] == 1968: return left if items[0] == 1964: return middle if items[0] == 2014: return right def four(items, left, right): if items[4] == 'MTML': return left if items[4] == 'TWIG': return right def three(items, left, middle, right): if items[3] == 1960: return left if items[3] == 2008: return middle if items[3] == 1999: return right def two(items, left, right): if items[2] == 2011: return left if items[2] == 1997: return right def one(items, left, right): if items[1] == 'J': return left if items[1] == 'FREGE': return right def main(items): return zero(items, three(items, one(items, four(items, 0, 1), 2), 3, four(items, 4, 5)), one(items, three(items, two(items, 6, 7), four(items, 8, 9), 10), 11), 12)" "def main_third_layer(x): if x[2] == 1976: return 0 elif x[2] == 1959: return 1 elif x[2] == 1977: return 2 def alt_third_layer(x): if x[0] == 'EJS': return 8 elif x[0] == 'OOC': return 9 def bb_third_layer(x): if x[2] == 1976: return 4 elif x[2] == 1959: return 5 elif x[2] == 1977: return 6 def main_second_layer(x): if x[3] == 'SELF': return main_third_layer(x) elif x[3] == 'SVG': return 3 elif x[3] == 'SQF': return bb_third_layer(x) def alt_second_layer(x): if x[3] == 'SELF': return alt_third_layer(x) elif x[3] == 'SVG': return 10 elif x[3] == 'SQF': return 11 def first_layer(x): if x[4] == 2002: return main_second_layer(x) elif x[4] == 1960: return 7 elif x[4] == 2007: return alt_second_layer(x) def main(x): if x[1] == 1986: return first_layer(x) elif x[1] == 2019: return 12 main(['OOC', 1986, 1959, 'SELF', 2007])" "def main(r): s = [['QML', 0, 2003, 2010], ['QML', 0, 2000, 2010], ['QML', 0, 0, 2007], ['QML', 0, 2003, 1973], ['QML', 0, 2000, 1973], ['RAML', 0, 0, 2010], ['RAML', 0, 2003, 2007], ['RAML', 0, 2000, 2007], ['RAML', 1969, 0, 1973], ['RAML', 2010, 0, 1973], ['RAML', 2008, 0, 1973]] s1 = set(r) for i in range(len(s)): flag = True for j in range(len(s[i])): if str(r[j]) != str(s[i][j]) and str(s[i][j]) != '0': flag = False if flag is True: return i" "def zero(items, left, middle, right): if items[0] == 1970: return left if items[0] == 1963: return middle if items[0] == 1962: return right def three(items, left, middle, right): if items[3] == 1962: return left if items[3] == 1977: return middle if items[3] == 1992: return right def two(items, left, middle, right): if items[2] == 1998: return left if items[2] == 2004: return middle if items[2] == 2011: return right def one(items, left, right): if items[1] == 'CHUCK': return left if items[1] == 'OX': return right def main(items): return three(items, one(items, two(items, 0, 1, 2), 3), 4, zero(items, 5, two(items, 6, 7, 8), 9))" "def choice0(x, start, lower): if x[0] == 1966: return start elif x[0] == 1987: return start + 1 return choice1(x, lower) def choice1(x, lower): choice2 = {2009: 1, 2007: 2, 2006: 3} if lower: return {1974: 7, 1994: 8, 2003: 9}[x[1]] return {1974: 0, 1994: choice2[x[2]], 2003: 4}[x[1]] def main(x): if x[4] == 'CLICK': return choice0(x, 5, False) if x[3] == 'PIC': return 12 return choice0(x, 10, True)" "def main(tree): level3 = [2012, 2018, 1986] level2 = [1973, 1986] level1 = [2015, 2019, 2002] level0 = ['OOC', 'MQL4', 'VALA'] index3 = level3.index(tree[3]) index2 = level2.index(tree[2]) index1 = level1.index(tree[1]) index0 = level0.index(tree[0]) if tree[1] == 2015 and tree[3] == 2012: return index2 * 3 + index0 elif tree[3] == 2012 and tree[1] != 2015: return index1 + 5 elif tree[2] == 1973 and tree[3] == 1986: return index0 + 9 elif tree[2] == 1986 and tree[3] == 1986: return 12 elif tree[3] == 2018: return 8" "def sub_1(x): if x[0] == 2015: if x[1] == 2011: return 6 elif x[1] == 2002: if x[2] == 'GO': return 7 else: return 8 elif x[1] == 1985: if x[4] == 1995: return 9 elif x[4] == 1973: return 10 else: return 11 else: return 12 def main(x): if x[3] == 1996: if x[4] == 1995: if x[2] == 'GO': if x[1] == 2011: return 0 elif x[1] == 2002: return 1 else: return 2 else: return 3 elif x[4] == 1973: return 4 else: return 5 elif x[3] == 1973: return sub_1(x) else: return 13" "def main(x): x2 = {'STAN': 1, 'ADA': 2, 'X10': 3} x0 = {'OX': 5, 'MESON': 6} x0_1 = {'OX': 7, 'MESON': 8} x0_2 = {'OX': 0, 'MESON': x2[x[2]]} x4 = {'KIT': 4, 'IO': x0[x[0]], 'SMALI': x0_1[x[0]]} x1 = {'RHTML': x0_2[x[0]], 'ORG': x4[x[4]], 'NL': 9} x3 = {'RAGEL': x1[x[1]], 'FANCY': 10, 'KICAD': 11} return x3[x[3]]" "def zero(items, left, middle, right): if items[0] == 1975: return left if items[0] == 1974: return middle if items[0] == 2003: return right def four(items, left, middle, right): if items[4] == 'CMAKE': return left if items[4] == 'BLADE': return middle if items[4] == 'GENIE': return right def three(items, left, right): if items[3] == 2009: return left if items[3] == 2011: return right def two(items, left, right): if items[2] == 2017: return left if items[2] == 1993: return right def one(items, left, right): if items[1] == 'FORTH': return left if items[1] == 'AWK': return right def main(items): return three(items, one(items, four(items, 0, two(items, 1, 2), zero(items, 3, 4, 5)), 6), four(items, 7, 8, 9))" "def main(x): ans = {'ATS': {'DART': {2003: 0, 1960: 1, 1969: {1985: 2, 1990: 3}}, 'RED': 4, 'DIFF': 5}, 'SHELL': {2006: 6, 1981: {2003: 7, 1960: {1985: 8, 1990: 9}, 1969: 10}}} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] break return i" "from typing import List derevo = {'2014': {'HYPHY': {'1996': 0, '2005': 1}, 'STATA': {'LIMBO': 2, 'STAN': 3}, 'HAXE': 4}, '2020': {'LIMBO': {'1996': 5, '2005': 6}, 'STAN': {'HYPHY': 7, 'STATA': 8, 'HAXE': 9}}} def main(arr: List) -> int: global derevo a = derevo while True: for item in arr[::-1]: k = str(item) if k in a.keys(): a = a[k] if isinstance(a, int): return a" "def zero(items, left, middle, right): if items[0] == 'IOKE': return left if items[0] == 'INI': return middle if items[0] == 'ABAP': return right def four(items, left, middle, right): if items[4] == 1985: return left if items[4] == 1974: return middle if items[4] == 2007: return right def three(items, left, middle, right): if items[3] == 'HTTP': return left if items[3] == 'SWIFT': return middle if items[3] == 'ASP': return right def two(items, left, middle, right): if items[2] == 'CSON': return left if items[2] == 'OX': return middle if items[2] == 'TLA': return right def one(items, left, middle, right): if items[1] == 1962: return left if items[1] == 2019: return middle if items[1] == 1965: return right def main(items): return zero(items, one(items, two(items, three(items, 0, 1, 2), 3, 4), 5, 6), 7, four(items, three(items, one(items, 8, 9, 10), 11, 12), 13, 14))" "def main(x): if x[0] == 1960: return f1_0(x) if x[0] == 1958: return 4 if x[0] == 1973: return f3_0(x) def f1_0(x): if x[1] == 'STON': return f2_1(x) if x[1] == 'EC': return 3 def f1_3(x): if x[1] == 'STON': return 5 if x[1] == 'EC': return 6 def f3_0(x): if x[3] == 1962: return f1_3(x) if x[3] == 1992: return f2_3(x) if x[3] == 1975: return 10 def f2_1(x): if x[2] == 'LSL': return 0 if x[2] == 'TLA': return 1 if x[2] == 'CLICK': return 2 def f2_3(x): if x[2] == 'LSL': return 7 if x[2] == 'TLA': return 8 if x[2] == 'CLICK': return 9" "def zero(items, left, middle, right): if items[0] == 'XTEND': return left if items[0] == 'HYPHY': return middle if items[0] == 'ECL': return right def four(items, left, right): if items[4] == 'TXL': return left if items[4] == 'MQL4': return right def three(items, left, right): if items[3] == 2011: return left if items[3] == 1984: return right def two(items, left, middle, right): if items[2] == 'HY': return left if items[2] == 'RAGEL': return middle if items[2] == 'JSON': return right def one(items, left, right): if items[1] == 'NIX': return left if items[1] == 'SQL': return right def main(items): return three(items, one(items, four(items, 0, zero(items, 1, 2, 3)), zero(items, 4, two(items, 5, 6, 7), 8)), two(items, zero(items, 9, 10, 11), 12, 13))" "def main(x): dict1 = {1980: 0, 1964: 1, 2020: 2} dict2 = {2012: 3, 1988: 4} dict3 = {'MAX': 6, 'HTML': 7, 'SAS': 8} if x[4] == 'NIT': if x[0] == 1987: return dict3.get(x[1]) elif x[0] == 2012: return 9 elif x[0] == 1958: if x[1] == 'SAS': return 5 elif x[1] == 'HTML': return dict2.get(x[3]) elif x[1] == 'MAX': return dict1.get(x[2]) return 10" "def one(items, left, right): if items[1] == 1990: return left if items[1] == 1987: return right def four(items, left, middle, right): if items[4] == 'X10': return left if items[4] == 'MUF': return middle if items[4] == 'SAGE': return right def zero(items, left, middle, right): if items[0] == 'D': return left if items[0] == 'X10': return middle if items[0] == 'TEX': return right def two(items, left, middle, right): if items[2] == 'COOL': return left if items[2] == 'FISH': return middle if items[2] == 'TEX': return right def three(items, left, right): if items[3] == 1977: return left if items[3] == 1969: return right def main(items): return three(items, two(items, four(items, one(items, 0, 1), zero(items, 2, 3, 4), zero(items, 5, 6, 7)), 8, zero(items, four(items, 9, 10, 11), 12, 13)), 14) main(['TEX', 1990, 'TEX', 1977, 'X10'])" "def main(x): match x[1]: case 'LEX': return 11 case 'XPROC': match x[3]: case 1990: return 8 case 1957: match x[0]: case 'LIMBO': return 9 case 'QMAKE': return 10 case 'NU': match x[0]: case 'QMAKE': return 7 case 'LIMBO': match x[4]: case 'URWEB': return 6 case 'GDB': match x[2]: case 'CSV': return 3 case 'NIX': return 4 case 'SAGE': return 5 case 'HY': match x[2]: case 'CSV': return 0 case 'NIX': return 1 case 'SAGE': return 2" "def main(x): if x[3] == 2004: return x0_1_1(x) elif x[3] == 2009: return x0_1_2(x) elif x[3] == 2001: return 12 def x0_1_1(x): if x[0] == 'OX': return x1_2(x) elif x[0] == 'SCALA': return x2_2_1(x) elif x[0] == 'SHELL': return 6 def x0_1_2(x): if x[0] == 'OX': return x2_2_2(x) elif x[0] == 'SCALA': return 10 elif x[0] == 'SHELL': return 11 def x1_2(x): if x[1] == 1988: return 0 elif x[1] == 1994: return 1 elif x[1] == 1962: return 2 def x2_2_1(x): if x[2] == 'SQL': return 3 elif x[2] == 'AGDA': return 4 elif x[2] == 'HAML': return 5 def x2_2_2(x): if x[2] == 'SQL': return 7 elif x[2] == 'AGDA': return 8 elif x[2] == 'HAML': return 9 main(['OX', 1994, 'SQL', 2009])" "def two(items, left, right): if items[2] == 2007: return left if items[2] == 1963: return right def one(items, left, right): if items[1] == 'AWK': return left if items[1] == 'HTTP': return right def three(items, left, middle, right): if items[3] == 'LATTE': return left if items[3] == 'EBNF': return middle if items[3] == 'OPAL': return right def zero(items, left, middle, right): if items[0] == 1962: return left if items[0] == 2013: return middle if items[0] == 1989: return right def main(items): return zero(items, three(items, two(items, 0, 1), 2, two(items, 3, 4)), two(items, 5, one(items, 6, 7)), three(items, 8, 9, 10))" "def main(data: tuple): match data[1]: case 1992: return layer_3(data) case 1979: return 13 def layer_3(data: tuple): match data[3]: case 'C': return layer_0(data) case 'ADA': return layer_2(data) case 'IDL': return 12 def layer_0(data: tuple): match data[0]: case 'RUBY': return layer_41(data) case 'SHELL': return layer_42(data) case 'HAML': return 6 def layer_41(data: tuple): match data[4]: case 1966: return 0 case 1995: return 1 case 1975: return 2 def layer_42(data: tuple): match data[4]: case 1966: return 3 case 1995: return 4 case 1975: return 5 def layer_2(data: tuple): match data[2]: case 2017: return layer_43(data) case 1976: return 10 case 2015: return 11 def layer_43(data): match data[4]: case 1966: return 7 case 1995: return 8 case 1975: return 9" "def main(x): x_new_0_5 = x[:2] + [''] + x[3:] x_new_7_10 = x[:4] + [''] x_new_12_13 = ['', '', ''] + x[3:4] + [''] s_0_5 = [['DM', 1974, '', 'M', 1984], ['DM', 1970, '', 'M', 1984], ['DM', 1961, '', 'M', 1984], ['DM', 1974, '', 'M', 2018], ['DM', 1970, '', 'M', 2018], ['DM', 1961, '', 'M', 2018]] s_7_10 = [['COQ', 1970, 'MUPAD', 'M', ''], ['COQ', 1970, 'GLSL', 'M', ''], ['COQ', 1961, 'MUPAD', 'M', ''], ['COQ', 1961, 'GLSL', 'M', '']] s_12_13 = [['', '', '', 'SCSS', ''], ['', '', '', 'YAML', '']] if x_new_12_13 in s_12_13: return s_12_13.index(x_new_12_13) + 12 if x[3] == 'M' and x[0] == 'SCSS': return 11 if x_new_7_10 in s_7_10: return s_7_10.index(x_new_7_10) + 7 if x[3] == 'M' and x[0] == 'COQ' and (x[1] == 1974): return 6 if x_new_0_5 in s_0_5: return s_0_5.index(x_new_0_5)" "import math mass = ['0:1961-4:2012-2:RUST', '0:1961-4:2012-2:OCAML-1:BISON', '0:1961-4:2012-2:OCAML-1:KIT', '0:1961-4:2012-2:OCAML-1:SCSS', '0:1961-4:2012-2:GOSU', '0:1961-4:1994', '0:1960', '0:1992-3:1991-2:RUST-4:2012', '0:1992-3:1991-2:RUST-4:1994', '0:1992-3:1991-2:OCAML', '0:1992-3:1991-2:GOSU', '0:1992-3:1963'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def main(res): ams = {0: {1974: {1: {'ROFF': {2: {2009: 6, 1987: 7, 1964: 8}}, 'XBASE': 9}}, 1969: {3: {'CLIPS': {2: {2009: 0, 1987: 1, 1964: 2}}, 'LASSO': 3, 'ORG': {1: {'XBASE': 5, 'ROFF': 4}}}}}} while isinstance(ams, dict): Ind = int(*ams) ams = ams[Ind] Key = res[Ind] ams = ams[Key] return ams" "def zero(items, left, middle, right): if items[0] == 'AMPL': return left if items[0] == 'GAP': return middle if items[0] == 'NU': return right def four(items, left, right): if items[4] == 'FISH': return left if items[4] == 'REXX': return right def three(items, left, right): if items[3] == 'DM': return left if items[3] == 'TCSH': return right def two(items, left, middle, right): if items[2] == 1969: return left if items[2] == 1965: return middle if items[2] == 1996: return right def one(items, left, right): if items[1] == 'MASK': return left if items[1] == 'SCALA': return right def main(items): return zero(items, one(items, three(items, four(items, 0, 1), 2), two(items, three(items, 3, 4), three(items, 5, 6), 7)), 8, 9)" "def main(x): x4 = {2013: 0, 1994: 1, 2019: 2} x2 = {'RUST': 5, 'LOGOS': 6, 'OCAML': 7} x4_1 = {2013: 9, 1994: 10, 2019: 11} x0 = {'LATTE': x4[x[4]], 'ROUGE': 3} x4_2 = {2013: 4, 1994: x2[x[2]], 2019: 8} x3 = {1970: x0[x[0]], 2011: x4_2[x[4]]} x3_1 = {1970: x4_1[x[4]], 2011: 12} x1 = {1977: x3[x[3]], 1972: x3_1[x[3]]} return x1[x[1]]" "def main(x): if x[3] == 2010: return 11 elif x[0] == 'HCL': if x[4] == 2008: return [2007, 1997].index(x[2]) elif x[4] == 1988: return [2007, 1997].index(x[2]) + 2 else: return [1979, 1994].index(x[1]) + 4 elif x[2] == 2007: return [1979, 1994].index(x[1]) + 6 else: return [2008, 1988, 2011].index(x[4]) + 8" "def main(x): match x[2]: case 1993: match x[3]: case 'QMAKE': match x[0]: case 'LSL': return 0 case 'MQL5': return 1 case 'CHUCK': return 2 case 'LSL': match x[1]: case 'CUDA': return 3 case 'SASS': return 4 case 'HSL': return 5 case 1988: match x[3]: case 'QMAKE': return 6 case 'LSL': return 7 case 1997: match x[1]: case 'CUDA': return 8 case 'SASS': match x[3]: case 'QMAKE': return 9 case 'LSL': return 10 case 'HCL': return 11" "class Node: def __init__(self, ch: dict, ind: int): self.ch = ch self.ind = ind def give_res(self, x): next_node = self.ch[x[self.ind]] if type(next_node) is Node: return next_node.give_res(x) else: return next_node def make_tree(): n0 = Node({1974: 0, 1981: 1}, 4) n1 = Node({1973: 2, 1972: n0}, 1) n2 = Node({'REBOL': 3, 'GAP': n1}, 0) n3 = Node({1977: 5, 2007: 6}, 2) n4 = Node({'GAP': 7, 'REBOL': 8}, 0) n5 = Node({1974: n3, 1981: n4}, 4) n6 = Node({1972: n5, 1973: 9}, 1) n7 = Node({1979: n2, 1977: 4, 1965: n6}, 3) return n7 def main(arr): root = make_tree() return root.give_res(arr)" "def zero(items, left, right): if items[0] == 'COQ': return left if items[0] == 'JSON5': return right def one(items, left, middle, right): if items[1] == 'ROUGE': return left if items[1] == 'OPA': return middle if items[1] == 'GENIE': return right def three(items, left, right): if items[3] == 'KICAD': return left if items[3] == 'R': return right def two(items, left, right): if items[2] == 1977: return left if items[2] == 1961: return right def four(items, left, right): if items[4] == 'SVG': return left if items[4] == 'XSLT': return right def main(items): return three(items, zero(items, one(items, four(items, 0, 1), four(items, 2, 3), 4), four(items, two(items, 5, 6), 7)), four(items, 8, 9))" "def zero(items, up, middle, down): if items[0] == 1979: return up if items[0] == 1980: return middle if items[0] == 2020: return down def one(items, up, middle, down): if items[1] == 1987: return up if items[1] == 2003: return middle if items[1] == 1967: return down def two(items, up, middle, down): if items[2] == 1972: return up if items[2] == 1993: return middle if items[2] == 1957: return down def three(items, up, down): if items[3] == 'LATTE': return up if items[3] == 'PAWN': return down def four(items, up, down): if items[4] == 1989: return up if items[4] == 1971: return down def main(items): return four(items, three(items, two(items, zero(items, 0, 1, 2), 3, 4), two(items, 5, one(items, 6, 7, 8), zero(items, 9, 10, 11))), 12)" "def main(x): a = [3, {2016: [2, {'STAN': [0, {'TEXT': 0, 'LATTE': 1, 'PERL6': 2}], 'EBNF': [0, {'TEXT': 3, 'LATTE': 4, 'PERL6': 5}]}], 1984: [2, {'STAN': 6, 'EBNF': [0, {'TEXT': 7, 'LATTE': 8, 'PERL6': 9}]}]}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): if x[1] == 1971: return 12 elif x[1] == 1988: return x1988(x) else: return x1950(x) def x4(x): if x[4] == 'NGINX': return 0 elif x[4] == 'MUF': return 1 else: return 2 def x1988(x): if x[3] == 'UNO': return 8 elif x[3] == 'GRACE': return 11 elif x[0] == 'GLSL': return 9 else: return 10 def x1950(x): if x[3] == 'GRACE': return 7 elif x[3] == 'GAMS': if x[0] == 'GLSL': return 5 else: return 6 elif x[2] == 'CSV': return 4 elif x[2] == 'MQL5': return 3 else: return x4(x)" "def main(args): dict3 = {1965: 0, 2012: 1, 1970: 2} dict33 = {1965: 3, 2012: 4, 1970: 5} dict0 = {1960: 7, 1992: 8, 1995: 9} dict2 = {1978: dict3[args[3]], 1973: dict33[args[3]]} dict22 = {1978: dict0[args[0]], 1973: 10} dict1 = {'CUDA': dict2[args[2]], 'ELM': 6, 'D': dict22[args[2]]} return dict1[args[1]]" "def third_first(s): if 'CLEAN' in s: return 0 elif 'RAML' in s: return 1 elif 'TWIG' in s: return 2 def third_second(s): if 'CLEAN' in s: return 3 elif 'RAML' in s: return 4 elif 'TWIG' in s: return 5 def third_third(s): if 2010 in s: return 6 elif 2007 in s: return 7 elif 1988 in s: return 8 def second_first(s): if 'WISP' in s: return third_first(s) elif 'EBNF' in s: return third_second(s) def second_second(s): if 'WISP' in s: return third_third(s) elif 'EBNF' in s: return 9 def main(s): if 1994 in s: return second_first(s) elif 1975 in s: return second_second(s)" "def zero(items, left, middle, right): if items[0] == 'MUPAD': return left if items[0] == 'MASK': return middle if items[0] == 'PAN': return right def one(items, left, right): if items[1] == 1981: return left if items[1] == 2011: return right def two(items, left, middle, right): if items[2] == 'MUF': return left if items[2] == 'METAL': return middle if items[2] == 'OZ': return right def three(items, left, middle, right): if items[3] == 1989: return left if items[3] == 1988: return middle if items[3] == 1990: return right def four(items, left, middle, right): if items[4] == 'GLYPH': return left if items[4] == 'JSON5': return middle if items[4] == 'STON': return right def main(items): return four(items, one(items, zero(items, 0, 1, 2), 3), one(items, three(items, 4, 5, two(items, 6, 7, 8)), 9), 10)" "def main(path): b = 0 match path[3]: case 'NIX': b = 10 case 'TEX': match path[1]: case 2010: b = 9 case 1999: match path[4]: case 1984: b = 4 case 1973: b = 5 case 2007: match path[2]: case 2004: b = 6 case 1984: b = 7 case 1973: b = 8 case _: return b case _: return b case _: return b case 'NINJA': match path[1]: case 2010: b = 3 case 1999: match path[4]: case 1984: b = 0 case 1973: b = 1 case 2007: b = 2 case _: return b case _: return b case _: return b return b" "def zero(items, left, middle, right): if items[0] == 2000: return left if items[0] == 2015: return middle if items[0] == 1987: return right def four(items, left, right): if items[4] == 2017: return left if items[4] == 1991: return right def three(items, left, middle, right): if items[3] == 1987: return left if items[3] == 1983: return middle if items[3] == 1965: return right def two(items, left, right): if items[2] == 'RED': return left if items[2] == 'METAL': return right def one(items, left, middle, right): if items[1] == 1972: return left if items[1] == 1969: return middle if items[1] == 1998: return right def main(items): return zero(items, four(items, one(items, two(items, 0, 1), 2, three(items, 3, 4, 5)), two(items, one(items, 6, 7, 8), one(items, 9, 10, 11))), 12, 13)" "def main(x): match x[3]: case 'CIRRU': match x[0]: case 1989: return 5 case 2014: return 4 case 2003: match x[2]: case 2006: return 3 case 1958: return 2 case 1980: match x[4]: case 1964: return 1 case 1993: return 0 case 'OZ': match x[4]: case 1993: return 6 case 1964: match x[1]: case 1964: return 7 case 1961: match x[0]: case 1989: return 10 case 2014: return 9 case 2003: return 8" "def main(x): ans = {'CMAKE': {'XPROC': {'LESS': {'ROUGE': 0, 'HLSL': 1, 'SQF': 2}, 'PUG': 3, 'SCAML': 4}, 'HTTP': {1970: {'ROUGE': 5, 'HLSL': 6, 'SQF': 7}, 1964: {'LESS': 8, 'PUG': 9, 'SCAML': 10}}}, 'TXL': 11} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] break return i" "def main(data: tuple): match data[4]: case 1969: return layer_1(data) case 1987: return 11 def layer_1(data: tuple): match data[1]: case 1999: return layer_2(data) case 2000: return layer_4(data) case 1987: return 10 def layer_2(data: tuple): match data[0]: case 'MASK': return layer_3(data) case 'PERL': return 3 def layer_3(data: tuple): match data[2]: case 1977: return 0 case 1994: return 1 case 2003: return 2 def layer_4(data: tuple): match data[0]: case 'MASK': return layer_5(data) case 'PERL': return layer_6(data) def layer_5(data: tuple): match data[2]: case 1977: return 4 case 1994: return 5 case 2003: return 6 def layer_6(data: tuple): match data[3]: case 2013: return 7 case 1994: return 8 case 1971: return 9" "from itertools import permutations tree = {'TEXT': {'IDRIS': {'HTML': 0, 'PUG': 1, 'SLIM': 2}, 'LSL': 3, 'JAVA': {1980: 4, 1985: 5}}, 'LUA': {'HTML': {1980: 6, 1985: 7}, 'PUG': 8, 'SLIM': {'IDRIS': 9, 'LSL': 10, 'JAVA': 11}}, 'JSON5': 12} def get_path(path): way = tree for key in path: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value def main(path): comb = list(permutations(path)) i = 0 x = None while x is None: x = get_path(comb[i]) i += 1 return x" "mass = ['3:NCL-2:IO-4:TEA-0:KIT', '3:NCL-2:IO-4:TEA-0:VALA', '3:NCL-2:IO-4:TEA-0:LEX', '3:NCL-2:IO-4:XSLT-0:KIT', '3:NCL-2:IO-4:XSLT-0:VALA', '3:NCL-2:IO-4:XSLT-0:LEX', '3:NCL-2:IO-4:GDB', '3:NCL-2:MAX-0:KIT', '3:NCL-2:MAX-0:VALA-4:TEA', '3:NCL-2:MAX-0:VALA-4:XSLT', '3:NCL-2:MAX-0:VALA-4:GDB', '3:NCL-2:MAX-0:LEX', '3:LOGOS'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def main(x): match x[1]: case 'SCALA': return 15 case 'GDB': match x[0]: case 2007: return 13 case 1998: return 14 case 2012: match x[3]: case 1994: return 12 case 1978: match x[4]: case 'JAVA': return 9 case 'XSLT': return 10 case 'REBOL': return 11 case 'MUF': match x[2]: case 1975: return 8 case 1985: match x[4]: case 'JAVA': return 5 case 'XSLT': return 6 case 'REBOL': return 7 case 2013: match x[0]: case 2012: return 0 case 2007: return 1 case 1998: match x[4]: case 'JAVA': return 2 case 'XSLT': return 3 case 'REBOL': return 4" "def zero(items, left, right): if items[0] == 'SAS': return left if items[0] == 'LOGOS': return right def four(items, left, middle, right): if items[4] == 1995: return left if items[4] == 1973: return middle if items[4] == 1983: return right def three(items, left, right): if items[3] == 1968: return left if items[3] == 1964: return right def two(items, left, right): if items[2] == 'NINJA': return left if items[2] == 'COOL': return right def one(items, left, middle, right): if items[1] == 2010: return left if items[1] == 1991: return middle if items[1] == 1981: return right def main(items): return one(items, four(items, zero(items, 0, three(items, 1, 2)), three(items, zero(items, 3, 4), zero(items, 5, 6)), 7), 8, zero(items, two(items, 9, 10), 11))" "def zero(items, left, middle, right): if items[0] == 'YACC': return left if items[0] == 'CUDA': return middle if items[0] == 'ELM': return right def four(items, left): if items[4] == 2017: return left def three(items, left, middle, right): if items[3] == 'HACK': return left if items[3] == 'KICAD': return middle if items[3] == 'MIRAH': return right def two(items, left, right): if items[2] == 'PLSQL': return left if items[2] == 'EAGLE': return right def one(items, left, middle, right): if items[1] == 2005: return left if items[1] == 2009: return middle if items[1] == 1992: return right def main(items): return three(items, one(items, zero(items, two(items, 0, 1), four(items, 2), 3), four(items, two(items, 4, 5)), two(items, zero(items, 6, 7, 8), zero(items, 9, 10, 11))), 12, 13)" "def zero(items, left, right): if items[0] == 1988: return left if items[0] == 1969: return right def one(items, left, right): if items[1] == 1971: return left if items[1] == 1965: return right def two(items, left, middle, right): if items[2] == 'SWIFT': return left if items[2] == 'PAN': return middle if items[2] == 'STATA': return right def three(items, left, right): if items[3] == 1957: return left if items[3] == 1993: return right def four(items, left, middle, right): if items[4] == 'FANCY': return left if items[4] == 'AWK': return middle if items[4] == 'DM': return right def main(items): return one(items, four(items, three(items, zero(items, 0, 1), two(items, 2, 3, 4)), 5, 6), two(items, four(items, 7, zero(items, 8, 9), 10), 11, 12))" "def main(args): dict1 = {'RAML': 0, 'GRACE': 1, 'LSL': 2} dict0 = {2000: 3, 2011: 4, 2005: 5} dict2 = {1973: dict1[args[1]], 1995: dict0[args[0]]} dict22 = {1973: 7, 1995: 8} dict3 = {'BISON': dict2[args[2]], 'HACK': 6} dict33 = {'BISON': dict22[args[2]], 'HACK': 9} dict4 = {1968: dict3[args[3]], 1975: dict33[args[3]], 2004: 10} return dict4[args[4]]" "from math import * def main(x): i = 0 if x[0] == 'XOJO': if x[3] == 'XTEND': if x[2] == 'ABNF': return 0 elif x[2] == 'EQ': return 1 return 2 return 3 if x[1] == 'HTTP': if x[2] == 'ABNF': return 4 elif x[2] == 'EQ': return 5 return 6 elif x[1] == 'APL': if x[3] == 'XTEND': return 7 return 8 return 9" "def zero(items, left, middle, right): if items[0] == 1991: return left if items[0] == 1968: return middle if items[0] == 1961: return right def four(items, left, middle, right): if items[4] == 1970: return left if items[4] == 2017: return middle if items[4] == 2020: return right def three(items, left, middle, right): if items[3] == 2014: return left if items[3] == 1992: return middle if items[3] == 2015: return right def two(items, left, right): if items[2] == 'GDB': return left if items[2] == 'VCL': return right def one(items, left, middle, right): if items[1] == 'SMALI': return left if items[1] == 'TEA': return middle if items[1] == 'ABNF': return right def main(items): return two(items, one(items, four(items, three(items, 0, 1, 2), 3, 4), zero(items, 5, 6, 7), four(items, zero(items, 8, 9, 10), 11, 12)), 13)" "def zero(items, left, middle, right): if items[0] == 1981: return left if items[0] == 2005: return middle if items[0] == 1978: return right def one(items, left, right): if items[1] == 1974: return left if items[1] == 1983: return right def two(items, left, middle, right): if items[2] == 2011: return left if items[2] == 1969: return middle if items[2] == 2003: return right def three(items, left, right): if items[3] == 1963: return left if items[3] == 1972: return right def four(items, left, middle, right): if items[4] == 'CIRRU': return left if items[4] == 'TCSH': return middle if items[4] == 'LEAN': return right def main(items): return two(items, zero(items, four(items, 0, three(items, 1, 2), 3), 4, 5), one(items, 6, 7), four(items, one(items, three(items, 8, 9), 10), 11, 12))" "def zero(items, left, right): if items[0] == 1979: return left if items[0] == 2000: return right def one(items, left, right): if items[1] == 'DYLAN': return left if items[1] == 'NSIS': return right def two(items, left, middle, right): if items[2] == 'XBASE': return left if items[2] == 'MUF': return middle if items[2] == 'NL': return right def three(items, left, right): if items[3] == 'SQL': return left if items[3] == 'HCL': return right def four(items, left, middle, right): if items[4] == 2000: return left if items[4] == 1970: return middle if items[4] == 1990: return right def main(items): return four(items, zero(items, two(items, one(items, 0, 1), 2, three(items, 3, 4)), 5), zero(items, 6, three(items, two(items, 7, 8, 9), 10)), 11)" "def zero(items, left, right): if items[0] == 'SCALA': return left if items[0] == 'ADA': return right def one(items, left, middle, right): if items[1] == 'EC': return left if items[1] == 'YANG': return middle if items[1] == 'PERL': return right def two(items, left, middle, right): if items[2] == 1961: return left if items[2] == 2008: return middle if items[2] == 1984: return right def four(items, left, middle, right): if items[4] == 2001: return left if items[4] == 1980: return middle if items[4] == 1991: return right def main(items): return zero(items, one(items, two(items, 0, four(items, 1, 2, 3), 4), four(items, two(items, 5, 6, 7), two(items, 8, 9, 10), 11), 12), 13)" "def zero(items, left, middle, right): if items[0] == 'STON': return left if items[0] == 'QMAKE': return middle if items[0] == 'TCSH': return right def four(items, left, right): if items[4] == 1980: return left if items[4] == 1992: return right def three(items, left, right): if items[3] == 'XOJO': return left if items[3] == 'JSX': return right def two(items, left, right): if items[2] == 'NCL': return left if items[2] == 'ARC': return right def one(items, left, middle, right): if items[1] == 'YANG': return left if items[1] == 'GAP': return middle if items[1] == 'OCAML': return right def main(items): return four(items, zero(items, three(items, two(items, 0, 1), one(items, 2, 3, 4)), 5, three(items, 6, two(items, 7, 8))), one(items, 9, 10, 11))" "def main(x): if x[4] == 2008: return 11 elif x[4] == 2018: if x[1] == 'GO': if x[0] == 2007: return 0 elif x[0] == 2014: return choice3(x[3], 1) elif x[1] == 'VCL': if x[3] == 'SAS': return 3 elif x[3] == 'VHDL': return choice2(x[2], 4) else: return 7 else: return choice1(x[1], 8) def choice1(cond, x): if cond == 'GO': return x elif cond == 'VCL': return x + 1 return x + 2 def choice2(cond, x): if cond == 1993: return x elif cond == 1992: return x + 1 return x + 2 def choice3(cond, x): if cond == 'SAS': return x return x + 1" "from typing import List tree = {'1972': {'2012': {'2019': {'LSL': 0, 'YANG': 1}, '1990': 2, '2007': 3}, '2014': {'2019': 4, '1990': {'LSL': 5, 'YANG': 6}, '2007': 7}, '1992': {'LSL': {'1969': 8, '2017': 9}, 'YANG': 10}}, '1957': 11} def main(arr): global tree a = tree while True: for item in arr[::-1]: k = str(item) if k in a.keys(): a = a[k] if isinstance(a, int): return a" "def main(x): if x[1] == 2011: return ['RED', 'ALLOY', 'SLASH'].index(x[0]) elif x[1] == 2020: if x[2] == 1973: return ['M4', 'SMALL'].index(x[3]) + 4 return 3 else: if x[0] == 'RED': if x[3] == 'M4': return [1983, 1973].index(x[2]) + 6 return 8 elif x[0] == 'ALLOY': return ['M4', 'SMALL'].index(x[3]) + 9 return 11" "import math class element: def __init__(self, name, children, code): self.name = name self.children = children self.code = code def main(var): tree = [] tree.append(element('x1', ['x2', 'x5'], ['E', 'HY'])) tree.append(element('x2', ['x3', 4, 5], [1979, 1990, 2020])) tree.append(element('x3', [0, 'x4'], ['ECL', 'GDB'])) tree.append(element('x4', [1, 2, 3], [1988, 1984, 1986])) tree.append(element('x5', [6, 'x6', 9], [1988, 1984, 1986])) tree.append(element('x6', [7, 8], ['ECL', 'GDB'])) i = 0 j = 0 while i != -1: if var[j] in tree[i].code: x = 0 for elem in tree: if elem.name == tree[i].children[tree[i].code.index(var[j])]: i = x break else: x += 1 if x == len(tree): return tree[i].children[tree[i].code.index(var[j])] break else: j += 1 if j == len(var): j = 0" "def zero(items, top, middle, bottom): if items[0] == 'JFLEX': return top if items[0] == 'RED': return middle if items[0] == 'TCL': return bottom def one(items, top, middle, bottom): if items[1] == 'NIM': return top if items[1] == 'RAGEL': return middle if items[1] == 'SQL': return bottom def two(items, top, middle, bottom): if items[2] == 2001: return top if items[2] == 1957: return middle if items[2] == 2013: return bottom def three(items, top, middle, bottom): if items[3] == 'APL': return top if items[3] == 'TXL': return middle if items[3] == 'GLYPH': return bottom def four(items, top, bottom): if items[4] == 2003: return top if items[4] == 1966: return bottom def main(items): return two(items, zero(items, four(items, 0, one(items, 1, 2, 3)), one(items, four(items, 4, 5), 6, 7), 8), zero(items, three(items, 9, 10, 11), 12, 13), 14)" "class element: def __init__(self, name, children, code): self.name = name self.children = children self.code = code def main(var): tree = [] tree.append(element('x1', ['x2', 11], ['URWEB', 'NCL'])) tree.append(element('x2', ['x3', 'x4', 'x5'], ['BLADE', 'XOJO', 'FORTH'])) tree.append(element('x3', [0, 'x6'], ['COBOL', 'HTTP'])) tree.append(element('x4', [4, 5], [1979, 1995])) tree.append(element('x5', ['x7', 8, 'x8'], ['PERL', 'JSON', 'APL'])) tree.append(element('x6', [1, 2, 3], ['PERL', 'JSON', 'APL'])) tree.append(element('x7', [6, 7], ['COBOL', 'HTTP'])) tree.append(element('x8', [9, 10], ['COBOL', 'HTTP'])) i = 0 j = 0 while i != -1: if var[j] in tree[i].code: x = 0 for elem in tree: if elem.name == tree[i].children[tree[i].code.index(var[j])]: i = x break else: x += 1 if x == len(tree): return tree[i].children[tree[i].code.index(var[j])] break else: j += 1 if j == len(var): j = 0" "def main(x): match x[0]: case 1992: match x[2]: case 2013: match x[3]: case 'NGINX': match x[1]: case 'SQLPL': return 0 case 'R': return 1 case 'OCAML': return 2 case 'XC': return 3 case 'TLA': match x[4]: case 2000: return 4 case 1957: return 5 case 1962: match x[4]: case 2000: return 6 case 1957: return 7 case 2009: match x[1]: case 'SQLPL': match x[4]: case 2000: return 8 case 1957: return 9 case 'R': return 10 case 'OCAML': return 11 case 1972: return 12 case 1987: return 13" "def main_third_layer(x): if x[3] == 2015: return 4 elif x[3] == 2020: return 5 elif x[3] == 1975: return 6 def main_second_layer(x): if x[0] == 'GRACE': return 0 elif x[0] == 'IDRIS': return 1 elif x[0] == 'ECL': return 2 def alt_second_layer(x): if x[0] == 'GRACE': return main_third_layer(x) elif x[0] == 'IDRIS': return 7 elif x[0] == 'ECL': return 8 def first_layer(x): if x[1] == 'RUST': return main_second_layer(x) elif x[1] == 'HYPHY': return 3 elif x[1] == 'IO': return alt_second_layer(x) def main(x): if x[2] == 1969: return first_layer(x) elif x[2] == 1971: return 9 elif x[2] == 2011: return 10 main(['ECL', 'IO', 2011, 2015, 'HAML'])" "def main(args): dict2 = {'NGINX': 0, 'HTTP': 1, 'YANG': 2} dict0 = {'NESC': 3, 'TERRA': 4} dict00 = {'NESC': 5, 'TERRA': 6} dict3 = {'ELM': 7, 'POD': 8, 'EAGLE': 9} dict3_up = {'ELM': dict2[args[2]], 'POD': dict0[args[0]], 'EAGLE': dict00[args[0]]} dict2_up = {'NGINX': dict3[args[3]], 'HTTP': 10, 'YANG': 11} dict4 = {'OPAL': dict3_up[args[3]], 'PERL6': dict2_up[args[2]], 'ORG': 12} dict1 = {'ASN.1': dict4[args[4]], 'CUDA': 13} return dict1[args[1]]" "map = {'i': 0, 1998: {'i': 4, 1985: {'i': 2, 2012: {'i': 3, 'INI': 0, 'OPAL': 1}, 1970: {'i': 1, 2017: 2, 1965: 3, 2011: 4}}, 1967: {'i': 1, 2017: {'i': 3, 'INI': 5, 'OPAL': 6}, 1965: 7, 2011: 8}, 1957: 9}, 2005: 10, 1971: 11} def main(arr): current = map[arr[0]] while type(current) != int: current = current[arr[current['i']]] return current" "map = {'i': 3, 'XC': {'i': 1, 'RAML': {'i': 2, 'ANTLR': {'i': 0, 'HTML': 0, 'LOGOS': 1}, 'HAML': {'i': 4, 2014: 2, 1986: 3, 1979: 4}, 'SQF': {'i': 4, 2014: 5, 1986: 6, 1979: 7}}, 'HAXE': 8}, 'PHP': 9} def main(arr): current = map[arr[3]] while type(current) != int: current = current[arr[current['i']]] return current main(['LOGOS', 'RAML', 'ANTLR', 'PHP', 1979]) main(['LOGOS', 'HAXE', 'ANTLR', 'XC', 1979])" "v6 = {'i': 1, '2016': {'i': 3, '1993': {'i': 0, 'NIX': 0, 'TCSH': 1, 'VUE': 2}, '2000': {'i': 2, 'INI': 3, 'EBNF': 4, 'CSV': 5}}, '2019': {'i': 0, 'NIX': 6, 'TCSH': {'i': 3, '1993': 7, '2000': 8}, 'VUE': {'i': 3, '1993': 9, '2000': 10}}, '2005': 11} def main(arr): current = v6[str(arr[1])] while type(current) != int: current = current[str(arr[current['i']])] return current" "def main(x): match x[3]: case 1982: match x[0]: case 1978: match x[1]: case 2013: return 0 case 1958: return 1 case 2011: return 2 case 1970: return 3 case 1961: return 4 case 1995: match x[0]: case 1970: return 7 case 1978: match x[2]: case 1987: return 5 case 1960: return 6 case 1961: match x[2]: case 1987: return 8 case 1960: return 9 case 2005: return 10" "def main(a): if a[2] == 2009: return up(a) elif a[2] == 1958: return 11 elif a[2] == 2005: return 12 def up(a): if a[0] == 1979: return numpy(a) elif a[0] == 2011: return gn(a) elif a[0] == 2006: return 10 def numpy(a): if a[4] == 'COQ': return 0 elif a[4] == 'GN': if a[3] == 'NUMPY': return 1 elif a[3] == 'KICAD': return 2 elif a[4] == 'PIKE': return 3 def gn(a): if a[3] == 'NUMPY': if a[4] == 'COQ': return 4 elif a[4] == 'GN': return 5 elif a[4] == 'PIKE': return 6 elif a[3] == 'KICAD': return kicad(a) def kicad(a): if a[1] == 'ALLOY': return 7 elif a[1] == 'XSLT': return 8 elif a[1] == 'ABAP': return 9" "def x_0(data_arr): if data_arr[0] == 'ROUGE': return x_2_1(data_arr) if data_arr[0] == 'NGINX': return x_2_2(data_arr) return 6 def x_1(data_arr): if data_arr[1] == 1976: return x_0(data_arr) return x_3(data_arr) def x_2_1(data_arr): if data_arr[2] == 1971: return 0 if data_arr[2] == 1998: return 1 return 2 def x_2_2(data_arr): if data_arr[2] == 1971: return 3 if data_arr[2] == 1998: return 4 return 5 def x_2_3(data_arr): if data_arr[2] == 1971: return 8 if data_arr[2] == 1998: return 9 return 10 def x_3(data_arr): if data_arr[3] == 'ADA': return 7 elif data_arr[3] == 'UNO': return x_2_3(data_arr) else: return 11 def main(data_arr): return x_1(data_arr)" "def main(x): match x[2]: case 'OPA': match x[4]: case 'SQL': match x[0]: case 1976: match x[3]: case 2003: return 0 case 1986: return 1 case 2016: match x[3]: case 2003: return 2 case 1986: return 3 case 'HTML': return 4 case 'GAP': match x[1]: case 2009: match x[3]: case 2003: match x[4]: case 'SQL': return 5 case 'HTML': return 6 case 1986: match x[4]: case 'SQL': return 7 case 'HTML': return 8 case 2003: match x[0]: case 1976: match x[3]: case 2003: return 9 case 1986: return 10 case 2016: return 11 case 'MASK': return 12" "def main(x): if x[0] == 'SELF': if x[3] == 1980: if x[1] == 2015: return {1976: 2, 1961: 3}[x[4]] return {1978: 0, 1994: 1}[x[1]] elif x[3] == 1963: if x[4] == 1976: return {1978: 4, 1994: 5, 2015: 6}[x[1]] return 7 elif x[0] == 'FREGE': if x[4] == 1976: if x[2] == 'RAGEL': return {1978: 8, 1994: 9, 2015: 10}[x[1]] return {'XTEND': 11, 'HCL': 12}[x[2]] return 13" "def zero(items, left, middle, right): if items[0] == 1970: return left if items[0] == 2012: return middle if items[0] == 1965: return right def one(items, left, right): if items[1] == 'INI': return left if items[1] == 'HYPHY': return right def two(items, left, right): if items[2] == 1971: return left if items[2] == 1985: return right def three(items, left, right): if items[3] == 1974: return left if items[3] == 1985: return right def four(items, left, right): if items[4] == 'COQ': return left if items[4] == 'XS': return right def main(items): return two(items, zero(items, one(items, 0, four(items, 1, 2)), four(items, one(items, 3, 4), one(items, 5, 6)), three(items, 7, one(items, 8, 9))), 10)" "def main(x): ans = {1982: {2008: {'OPA': {'STAN': 0, 'GAMS': 1, 'LFE': 2}, 'IO': 3}, 1986: {'OPA': 4, 'IO': {'HTML': 5, 'IDL': 6, 'LEAN': 7}}}, 1960: {2008: 8, 1986: 9}, 1993: 10} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] break return i" "def main(res): ans = {3: {1979: 13, 1992: {0: {'STAN': 12, 'MIRAH': 11, 'ASN.1': {2: {'PERL6': {1: {'TERRA': 8, 'CLEAN': 9}}, 'XPROC': 10}}}}, 2009: {2: {'XPROC': {4: {'SCALA': 7, 'JAVA': {1: {'TERRA': 5, 'CLEAN': 6}}, 'POD': 4}}, 'PERL6': {1: {'CLEAN': 3, 'TERRA': {0: {'STAN': 2, 'MIRAH': 1, 'ASN.1': 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): if x[1] == 2016: return 11 elif x[1] == 1997: return 10 else: return x0(x) def x0(x): if x[0] == 1963: return 9 elif x[0] == 1977: return dx4(x) else: return ux2(x) def dx4(x): if x[4] == 1967: return 8 elif x[4] == 2009: return x3(x) else: return dx2(x) def x3(x): if x[3] == 2012: return 7 else: return 6 def dx2(x): if x[2] == 2009: return 5 else: return 4 def ux2(x): if x[2] == 2009: return ux4(x) else: return 0 def ux4(x): if x[4] == 1967: return 3 elif x[2] == 2009: return 2 else: return 1" "def zero(items, left, right): if items[0] == 1990: return left if items[0] == 2010: return right def four(items, left, right): if items[4] == 1960: return left if items[4] == 2019: return right def two(items, left, middle, right): if items[2] == 'NSIS': return left if items[2] == 'LSL': return middle if items[2] == 'DYLAN': return right def one(items, left, middle, right): if items[1] == 1996: return left if items[1] == 2004: return middle if items[1] == 1984: return right def main(items): return one(items, two(items, zero(items, 0, 1), zero(items, 2, four(items, 3, 4)), four(items, 5, 6)), two(items, 7, 8, four(items, 9, 10)), 11)" "def main(x): if x[1] == 2002: if x[0] == 'GOSU': return 6 elif x[0] == 'LLVM': if x[4] == 'SCAML': return 4 elif x[4] == 'QMAKE': return 5 elif x[0] == 'XSLT': return helper(x, 0) elif x[1] == 1969: if x[2] == 1978: return 7 elif x[2] == 1973: return helper(x, 8) def helper(x, n): if x[3] == 'LESS': return n + 2 elif x[3] == 'CMAKE': return n + 3 elif x[3] == 'SAGE': if x[4] == 'SCAML': return n elif x[4] == 'QMAKE': return n + 1" "def main(x): if x[1] == 1995: if x[3] == 'NGINX': return {'NIT': 0, 'BRO': 1, 'MUF': 2}[x[2]] elif x[3] == 'LESS': return {'NIT': 3, 'BRO': 4, 'MUF': 5}[x[2]] elif x[3] == 'MAKO': return {2013: 6, 2016: 7}[x[0]] elif x[1] == 1982: if x[3] == 'LESS': return {'NIT': 9, 'BRO': 10, 'MUF': 11}[x[2]] elif x[3] == 'NGINX': return 8 elif x[3] == 'MAKO': return 12" "def main(x): match x[2]: case 2016: match x[3]: case 2002: match x[0]: case 1972: match x[4]: case 'ROUGE': return 0 case 'APEX': return 1 case 1993: return 2 case 1993: match x[4]: case 'ROUGE': match x[0]: case 1972: return 3 case 1993: return 4 case 'APEX': return 5 case 2012: match x[4]: case 'ROUGE': return 6 case 'APEX': match x[1]: case 1972: return 7 case 2019: match x[3]: case 2002: return 8 case 1993: return 9 case 2011: return 10" "def zero(items, left, right): if items[0] == 'REXX': return left if items[0] == 'SAGE': return right def four(items, left, right): if items[4] == 'OOC': return left if items[4] == 'M': return right def three(items, left, right): if items[3] == 'COOL': return left if items[3] == 'ATS': return right def two(items, left, middle, right): if items[2] == 2012: return left if items[2] == 1974: return middle if items[2] == 1959: return right def one(items, left, middle, right): if items[1] == 'VHDL': return left if items[1] == 'XSLT': return middle if items[1] == 'FISH': return right def main(items): return zero(items, two(items, three(items, four(items, 0, 1), one(items, 2, 3, 4)), one(items, three(items, 5, 6), four(items, 7, 8), three(items, 9, 10)), 11), 12)" "def zero(items, left, right): if items[0] == 1980: return left if items[0] == 2020: return right def four(items, left, middle, right): if items[4] == 'ASN.1': return left if items[4] == 'ARC': return middle if items[4] == 'XBASE': return right def three(items, left, right): if items[3] == 1968: return left if items[3] == 1970: return right def two(items, left, middle, right): if items[2] == 2015: return left if items[2] == 1983: return middle if items[2] == 1997: return right def one(items, left, middle, right): if items[1] == 'LOGOS': return left if items[1] == 'PIKE': return middle if items[1] == 'HTTP': return right def main(items): return two(items, zero(items, one(items, 0, three(items, 1, 2), 3), 4), four(items, 5, zero(items, one(items, 6, 7, 8), three(items, 9, 10)), 11), 12)" "def one(items, left, right): if items[1] == 1994: return left if items[1] == 1985: return right def zero(items, left, middle, right): if items[0] == 'MESON': return left if items[0] == 'GRACE': return middle if items[0] == 'GAP': return right def two(items, left, right): if items[2] == 2001: return left if items[2] == 1972: return right def three(items, left, right): if items[3] == 'JSON5': return left if items[3] == 'PONY': return right def main(items): return zero(items, one(items, two(items, three(items, 0, 1), three(items, 2, 3)), three(items, two(items, 4, 5), two(items, 6, 7))), 8, 9)" "def one(items, left, right): if items[1] == 1992: return right return left def two(items, left, right): if items[0] == 'RAGEL': return left return right def three(items, left, right): if items[2] == 2018: return right return left def four(items, left, middle, right): if items[4] == 1972: return left if items[4] == 1967: return middle return right def five(items, left, right): if items[2] == 2010: return left return right def six(items, left, middle, right): if items[3] == 1975: return left if items[3] == 2014: return middle return right def seven(items, left, middle, right): if items[3] == 1975: return left if items[3] == 2014: return middle return right def main(items): return one(items, two(items, three(items, four(items, 0, 1, 2), 3), five(items, six(items, 4, 5, 6), seven(items, 7, 8, 9))), 10)" "def main(args): dict2 = {1982: 0, 2003: 1} dict1 = {2001: 3, 2003: 4} dict0 = {'OOC': 6, 'SELF': 7, 'NGINX': 8} dict0_up = {'OOC': dict2[args[2]], 'SELF': 2, 'NGINX': dict1[args[1]]} dict2_up = {1982: 5, 2003: dict0[args[0]]} dict22_up = {1982: 9, 2003: 10} dict3 = {'D': dict0_up[args[0]], 'TEX': dict2_up[args[2]]} dict1_up = {2001: dict22_up[args[2]], 2003: 11} dict4 = {'LEAN': dict3[args[3]], 'VUE': dict1_up[args[1]]} return dict4[args[4]]" "def main(x): if x[3] == 'X10': if x[2] == 'VHDL': return {1998: 0, 2007: 1}[x[0]] elif x[2] == 'COOL': return {1998: 2, 2007: 3}[x[0]] elif x[2] == 'PAN': return {1985: 4, 1977: 5}[x[1]] elif x[3] == 'ROFF': if x[1] == 1985: return {'VHDL': 6, 'COOL': 7, 'PAN': 8}[x[2]] else: return 9 else: return 10" "def main(res): ans = {1: {1961: 13, 1994: {4: {'RUBY': {0: {2012: 11, 2000: 10, 1959: 9}}, 'APL': 12}}, 1959: {2: {2016: 8, 1974: 7, 2001: {3: {2011: 6, 1958: {0: {2012: 5, 2000: 4, 1959: 3}}, 1976: {0: {2012: 2, 2000: 1, 1959: 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero(items, left, right, centr): if items[0] == 1987: return left elif items[0] == 1989: return centr elif items[0] == 2015: return right def two(items, left, right): if items[2] == 2015: return left elif items[2] == 1984: return right def one(items, left, right): if items[1] == 'AGDA': return left elif items[1] == 'BISON': return right def three(items, left, right, centr): if items[3] == 'URWEB': return left elif items[3] == 'HAXE': return centr elif items[3] == 'HACK': return right def main(items): return one(items, three(items, zero(items, 0, 2, 1), 4, 3), three(items, zero(items, 5, 7, 6), 10, two(items, 8, 9)))" "def main(x): dict4 = {2008: lambda : 0, 1974: lambda : dict1[x[1]]()} dict1 = {'MQL5': lambda : 1, 'GO': lambda : 2} dict2 = {'ROUGE': lambda : 3, 'CSS': lambda : dict12[x[1]](), 'GN': lambda : dict41[x[4]]()} dict12 = {'MQL5': lambda : 4, 'GO': lambda : 5} dict41 = {2008: lambda : 6, 1974: lambda : 7} dict42 = {2008: lambda : 8, 1974: lambda : dict21[x[2]]()} dict21 = {'ROUGE': lambda : 9, 'CSS': lambda : 10, 'GN': lambda : 11} dict0 = {'M': lambda : dict4[x[4]](), 'MESON': lambda : dict2[x[2]](), 'FISH': lambda : dict42[x[4]]()} dict3 = {'ATS': lambda : dict0[x[0]](), 'MTML': lambda : 12} return dict3[x[3]]()" "def main(x): dict4 = {'TOML': lambda : 0, 'PUG': lambda : 1} dict5 = {'VUE': lambda : 3, 'GDB': lambda : 4} dict6 = {'TOML': lambda : 2, 'PUG': lambda : dict5[x[3]]()} dict7 = {'RHTML': lambda : dict6[x[1]](), 'SWIFT': lambda : dict4[x[1]]()} dict8 = {2019: lambda : 6, 1969: lambda : 7} dict11 = {'VUE': lambda : 8, 'GDB': lambda : 9} dict10 = {'RHTML': lambda : dict11[x[3]](), 'SWIFT': lambda : dict8[x[0]]()} dict3 = {'TOML': lambda : 5, 'PUG': lambda : dict10[x[2]]()} dict13 = {'CIRRU': lambda : dict7[x[2]](), 'EBNF': lambda : dict3[x[1]]()} return dict13[x[4]]()" "def main(x): match x[3]: case 1994: match x[4]: case 2005: match x[0]: case 'J': match x[1]: case 'PAN': return 0 case 'MESON': return 1 case 'RDOC': return 2 case 'JSX': return 3 case 2002: match x[0]: case 'J': match x[1]: case 'PAN': return 4 case 'MESON': return 5 case 'RDOC': return 6 case 'JSX': return 7 case 1993: match x[0]: case 'J': return 8 case 'JSX': return 9 case 1972: return 10 case 2012: return 11" "def main(x): match x[2]: case 'MAX': match x[0]: case 'SVG': match x[1]: case 'NU': return 0 case 'XML': match x[4]: case 2020: return 1 case 1972: return 2 case 'DIFF': match x[3]: case 'TOML': return 3 case 'TCSH': match x[1]: case 'NU': return 4 case 'XML': return 5 case 'JSON5': match x[3]: case 'TOML': return 6 case 'TCSH': match x[1]: case 'NU': return 7 case 'XML': return 8 case 'VOLT': return 9" "def main(x): match x[0]: case 2001: match x[3]: case 1968: match x[4]: case 1993: match x[1]: case 'FORTH': return 0 case 'SHELL': return 1 case 1982: return 2 case 2000: return 3 case 1961: match x[4]: case 1993: match x[1]: case 'FORTH': return 4 case 'SHELL': return 5 case 1982: return 6 case 2000: return 7 case 1999: return 8 case 1958: match x[3]: case 1968: return 9 case 1961: return 10 case 1999: return 11" "def main(x): match x[2]: case 1957: match x[0]: case 'NIM': match x[3]: case 'SASS': return 0 case 'COQ': return 1 case 'DIFF': match x[1]: case 'LESS': return 2 case 'JFLEX': return 3 case 'FANCY': return 4 case 'JSON': return 5 case 1962: return 6 case 1981: match x[0]: case 'NIM': return 7 case 'DIFF': return 8 case 'JSON': match x[3]: case 'SASS': return 9 case 'COQ': return 10" "def zero(items, left, middle, right): if items[0] == 2018: return left if items[0] == 2011: return middle if items[0] == 2001: return right def four(items, left, middle, right): if items[4] == 'AMPL': return left if items[4] == 'METAL': return middle if items[4] == 'DIFF': return right def three(items, left, middle, right): if items[3] == 1970: return left if items[3] == 1982: return middle if items[3] == 2015: return right def two(items, left, middle, right): if items[2] == 'ORG': return left if items[2] == 'CSV': return middle if items[2] == 'SASS': return right def one(items, left, right): if items[1] == 1993: return left if items[1] == 1965: return right def main(items): return one(items, three(items, four(items, 0, zero(items, 1, 2, 3), two(items, 4, 5, 6)), zero(items, four(items, 7, 8, 9), 10, 11), 12), 13)" "def choicex0(cond, x): if cond == 1975: return x elif cond == 1977: return x + 1 return x + 2 def choicex3(cond, x): if cond == 'EAGLE': return x elif cond == 'HAXE': return x + 1 return x + 2 def main(x): if x[2] == 'YACC': if x[1] == 2011: if x[4] == 2018: return choicex0(x[0], 0) return choicex0(x[0], 3) elif x[1] == 1989: if x[4] == 2018: return choicex0(x[0], 6) return choicex3(x[3], 9) return 12 return 13" "def zero(items, left, middle, right): if items[0] == 'M4': return left if items[0] == 'TLA': return middle if items[0] == 'ELM': return right def four(items, left, right): if items[4] == 'STON': return left if items[4] == 'SHELL': return right def three(items, left, middle, right): if items[3] == 'XML': return left if items[3] == 'GOSU': return middle if items[3] == 'HACK': return right def two(items, left, middle, right): if items[2] == 'ABNF': return left if items[2] == 'YACC': return middle if items[2] == 'GDB': return right def one(items, left, right): if items[1] == 1966: return left if items[1] == 1969: return right def main(items): return three(items, two(items, one(items, 0, zero(items, 1, 2, 3)), 4, 5), 6, zero(items, one(items, four(items, 7, 8), two(items, 9, 10, 11)), 12, 13))" "def choicex1(cond, x): if cond == 1985: return x elif cond == 1987: return x + 1 return x + 2 def choicex0(cond, x): if cond == 'ALLOY': return x elif cond == 'GOSU': return x + 1 return x + 2 def main(x): if x[3] == 1984: if x[2] == 'EC': return choicex0(x[0], 0) elif x[2] == 'JSX': return 3 return 4 else: if x[2] == 'EC': return choicex1(x[1], 5) elif x[2] == 'JSX': return 8 return choicex1(x[1], 9)" "def zero(items, left, middle, right): if items[0] == 2011: return left if items[0] == 2012: return middle if items[0] == 1964: return right def three(items, left, right): if items[3] == 1977: return left if items[3] == 1969: return right def two(items, left, right): if items[2] == 'MUPAD': return left if items[2] == 'PUG': return right def one(items, left, middle, right): if items[1] == 'PUG': return left if items[1] == 'XPROC': return middle if items[1] == 'M4': return right def main(items): return one(items, zero(items, two(items, 0, 1), two(items, 2, 3), three(items, 4, 5)), three(items, 6, zero(items, 7, 8, 9)), 10)" "from typing import List derevo = {'OX': {'DM': {'1978': 0, '1960': 1, '1958': 2}, 'VOLT': {'1978': 4, '1960': 5, '1958': 6}, 'XPROC': 3}, 'PLSQL': {'DM': 8, 'XPROC': 9, 'VOLT': 10}, 'RHTML': 7} def main(arr: List) -> int: global derevo a = derevo while True: for item in arr[::-1]: k = str(item) if k in a.keys(): a = a[k] if isinstance(a, int): return a" "def choicex1(cond, x): if cond == 2012: return x elif cond == 1966: return x + 1 return x + 2 def choicex2(cond, x): if cond == 'HCL': return x return x + 1 def main(x): if x[3] == 2002: if x[4] == 'FREGE': if x[2] == 'HCL': return choicex1(x[1], 0) return 3 elif x[4] == 'OPAL': if x[0] == 'GENIE': return choicex2(x[2], 5) return choicex1(x[1], 7) return 4 elif x[3] == 2004: return 10 return 11" "def choicex0(cond, x): if cond == 'MINID': return x return x + 1 def choicex1(cond, x): if cond == 1994: return x elif cond == 1965: return x + 1 return x + 2 def choicex3(cond, x): if cond == 2010: return x return x + 1 def main(x): if x[4] == 'BISON': if x[2] == 'OZ': if x[1] == 1994: return choicex3(x[3], 0) elif x[1] == 1960: return choicex3(x[3], 3) return 2 elif x[2] == 'EQ': if x[3] == 2010: return choicex1(x[1], 5) return choicex0(x[0], 8) return 10 return 11" "def three(items, left, middle, right): if items[3] == 'RHTML': return left if items[3] == 'FANCY': return middle if items[3] == 'XC': return right def two(items, left, middle, right): if items[2] == 'LEAN': return left if items[2] == 'OCAML': return middle if items[2] == 'GAP': return right def one(items, left, right): if items[1] == 'RED': return left if items[1] == 'EAGLE': return right def zero(items, left, middle, right): if items[0] == 'GDB': return left if items[0] == 'MAX': return middle if items[0] == 'KRL': return right def main(items): return zero(items, one(items, two(items, three(items, 0, 1, 2), 3, three(items, 4, 5, 6)), 7), 8, one(items, 9, 10))" "def main(x): dict_x11 = dict([('JSON', 0), ('TCSH', 1), ('TLA', 2)]) dict_x12 = dict([('JSON', 6), ('TCSH', 7), ('TLA', 8)]) dict_x01 = dict([(2002, dict_x11), (2019, 3), (1967, 4)]) dict_x02 = dict([(2002, dict_x12), (2019, 9), (1967, 10)]) dict_x3 = dict([(2019, dict_x01), (2013, 5), (1975, dict_x02)]) tmp = 0 if str(dict_x3.get(x[3])).isdigit(): return dict_x3.get(x[3]) else: tmp = dict_x3.get(x[3]) if str(tmp.get(x[0])).isdigit(): return tmp.get(x[0]) else: tmp = tmp.get(x[0]) return tmp.get(x[1])" "def f1(x): if x[1] == 'GLYPH': if x[0] == 'MUF': return f4(x) elif x[0] == 'CUDA': return 3 elif x[1] == 'RUST': return 4 elif x[1] == 'OX': return f5(x) def f5(x): if x[0] == 'MUF': return 5 elif x[0] == 'CUDA': return 6 def f4(x): if x[4] == 'ASP': return 0 elif x[4] == 'TEA': return 1 elif x[4] == 'LATTE': return 2 def f3(x): if x[1] == 'GLYPH': return 9 if x[1] == 'RUST': return 10 if x[1] == 'OX': return 11 def f2(x): if x[0] == 'MUF': if x[2] == 2008: return 7 elif x[2] == 1993: return 8 elif x[2] == 2000: return f3(x) elif x[0] == 'CUDA': return 12 def f_intermediate(x): if x[3] == 2019: return f1(x) elif x[3] == 1960: return f2(x) elif x[3] == 2009: return 13 def main(x): return f_intermediate(x)" "from typing import List derevo = {'2008': {'HTML': {'1968': 0, '1965': 1, '1966': 2}, 'GLSL': {'1968': 3, '1965': 4, '1966': 5}, 'COQ': {'1981': 6, '1958': 7, '2008': 8}}, '1960': {'1968': {'HTML': 9, 'GLSL': 10, 'COQ': 11}, '1965': 12, '1966': 13}, '1977': 14} def main(arr: List) -> int: global derevo a = derevo while True: for item in arr[::-1]: k = str(item) if k in a.keys(): a = a[k] if isinstance(a, int): return a" "items = [] def x_in_zero(left, middle, right): if items[0] == 1986: return left if items[0] == 1962: return middle if items[0] == 2009: return right def x_in_one(left, right): if items[1] == 'URWEB': return left if items[1] == 'JFLEX': return right def x_in_two(left, middle, right): if items[2] == 'MQL4': return left if items[2] == 'LESS': return middle if items[2] == 'COOL': return right def x_in_three(left, right): if items[3] == 'GN': return left if items[3] == 'HYPHY': return right def main(spis): global items items = spis return x_in_three(x_in_zero(x_in_two(0, x_in_one(1, 2), 3), x_in_two(4, x_in_one(5, 6), 7), 8), 9)" "def main(path): b = 0 match path[3]: case 'PERL': b = 12 case 'XTEND': match path[4]: case 1981: b = 11 case 2009: b = 10 case 1965: b = 9 case 'TWIG': match path[2]: case 'NIX': b = 8 case 'NIT': b = 7 case 'XS': match path[1]: case 1983: b = 6 case 1961: match path[0]: case 'VHDL': b = 5 case 'CLIPS': b = 4 case 'EJS': b = 3 case _: return b case 2014: match path[0]: case 'VHDL': b = 2 case 'CLIPS': b = 1 case 'EJS': b = 0 case _: return b case _: return b case _: return b case _: return b return b" "from inspect import currentframe def main(z): def h(arg, lst=None): if arg == 'IDL': return 8 elif arg == 'ASP': return 9 elif arg == 'TOML': return 10 else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def g(arg, lst=None): if arg == 1958: return 1 elif arg == 2013: return 2 else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def f(arg, lst): if arg == 1994: return h(lst[3]) elif arg == 2008: return 11 else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def e(arg, lst=None): if arg == 'HLSL': return 4 elif arg == 'REXX': return 5 elif arg == 'BISON': return 6 else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def d(arg, lst): if arg == 1994: return 0 elif arg == 2008: return g(lst[4]) else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def b(arg, lst): if arg == 'IDL': return d(lst[2], lst) elif arg == 'ASP': return 3 elif arg == 'TOML': return e(lst[0], lst) else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def c(arg, lst): if arg == 'HLSL': return 7 elif arg == 'REXX': return f(lst[2], lst) elif arg == 'BISON': return 12 else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') def a(arg, lst): if arg == 'EC': return b(lst[3], lst) elif arg == 'MTML': return c(lst[0], lst) elif arg == 'YANG': return 13 else: raise ValueError(f'{currentframe().f_code.co_name} - arg={arg!r}') return a(z[1], z)" "def first(s): if 'CLEAN' in s: return 0 elif 'FLUX' in s: return 1 def second(s): if 'LUA' in s: return 2 elif 'APL' in s: return 3 elif 'CSON' in s: return 4 def third(s): if 'CLEAN' in s: return 5 elif 'FLUX' in s: return 6 def fourth(s): if 'CLEAN' in s: return 7 elif 'FLUX' in s: return 8 def first_second(s): if 1973 in s: return first(s) elif 1979 in s: return second(s) elif 2003 in s: return third(s) def second_second(s): if 'LUA' in s: return fourth(s) elif 'APL' in s: return 9 elif 'CSON' in s: return 10 def main(s): if 'URWEB' in s: return first_second(s) elif 'SHELL' in s: return second_second(s) elif 'HCL' in s: return 11" "def main(x): if x[2] == 2014: if x[4] == 'MINID': if x[3] == 'NU': return {'MASK': 0, 'NIM': 1}[x[0]] else: return {'XBASE': 2, 'SASS': 3}[x[3]] else: return {'ROFF': 4, 'RED': 5}[x[4]] elif x[2] == 1982: if x[3] == 'XBASE': return {'MASK': 7, 'NIM': 8}[x[0]] elif x[3] == 'NU': return 6 elif x[3] == 'SASS': return 9" "def first(s): if 1962 in s: return 0 elif 1957 in s: return 1 elif 1987 in s: return 2 def second(s): if 1962 in s: return 4 elif 1957 in s: return 5 elif 1987 in s: return 6 def third(s): if 1962 in s: return 7 elif 1957 in s: return 8 elif 1987 in s: return 9 def first_second(s): if 'STATA' in s: return first(s) elif 'NUMPY' in s: return 3 elif 'KICAD' in s: return second(s) def second_second(s): if 2016 in s: return third(s) elif 1977 in s: return 10 def third_s(s): if 'HY' in s: return first_second(s) elif 'YANG' in s: return second_second(s) elif 'URWEB' in s: return 11 def main(s): if 1990 in s: return third_s(s) elif 1992 in s: return 12" "s = {'ADA': {1982: {'GOLO': 0, 'TLA': 1}, 2008: {'GOLO': {'EJS': 2, 'IOKE': 3, 'NSIS': 4}, 'TLA': 5}}, 'AWK': {1982: {'GOLO': 6, 'TLA': {'EJS': 7, 'IOKE': 8, 'NSIS': 9}}, 2008: 10}, 'SHELL': 11} def main(path): s1 = s[path[3]] if path[3] == 'ADA': s2 = s1[path[4]] if path[4] == 1982: s3 = s2[path[1]] return s3 elif path[4] == 2008: s3 = s2[path[1]] if isinstance(s3, int): return s3 return s3[path[0]] elif path[3] == 'AWK': s2 = s1[path[4]] if path[4] == 1982: s3 = s2[path[1]] if isinstance(s3, int): return s3 return s3[path[0]] else: return 10 else: return 11" "def main(args): dict2 = {'YANG': 0, 'MESON': 1} dict3 = {'XC': 2, 'SQF': 3} dict0 = {2012: 4, 1985: 5} dict22 = {'YANG': 8, 'MESON': 9} dict0_up = {2012: dict2[args[2]], 1985: dict3[args[3]]} dict3_up = {'XC': dict0[args[0]], 'SQF': 6} dict00_up = {2012: 7, 1985: dict22[args[2]]} dict1 = {'XS': dict0_up[args[0]], 'SMT': dict3_up[args[3]], 'SCAML': dict00_up[args[0]]} return dict1[args[1]]" "def zero(items, left, middle, right): if items[0] == 'COOL': return left if items[0] == 'PERL': return middle if items[0] == 'GAP': return right def three(items, left, right): if items[3] == 'XPROC': return left if items[3] == 'SQLPL': return right def two(items, left, right): if items[2] == 'IO': return left if items[2] == 'MQL4': return right def one(items, left, right): if items[1] == 'NIM': return left if items[1] == 'CLICK': return right def main(items): return one(items, two(items, zero(items, 0, 1, 2), zero(items, 3, 4, 5)), zero(items, three(items, 6, 7), two(items, 8, 9), 10))" "import math s = 0 f = 0 t = 0 def main(arr): global f f = arr[4] global t t = arr[3] global s s = arr[1] if arr[2] == 'ABAP': return 10 elif arr[0] == 'XML': return 9 elif arr[0] == 'ASN.1': return minor_way(f) else: return central(t) def central(t): if t == 1994: ret1 = central_f(f) else: ret1 = sec(s) return ret1 def central_f(f): if f == 1974: return 4 else: return 5 def sec(s): if s == 1958: return 6 elif s == 1988: return 7 else: return 8 def minor_way(f): if f == 1979: ret = minor(t) else: ret = up_minor(t) return ret def minor(t): if t == 1994: return 2 else: return 3 def up_minor(t): if t == 1994: return 0 else: return 1" "def main(x): tree = (1, {2005: (2, {1965: (3, {2009: 0, 1996: 1}), 1972: 2, 1989: (3, {2009: 3, 1996: 4})}), 2018: (3, {2009: 5, 1996: 6}), 2006: (3, {2009: (0, {'R': 7, 'REXX': 8, 'OZ': 9}), 1996: 10})}) while not isinstance(tree, int): tree = tree[1][x[tree[0]]] return tree" "def main(x): if x[0] == 1963: if x[1] == 'MUPAD': return 0 if x[2] == 1978 else 1 elif x[1] == 'ATS': return 2 else: return 3 if x[3] == 'ROFF' else 4 elif x[0] == 1961: if x[1] == 'SHELL': return 7 if x[3] == 'ROFF' else 8 else: return 5 if x[1] == 'MUPAD' else 6 else: return 9" "_dict = {1992: {2012: {2002: 0, 2001: 1, 2015: 2}, 2016: {'AMPL': 3, 'MTML': 4}}, 1969: {2002: {2012: 5, 2016: 6}, 2001: {2012: 7, 2016: 8}, 2015: 9}} def main(_list): return search(_list, _dict) def search(_list, _dict): for i in _list: if isinstance(_dict, dict): if i in _dict: return search(_list, _dict[i]) else: return _dict" "def zero(items, left, middle, right): if items[0] == 'GAP': return left if items[0] == 'BRO': return middle if items[0] == 'STAN': return right def two(items, left, right): if items[2] == 1985: return left if items[2] == 2013: return right def three(items, left, right): if items[3] == 2017: return left if items[3] == 2007: return right def four(items, left, middle, right): if items[4] == 'XC': return left if items[4] == 'NINJA': return middle if items[4] == 'URWEB': return right def one(items, left, middle, right): if items[1] == 2013: return left if items[1] == 2018: return middle if items[1] == 2010: return right def main(items): return one(items, three(items, two(items, zero(items, 0, 1, 2), 3), zero(items, 4, four(items, 5, 6, 7), 8)), two(items, zero(items, 9, 10, 11), 12), 13)" "def main(x): dict2 = {'SAS': 0, 'NINJA': 1} dict22 = {'SAS': 2, 'NINJA': 3} dict3 = {1958: 4, 1995: 5, 2003: 6} dict222 = {'SAS': 7, 'NINJA': 8} dict0 = {1970: dict2[x[2]], 1987: dict22[x[2]], 1978: dict3[x[3]]} dict00 = {1970: dict222[x[2]], 1987: 9, 1978: 10} dict1 = {'KRL': dict0[x[0]], 'OOC': dict00[x[0]], 'HAXE': 11} return dict1[x[1]] main([1970, 'OOC', 'SAS', 1958])" "def main(args): dict3_up = {'TXL': 0, 'C++': 1} dict0 = {1975: 2, 1985: 3, 2019: 4} dict4 = {1987: dict3_up[args[3]], 1960: dict0[args[0]]} dict1_up = {'KIT': dict4[args[4]], 'TERRA': 5} dict3_mid = {'TXL': 6, 'C++': 7} dict3 = {'TXL': 8, 'C++': 9} dict1 = {'KIT': dict3[args[3]], 'TERRA': 10} dict2 = {1982: dict1_up[args[1]], 1981: dict3_mid[args[3]], 1969: dict1[args[1]]} return dict2[args[2]] main([2019, 'KIT', 1969, 'C++', 1987])" "import math def second(x, left, middle, right): if x[2] == 'HACK': return left if x[2] == 'PLSQL': return middle if x[2] == 'SHELL': return right def first(x, left, right): if x[1] == 'SWIFT': return left if x[1] == 'NIX': return right def third(x, left, right): if x[3] == 1963: return left if x[3] == 2015: return right def main(x): if x[0] == 'ABNF': return first(x, third(x, 0, 1), 2) if x[0] == 'WISP': return third(x, second(x, 3, 4, 5), first(x, 6, 7)) if x[0] == 'EJS': return third(x, 8, second(x, 9, 10, 11))" "def main(path): match path[0]: case 1991: match path[3]: case 1966: match path[1]: case 'PERL6': return 9 case 'XTEND': return 10 case 'YAML': return 11 case 1970: match path[1]: case 'PERL6': return 6 case 'XTEND': return 7 case 'YAML': return 8 case 1997: match path[1]: case 'PERL6': match path[3]: case 1970: return 0 case 1966: return 1 case 'XTEND': match path[3]: case 1970: return 2 case 1966: return 3 case 'YAML': match path[3]: case 1970: return 4 case 1966: return 5" "def main(res): ams = {1: {2009: {4: {'PUG': 7, 'TCSH': 8, 'BRO': 9}}, 2017: {0: {'PERL': 6, 'DIFF': {4: {'PUG': 0, 'TCSH': {3: {2013: 1, 1998: 2}}, 'BRO': {2: {1994: 3, 1977: 4, 1992: 5}}}}}}}} while isinstance(ams, dict): Ind = int(*ams) ams = ams[Ind] Key = res[Ind] ams = ams[Key] return ams" "def main(path): b = 0 match path[3]: case 2019: match path[1]: case 1994: b = 11 case 1967: b = 10 case 2001: match path[2]: case 2000: b = 8 case 1977: b = 9 case _: return b case _: return b case 1974: match path[0]: case 1966: match path[2]: case 1977: b = 7 case 2000: b = 6 case _: return b case 1991: match path[1]: case 1994: b = 5 case 1967: b = 4 case 2001: b = 3 case _: return b case _: return b case 1957: match path[2]: case 1977: b = 2 case 2000: match path[0]: case 1966: b = 1 case 1991: b = 0 case _: return b case _: return b case _: return b return b" "def main(x): match x[3]: case 1964: match x[1]: case 1983: match x[2]: case 2020: return 0 case 1980: return 1 case 2020: match x[0]: case 2012: match x[2]: case 2020: match x[1]: case 1983: return 2 case 1980: return 3 case 1997: return 4 case 1967: match x[4]: case 1996: match x[2]: case 2020: return 5 case 1980: return 6 case 2012: match x[2]: case 2020: return 7 case 1980: return 8 case 1964: return 9" "def zero(items, left, middle, right): if items[0] == 'NUMPY': return left if items[0] == 'XOJO': return middle if items[0] == 'URWEB': return right def tow(items, left, middle, right): if items[2] == 'GAP': return left if items[2] == 'COQ': return middle if items[2] == 'OCAML': return right def one(items, left, middle, right): if items[1] == 'SVG': return left if items[1] == 'HAML': return middle if items[1] == 'NU': return right def four(items, left, right): if items[4] == 'JAVA': return left if items[4] == 'MAX': return right def main(items): return tow(items, one(items, zero(items, 0, four(items, 1, 2), 3), four(items, zero(items, 4, 5, 6), zero(items, 7, 8, 9)), 10), 11, 12)" "def zero(items, left, right): if items[0] == 1984: return left if items[0] == 1988: return right def three(items, left, middle, right): if items[3] == 'XPROC': return left if items[3] == 'GAP': return middle if items[3] == 'PUG': return right def two(items, left, middle, right): if items[2] == 'INI': return left if items[2] == 'KRL': return middle if items[2] == 'D': return right def one(items, left, middle, right): if items[1] == 'METAL': return left if items[1] == 'ABNF': return middle if items[1] == 'RED': return right def main(items): return zero(items, three(items, one(items, 0, 1, 2), 3, two(items, 4, 5, 6)), three(items, 7, 8, one(items, 9, 10, 11)))" "def main(x): tree = {'SCALA': {'COBOL': 7, 'TOML': {1999: 8, 2020: 11, 1989: {2005: 9, 2017: 10}}}, 'OZ': {1989: 4, 2020: {2005: 5, 2017: 6}, 1999: {2005: 0, 2017: {2015: 1, 1977: 2, 1988: 3}}}} if x[4] == 'OZ': if x[0] == 1999: if x[1] == 2017: return tree[x[4]][x[0]][x[1]][x[2]] else: return tree[x[4]][x[0]][x[1]] elif x[0] == 2020: return tree[x[4]][x[0]][x[1]] else: return tree[x[4]][x[0]] elif x[3] == 'TOML': if x[0] == 1989: return tree[x[4]][x[3]][x[0]][x[1]] else: return tree[x[4]][x[3]][x[0]] else: return tree[x[4]][x[3]]" "def three(items, left, right): if items[3] == 1966: return left if items[3] == 1995: return right def zero(items, left, middle, right): if items[0] == 2001: return left if items[0] == 1996: return middle if items[0] == 1961: return right def one(items, left, middle, right): if items[1] == 'RED': return left if items[1] == 'IDRIS': return middle if items[1] == 'APL': return right def two(items, left, middle, right): if items[2] == 'NIT': return left if items[2] == 'PERL6': return middle if items[2] == 'LOGOS': return right def main(items): return three(items, two(items, one(items, 0, 1, 2), zero(items, 3, 4, 5), zero(items, 6, 7, 8)), 9)" "def main(x): match x[3]: case 'IO': match x[1]: case 1993: match x[0]: case 1958: return 0 case 2011: return 1 case 2005: match x[2]: case 1992: return 2 case 1957: return 3 case 2005: return 4 case 'STAN': match x[2]: case 1992: return 5 case 1957: match x[1]: case 1993: return 6 case 2005: return 7 case 2005: match x[1]: case 1993: return 8 case 2005: return 9" "import math def zeroth(x, left, right): if x[0] == 2007: return left if x[0] == 2018: return right def first(x, left, right): if x[1] == 'ASP': return left if x[1] == 'ASN.1': return right def third(x, left, right): if x[3] == 'M': return left if x[3] == 'ABAP': return right def fourth(x, left, right): if x[4] == 1982: return left if x[4] == 1995: return right def main(x): if x[2] == 2001: return third(x, first(x, fourth(x, 0, 1), 2), 3) if x[2] == 1959: return fourth(x, zeroth(x, 4, 5), third(x, 6, first(x, 7, 8))) if x[2] == 1967: return 9" "def main(res): ans = {3: {'LIMBO': 12, 'JSX': {1: {2017: {2: {'JSX': 11, 'SELF': 10, 'TOML': 9}}, 2018: {2: {'JSX': 8, 'SELF': 7, 'TOML': 6}}, 1963: 5}}, 'AMPL': {2: {'JSX': {0: {2011: 4, 2009: 3}}, 'SELF': 2, 'TOML': {0: {2009: 0, 2011: 1}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero(items, left, right): if items[0] == 1964: return left if items[0] == 1987: return right def one(items, left, right): if items[1] == 1973: return left if items[1] == 1988: return right def two(items, left, right): if items[2] == 1987: return left if items[2] == 1979: return right def three(items, left, right): if items[3] == 1990: return left if items[3] == 2020: return right def four(items, left, middle, right): if items[4] == 'BRO': return left if items[4] == 'HTTP': return middle if items[4] == 'ZIMPL': return right def main(items): return zero(items, four(items, one(items, 0, two(items, 1, 2)), three(items, one(items, 3, 4), two(items, 5, 6)), one(items, 7, two(items, 8, 9))), 10)" "def main(res): ans = {1: {1973: {2: {1996: 10, 2003: {3: {'JAVA': 9, 'MQL5': 8}}}}, 1963: {0: {2016: {3: {'MQL5': 6, 'JAVA': 7}}, 1967: {2: {1996: 5, 2003: 4}}}}, 1987: {0: {2016: {2: {1996: 3, 2003: 2}}, 1967: {3: {'JAVA': 1, 'MQL5': 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(res): ans = {3: {1997: {0: {1972: 11, 2019: {1: {'URWEB': 9, 'BLADE': 10}}, 1996: 8}}, 1993: {1: {'URWEB': {0: {2019: {2: {'HY': 3, 'SAS': 2}}, 1972: {4: {2018: 6, 2017: 5, 1981: 4}}, 1996: {2: {'HY': 1, 'SAS': 0}}}}, 'BLADE': 7}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(res): ans = {4: {2017: 10, 1968: {3: {'X10': 9, 'NINJA': {1: {1975: {0: {'LEAN': 5, 'SHELL': 4, 'HAXE': 3}}, 1999: {0: {'HAXE': 6, 'SHELL': 7, 'LEAN': 8}}}}, 'BOO': {2: {2016: 0, 1985: {1: {1999: 2, 1975: 1}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): match x[2]: case 'SLASH': match x[0]: case 1975: match x[4]: case 1982: return 0 case 2019: return 3 case 1994: match x[3]: case 1989: return 1 case 2014: return 2 case 1967: match x[3]: case 1989: match x[1]: case 'CMAKE': return 4 case 'VCL': return 5 case 'YANG': return 6 case 2014: match x[1]: case 'CMAKE': return 7 case 'VCL': return 8 case 'YANG': return 9 case 'ELM': return 10" "def main(x): return f0(x) def f0(x): if x[0] == 'ANTLR': return f02(x) elif x[0] == 'RUST': return f01(x) def f02(x): if x[2] == 1972: return f021(x) elif x[2] == 1958: return f023(x) def f021(x): if x[1] == 1957: return 0 elif x[1] == 2002: return 1 elif x[1] == 1969: return 2 def f023(x): if x[3] == 'XC': return 3 elif x[3] == 'COBOL': return 4 elif x[3] == 'SASS': return 5 def f01(x): if x[1] == 1957: return 6 elif x[1] == 2002: return 7 elif x[1] == 1969: return f012(x) def f012(x): if x[2] == 1972: return 8 elif x[2] == 1958: return 9" "def zero(i, left, middle, right): if i[0] == 'MQL5': return left if i[0] == 'PHP': return middle if i[0] == 'POD': return right def one(i, left, middle): if i[1] == 2018: return left if i[1] == 2000: return middle def two(i, left, middle): if i[2] == 'CUDA': return left if i[2] == 'ROFF': return middle def three(i, left, right): if i[3] == 1980: return left if i[3] == 2007: return right def four(i, left, middle, right): if i[4] == 'NL': return left if i[4] == 'STAN': return middle if i[4] == 'EQ': return right def main(i): return three(i, zero(i, two(i, 0, 1), 2, one(i, 3, 4)), four(i, zero(i, two(i, 5, 6), one(i, 7, 8), 9), 10, 11))" "def zero(items, left, right): if items[0] == 1986: return left if items[0] == 2019: return right def four(items, left, middle, right): if items[4] == 1998: return left if items[4] == 2012: return middle if items[4] == 1976: return right def two(items, left, middle, right): if items[2] == 2013: return left if items[2] == 1961: return middle if items[2] == 1960: return right def three(items, left, middle, right): if items[3] == 1984: return left if items[3] == 1993: return middle if items[3] == 1988: return right def one(items, left, middle, right): if items[1] == 'VCL': return left if items[1] == 'VHDL': return middle if items[1] == 'MINID': return right def main(items): return three(items, one(items, two(items, four(items, 0, 1, 2), 3, 4), four(items, two(items, 5, 6, 7), 8, zero(items, 9, 10)), 11), 12, 13)" "def main(ex): data = {'GOSU': {'SELF': {2006: {1965: 0, 2016: 1, 1969: 2}, 1994: {1965: 3, 2016: 4, 1969: 5}, 2016: 6}, 'EJS': {1965: {2020: 7, 1991: 8}, 2016: {2020: 9, 1991: 10}, 1969: 11}}} if ex[3] == 'HCL': return 12 elif ex[1] == 'EJS': if ex[0] == 1969: return 11 return data[ex[3]][ex[1]][ex[0]][ex[4]] elif ex[1] == 'SELF': if ex[2] == 2016: return 6 return data[ex[3]][ex[1]][ex[2]][ex[0]]" "def main(ex): data = {2004: {'AWK': {'JSON': 0, 'CHUCK': {2005: 1, 1984: 2, 1995: 3}}, 'KICAD': {'JSON': 4, 'CHUCK': {2005: 5, 1984: 6, 1995: 7}}, 'M4': {'JSON': {2005: 8, 1984: 9, 1995: 10}, 'CHUCK': 11}}} if ex[2] == 1984: return 12 elif ex[4] == 'AWK': if ex[3] == 'JSON': return 0 return data[ex[2]][ex[4]][ex[3]][ex[0]] elif ex[4] == 'KICAD': if ex[3] == 'JSON': return 4 return data[ex[2]][ex[4]][ex[3]][ex[0]] else: if ex[3] == 'CHUCK': return 11 return data[ex[2]][ex[4]][ex[3]][ex[0]]" "class Node: def __init__(self, name, value): self.children = [] self.value = value self.name = name def get_child(self, child): for item in self.children: if item.name == child: return item def add_children(self, children): self.children = children def main(x): end0 = Node('NSIS', 0) end1 = Node('JAVA', 1) end2 = Node('SCALA', 2) k2_1 = Node(2000, -1) k2_1.add_children([end0, end1, end2]) end3 = Node(1985, 3) end4 = Node(1961, 4) num_1978 = Node(1978, -1) num_1978.add_children([end3, end4, k2_1]) end5 = Node('NSIS', 5) end6 = Node(1976, 6) end7 = Node(1964, 7) end8 = Node(1976, 8) end9 = Node(1964, 9) java = Node('JAVA', -1) java.add_children([end6, end7]) scala = Node('SCALA', -1) scala.add_children([end8, end9]) num_2000_2 = Node(2000, -1) num_2000_2.add_children([end5, java, scala]) end10 = Node(1985, 10) end11 = Node(1961, 11) end12 = Node(1979, 12) num_2012 = Node(2012, -1) num_2012.add_children([num_2000_2, end10, end11]) root = Node('', -1) root.add_children([num_1978, num_2012, end12]) answer = root.get_child(x[0]) if answer.name == 1978: answer = answer.get_child(x[4]) if answer.value != -1: return answer.value else: answer = answer.get_child(x[2]) return answer.value if answer.name == 2012: answer = answer.get_child(x[4]) if answer.value != -1: return answer.value else: answer = answer.get_child(x[2]) if answer.value != -1: return answer.value else: return answer.get_child(x[1]).value else: return answer.value" "def zero(items, left, middle, right): if items[0] == 'JSON': return left if items[0] == 'IDL': return middle if items[0] == 'CUDA': return right def one(items, left, middle, right): if items[1] == 'LESS': return left if items[1] == 'RAGEL': return middle if items[1] == 'COBOL': return right def two(items, left, middle, right): if items[2] == 1990: return left if items[2] == 1976: return middle if items[2] == 1989: return right def three(items, left, middle, right): if items[3] == 2002: return left if items[3] == 1982: return middle if items[3] == 1989: return right def four(items, left, right): if items[4] == 'KICAD': return left if items[4] == 'M4': return right def main(items): return two(items, three(items, one(items, 0, 1, four(items, 2, 3)), 4, 5), 6, zero(items, one(items, three(items, 7, 8, 9), 10, 11), 12, 13))" "def zero(items, left, middle, right): if items[0] == 'NINJA': return left if items[0] == 'AMPL': return middle if items[0] == 'LIMBO': return right def three(items, left, middle, right): if items[3] == 2010: return left if items[3] == 2013: return middle if items[3] == 1995: return right def two(items, left, right): if items[2] == 1965: return left if items[2] == 1977: return right def one(items, left, right): if items[1] == 1964: return left if items[1] == 2012: return right def main(items): return three(items, one(items, zero(items, 0, 1, 2), two(items, 3, 4)), 5, zero(items, one(items, 6, 7), one(items, 8, 9), 10))" "s = {'SASS': {1962: {'YACC': 0, 'GOLO': 1, 'M4': 2}, 1968: {'YACC': 3, 'GOLO': 4, 'M4': 5}}, 'VALA': {'SELF': 6, 'GOLO': {1962: 7, 1968: 8}, 'LIMBO': {1962: 9, 1968: 10}}} def main(path): global s n = s for i in range(4): try: n = n[path[i]] except Exception: pass return n" "s = {'MASK': {'SLASH': {1986: {'STON': 0, 'FANCY': 1}, 2005: 2}, 'HY': 3}, 'SVG': 4, 'JSON': {'SLASH': {1993: {'STON': 5, 'FANCY': 6}, 1977: {1986: 7, 2005: 8}, 2004: 9}, 'HY': 10}} def main(path): global s n = s for i in range(15): try: n = n[path[i % len(path)]] except Exception: pass return n" "def main(x): data = {'STON': {'XPROC': {'AGDA': {2001: 2, 1994: 3, 1998: 4}}, 'LEX': {2001: {'SWIFT': 5, 'IDRIS': 6, 'RHTML': 7}, 1998: {'MAKO': 9, 'LASSO': 10, 'AGDA': 11}}}} if x[0] == 'COBOL': return 12 elif x[4] == 'XPROC': if x[3] == 'MAKO': return 0 elif x[3] == 'LASSO': return 1 else: return data[x[0]][x[4]][x[3]][x[1]] elif x[4] == 'LEX': if x[1] == 1994: return 8 elif x[1] == 2001: return data[x[0]][x[4]][x[1]][x[2]] elif x[1] == 1998: return data[x[0]][x[4]][x[1]][x[3]]" "s = {1957: {1997: {'XPROC': 0, 'SELF': 1}, 2003: {'XPROC': 2, 'SELF': 3}, 2005: {'XPROC': 4, 'SELF': 5}}, 1970: {'XPROC': 6, 'SELF': {1986: 7, 1998: 8}}, 2007: 9} def main(path): global s n = s for i in range(10): try: n = n[path[i % len(path)]] except Exception: pass return n" "def main(x): if x[2] == 'TERRA': if x[1] == 1983: list1 = {1963: 0, 2016: 1, 1999: 2} return list1.get(x[3]) if x[1] == 1978: list2 = {1999: 3, 2009: 4} return list2.get(x[0]) if x[2] == 'APL': if x[3] == 1963: return 5 if x[3] == 2016: list3 = {1999: 6, 2009: 7} return list3.get(x[0]) if x[3] == 1999: list4 = {1983: 8, 1978: 9} return list4.get(x[1]) if x[2] == 'ADA': return 10" "def four(items, left, middle, right): if items[4] == 'IDRIS': return left if items[4] == 'NSIS': return middle if items[4] == 'SLASH': return right def two(items, left, right): if items[2] == 1957: return left if items[2] == 1962: return right def one(items, left, middle, right): if items[1] == 1991: return left if items[1] == 1971: return middle if items[1] == 1974: return right def zero(items, left, middle, right): if items[0] == 'GLSL': return left if items[0] == 'ABNF': return middle if items[0] == 'NIM': return right def main(items): return one(items, four(items, zero(items, 0, two(items, 1, 2), 3), 4, 5), 6, two(items, zero(items, four(items, 7, 8, 9), 10, 11), 12))" "_dict = {'KRL': {'HACK': {'COQ': {1991: 0, 2002: 1, 1968: 2}, 'NCL': {1983: 3, 1982: 4, 2017: 5}, 'EDN': {1983: 6, 1982: 7, 2017: 8}}, 'NIX': 9}, 'PUG': 10} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "from itertools import permutations tree = {'WISP': {'MINID': {'OZ': 0, 'GLYPH': 1, 'R': 2}, 'JSX': {'ARC': 3, 'XOJO': 4, 'X10': 5}, 'D': 6}, 'SQLPL': {'ARC': 7, 'XOJO': {'OZ': 8, 'GLYPH': 9, 'R': 10}, 'X10': 11}, 'RED': 12} def get_path(path): way = tree for key in path: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value def main(path): comb = list(permutations(path)) i = 0 x = None while x is None: x = get_path(comb[i]) i += 1 return x" "def main(args): dict1 = {'URWEB': 0, 'EAGLE': 1, 'REBOL': 2} dict3 = {'VCL': 3, 'CSON': 4, 'HY': 5} dict11 = {'URWEB': 8, 'EAGLE': 9, 'REBOL': 10} dict4 = {'TERRA': dict1[args[1]], 'TLA': dict3[args[3]]} dict3_up = {'VCL': 6, 'CSON': 7, 'HY': dict11[args[1]]} dict2 = {1978: dict4[args[4]], 2019: dict3_up[args[3]]} dict0 = {'JFLEX': dict2[args[2]], 'VOLT': 11} return dict0[args[0]]" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n8_3 = Node(11, [], []) n8_2 = Node(10, [], []) n8_1 = Node(9, [], []) n8 = Node(x[2], [1971, 2016, 1977], [n8_1, n8_2, n8_3]) n7_2 = Node(8, [], []) n7_1 = Node(7, [], []) n7 = Node(x[0], ['EQ', 'COBOL'], [n7_1, n7_2]) n6_1 = Node(6, [], []) n6 = Node(x[1], [1966, 1991, 2012], [n6_1, n7, n8]) n5_2 = Node(5, [], []) n5_1 = Node(4, [], []) n5 = Node(x[0], ['EQ', 'COBOL'], [n5_1, n5_2]) n4_2 = Node(3, [], []) n4_1 = Node(2, [], []) n4 = Node(x[0], ['EQ', 'COBOL'], [n4_1, n4_2]) n3_2 = Node(1, [], []) n3_1 = Node(0, [], []) n3 = Node(x[0], ['EQ', 'COBOL'], [n3_1, n3_2]) n2 = Node(x[2], [1971, 2016, 1977], [n3, n4, n5]) n = Node(x[3], ['CMAKE', 'VOLT'], [n2, n6]) while n: res = n n = n.find_next() return res.data" "def main(x): match x[3]: case 'P4': match x[2]: case 'FISH': match x[1]: case 'MQL5': return 0 case 'VCL': return 1 case 'KIT': return 2 case 'YACC': match x[1]: case 'MQL5': match x[4]: case 'HAXE': return 3 case 'HCL': return 4 case 'VCL': match x[0]: case 2006: return 5 case 1983: return 6 case 'KIT': return 7 case 'QML': match x[0]: case 2006: match x[4]: case 'HAXE': return 8 case 'HCL': return 9 case 1983: return 10 case 'FANCY': return 11" "from collections import defaultdict import json from collections import defaultdict import json def tree(): return defaultdict(tree) d_tree = tree() d_tree[4][1965] = 12 d_tree[4][1963][2][2018][1]['SQLPL'] = 0 d_tree[4][1963][2][2018][1]['LSL'] = 1 d_tree[4][1963][2][2018][1]['SCAML'] = 2 d_tree[4][1963][2][2019] = 3 d_tree[4][1963][2][1964] = 4 d_tree[4][1978][1]['SQLPL'] = 5 d_tree[4][1978][1]['SCAML'] = 11 d_tree[4][1978][1]['LSL'][0]['TEXT'] = 6 d_tree[4][1978][1]['LSL'][0]['CIRRU'] = 10 d_tree[4][1978][1]['LSL'][0]['TEA'][3]['BLADE'] = 7 d_tree[4][1978][1]['LSL'][0]['TEA'][3]['M4'] = 8 d_tree[4][1978][1]['LSL'][0]['TEA'][3]['MESON'] = 9 def get_value(dd, keys): get_value.val = None for (k, v) in dd.items(): if isinstance(k, int) and len(str(k)) == 1: if isinstance(v[keys[k]], dict): get_value(v[keys[k]], keys) else: get_value.val = v[keys[k]] return get_value.val def main(tree_nodea): return get_value(d_tree, tree_nodea)" "def main(x): match x[1]: case 1968: match x[0]: case 'CLICK': match x[3]: case 'SWIFT': match x[2]: case 'XPROC': return 0 case 'XML': return 1 case 'HACK': return 2 case 'ANTLR': match x[4]: case 1996: match x[2]: case 'XPROC': return 3 case 'XML': return 4 case 2009: match x[2]: case 'XPROC': return 5 case 'XML': return 6 case 'NIX': match x[4]: case 1996: return 7 case 2009: return 8 case 1989: match x[2]: case 'XPROC': return 9 case 'XML': return 10" "def main(x): match x[4]: case 1992: match x[1]: case 'REBOL': match x[3]: case 1988: match x[0]: case 'SELF': return 0 case 'SLASH': return 1 case 'GLYPH': return 2 case 2011: match x[0]: case 'SELF': return 3 case 'SLASH': return 4 case 'GLYPH': return 5 case 1985: match x[0]: case 'SELF': return 6 case 'SLASH': return 7 case 'GLYPH': return 8 case 'CLIPS': return 9 case 2006: return 10 case 1961: return 11" "def zero(items, left, middle, right): if items[0] == 'DART': return left if items[0] == 'YANG': return middle if items[0] == 'PAN': return right def three(items, left, middle, right): if items[3] == 'JAVA': return left if items[3] == 'SAS': return middle if items[3] == 'SVG': return right def one(items, left, right): if items[1] == 'LESS': return left if items[1] == 'LOGOS': return right def two(items, left, right): if items[2] == 'XBASE': return left if items[2] == 'JAVA': return right def main(items): return two(items, one(items, three(items, 0, 1, 2), zero(items, 3, 4, 5)), three(items, 6, zero(items, 7, 8, 9), 10))" "from collections import defaultdict def tree(): return defaultdict(tree) d_tree = tree() d_tree[3]['FISH'][2][1995] = 6 d_tree[3]['FISH'][2][1994][0][1998][4][2008] = 8 d_tree[3]['FISH'][2][1994][0][1998][4][1994] = 9 d_tree[3]['FISH'][2][1994][0][1963] = 7 d_tree[3]['FISH'][2][1994][0][1973] = 10 d_tree[3]['FISH'][2][1971][4][1994][1][1996] = 3 d_tree[3]['FISH'][2][1971][4][1994][1][1958] = 4 d_tree[3]['FISH'][2][1971][4][1994][1][1965] = 5 d_tree[3]['FISH'][2][1971][4][2008][0][1963] = 0 d_tree[3]['FISH'][2][1971][4][2008][0][1998] = 1 d_tree[3]['FISH'][2][1971][4][2008][0][1973] = 2 d_tree[3]['FISH'][2][1995] = 6 d_tree[3]['GAMS'] = 12 d_tree[3]['JSX'] = 11 def get_value(dd, keys): get_value.val = None for (k, v) in dd.items(): if isinstance(k, int) and len(str(k)) == 1: if isinstance(v[keys[k]], dict): get_value(v[keys[k]], keys) else: get_value.val = v[keys[k]] return get_value.val def main(tree_nodea): return get_value(d_tree, tree_nodea)" "def zero(items, left, middle, right): if items[0] == 1998: return left if items[0] == 2009: return middle if items[0] == 1975: return right def four(items, left, right): if items[4] == 'EJS': return left if items[4] == 'NUMPY': return right def three(items, left, right): if items[3] == 'IO': return left if items[3] == 'CSS': return right def two(items, left, right): if items[2] == 'VHDL': return left if items[2] == 'ZIMPL': return right def one(items, left, middle, right): if items[1] == 2020: return left if items[1] == 2001: return middle if items[1] == 1971: return right def main(items): return two(items, one(items, three(items, 0, four(items, 1, 2)), four(items, zero(items, 3, 4, 5), three(items, 6, 7)), zero(items, 8, 9, 10)), 11)" "def main(x): p1 = {'source': x[4], 'DIFF': 0, 'LATTE': 1, 'OPAL': 2} p2 = {'source': x[2], 'TEA': p1, 'TOML': 3, 'SCSS': 4} p3 = {'source': x[1], 'XML': p2, 'YAML': 5} p4 = {'source': x[1], 'XML': 7, 'YAML': 8} p5 = {'source': x[3], 1981: 6, 2008: p4, 1999: 9} p6 = {'source': x[0], 'QML': p3, 'EBNF': p5, 'CLICK': 10} posit = p6 while not isinstance(posit, int): posit = posit[posit['source']] return posit" "s = {1971: {'CUDA': {'AGDA': 0, 'SCAML': 1, 'M': 2}, 'CSON': 3, 'SAGE': {'AGDA': 4, 'SCAML': 5, 'M': 6}}, 1959: {'MAX': 7, 'TEA': 8, 'NIM': 9}} def main(path): s1 = s[path[0]] if path[0] == 1971: s2 = s1[path[3]] if path[3] == 'CUDA': s3 = s2[path[1]] return s3 elif path[3] == 'CSON': return 3 else: s3 = s2[path[1]] return s3 else: s2 = s1[path[2]] return s2" "map = {'i': 0, 1986: {'i': 2, 2015: {'i': 4, 2014: {'i': 3, 'C': 0, 'LOGOS': 1, 'ADA': 2}, 2018: {'i': 1, 'PERL6': 3, 'HY': 4, 'BISON': 5}, 1972: {'i': 3, 'C': 6, 'LOGOS': 7, 'ADA': 8}}, 2007: 9}, 1970: 10, 2010: 11} def main(arr): current = map[arr[0]] while type(current) != int: current = current[arr[current['i']]] return current" "x = [] def main(x): if x[0] == 'POD': if x[1] == 1966: return 3 if x[1] == 2005: match x[3]: case 'FISH': return 0 case 'LOGOS': return 1 case 'CMAKE': return 2 if x[0] == 'VOLT': match x[2]: case 'XC': return 4 case 'TEA': return 5 case 'OOC': return 6 if x[0] == 'TXL': if x[2] == 'OOC': return 12 if x[2] == 'XC': match x[1]: case 2005: return 7 case 1966: return 8 if x[2] == 'TEA': match x[3]: case 'FISH': return 9 case 'LOGOS': return 10 case 'CMAKE': return 11" "s = {1975: {'CUDA': {1976: 0, 2004: 1}, 'ZIMPL': {'DIFF': 2, 'GRACE': 3}, 'DIFF': 4}, 1962: {'DIFF': {1976: 5, 2004: 6}, 'GRACE': 7}, 1972: {'DIFF': {'CUDA': 8, 'ZIMPL': 9, 'DIFF': 10}, 'GRACE': 11}} def main(path): s1 = s[path[0]] if path[0] == 1975: s2 = s1[path[1]] if path[1] == 'CUDA': s3 = s2[path[2]] return s3 elif path[1] == 'ZIMPL': s3 = s2[path[3]] return s3 else: return 4 elif path[0] == 1962: s2 = s1[path[3]] if path[3] == 'DIFF': s3 = s2[path[2]] return s3 else: return 7 else: s2 = s1[path[3]] if path[3] == 'DIFF': s3 = s2[path[1]] return s3 else: return 11" "s = {2009: {1961: {1978: {1989: 0, 2000: 1, 1988: 2}, 1962: 3}, 2013: {1978: 4, 1962: 5}, 1979: 6}, 1968: {1989: {1961: 7, 2013: 8, 1979: 9}, 2000: 10, 1988: 11}, 1988: 12} def main(path): s1 = s[path[0]] if path[0] == 2009: s2 = s1[path[1]] if path[1] == 1961: s3 = s2[path[4]] if path[4] == 1978: s4 = s3[path[3]] return s4 else: return 3 elif path[1] == 2013: s3 = s2[path[4]] return s3 else: return 6 elif path[0] == 1968: s2 = s1[path[3]] if path[3] == 1989: s3 = s2[path[1]] return s3 elif path[3] == 2000: return 10 else: return 11 else: return 12" "from decimal import Decimal s = ({2000, 1972, 'NIT', 2007}, {2000, 1972, 'NIT', 1999}, {2000, 1972, 'M'}, {2000, 2012}, {2000, 1998, 1975}, {2000, 1998, 1994, 2007}, {2000, 1998, 1994, 1999}, {2000, 1998, 1987}, {1986}, {1975, 2007, 1972, 1975}, {1975, 2007, 1972, 1994}, {1975, 2007, 1972, 1987}, {1975, 2007, 2012}, {1975, 2007, 1998}, {1975, 1999}) def main(r): r = tuple(r) s1 = set(r) a = [i for i in range(len(s)) if not len(s[i] - s1)] if len(a) > 1 and 9 in a: a.remove(9) return a[0]" "def main(x): if x[2] == 'RAML': if x[3] == 1986: return {1972: 0, 1995: 1, 2004: 2}[x[1]] elif x[3] == 1999: return {1972: 3, 1995: 4, 2004: 5}[x[1]] elif x[2] == 'SQF': if x[1] == 1972: return 6 elif x[1] == 1995: return 7 elif x[1] == 2004: return {1986: 8, 1999: 9}[x[3]]" "def main(x): dict1 = {1982: 0, 1976: 1, 1973: 2} dict2 = {1982: 3, 1976: 4, 1973: 5} dict3 = {1982: 7, 1976: 8, 1973: 9} if x[3] == 'CLICK': if x[1] == 'SLIM': if x[4] == 'ELM': return dict1.get(x[0]) elif x[4] == 'FORTH': return dict2.get(x[0]) elif x[1] == 'BRO': return 6 elif x[1] == 'PONY': if x[4] == 'ELM': return dict3.get(x[0]) elif x[4] == 'FORTH': return 10 elif x[3] == 'DM': return 11 return 12" "def main(mass): matrix = [['CSON', 'WISP', 0, 2015, 1962], ['CSON', 'WISP', 0, 2015, 1975], ['CSON', 'WISP', 0, 2015, 1976], ['CSON', 'X10', 0, 2015, 1962], ['CSON', 'X10', 0, 2015, 1975], ['CSON', 'X10', 0, 2015, 1976], ['CSON', 'REBOL', 0, 2015, 0], ['ABAP', 'WISP', 1999, 2015, 0], ['ABAP', 'X10', 1999, 2015, 0], ['ABAP', 'REBOL', 1999, 2015, 0], ['ABAP', 0, 1977, 2015, 0], [0, 0, 0, 1997, 0], [0, 0, 0, 1986, 0]] for i in range(0, 13): a = 0 for j in range(0, 5): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 5: return i" "import math def main(mass): return start1(mass) def start1(mass): x2 = mass[2] x3 = mass[3] if x3 == 'FISH': return 9 elif x3 == 'XBASE': return 10 elif x3 == 'PHP': if x2 == 1993: return end1(mass) elif x2 == 1986: return end2(mass) def end2(mass): x0 = mass[0] x1 = mass[1] if x1 == 'QML': return 5 elif x1 == 'TLA': if x0 == 'LEAN': return 6 elif x0 == 'IOKE': return 7 elif x0 == 'MESON': return 8 def end1(mass): x0 = mass[0] x1 = mass[1] x4 = mass[4] if x0 == 'LEAN': if x4 == 1982: return 0 elif x4 == 1972: return 1 if x0 == 'IOKE': return 2 if x0 == 'MESON': if x1 == 'QML': return 3 elif x1 == 'TLA': return 4" "def main(x): if x[1] == 1987: if x[2] == 'SVG': match x[4]: case 'ECL': return 9 case 'HTML': return 10 case 'CHUCK': return 11 if x[2] == 'NL': if x[0] == 1960: match x[4]: case 'ECL': return 0 case 'HTML': return 1 case 'CHUCK': return 2 if x[0] == 1981: match x[4]: case 'ECL': return 3 case 'HTML': return 4 case 'CHUCK': return 5 if x[0] == 1969: match x[4]: case 'ECL': return 6 case 'HTML': return 7 case 'CHUCK': return 8 if x[1] == 2006: return 12" "import math def f1(arr): if arr[4] == 'TEXT': if arr[1] == 'IO': return 0 elif arr[1] == 'YACC': return 1 elif arr[1] == 'LSL': return 2 elif arr[4] == 'ATS': return 3 elif arr[4] == 'NIM': if arr[2] == 1993: return 4 elif arr[2] == 1960: return 5 def f2(arr): if arr[4] == 'TEXT': if arr[2] == 1993: return 6 elif arr[2] == 1960: return 7 elif arr[4] == 'ATS': if arr[1] == 'IO': return 8 elif arr[1] == 'YACC': return 9 elif arr[1] == 'LSL': return 10 elif arr[4] == 'NIM': return 11 def main(arr): if arr[3] == 2015: return 13 elif arr[3] == 1969: if arr[0] == 'LESS': return 12 elif arr[0] == 'ABAP': return f2(arr) elif arr[0] == 'BOO': return f1(arr)" "def main(mass): matrix = [['GN', 0, 0, 1995, 'NESC'], ['J', 0, 'HYPHY', 1995, 'NESC'], ['J', 0, 'VHDL', 1995, 'NESC'], ['J', 0, 'OCAML', 1995, 'NESC'], ['GN', 0, 0, 1980, 'NESC'], ['J', 0, 'HYPHY', 1980, 'NESC'], ['J', 0, 'VHDL', 1980, 'NESC'], ['J', 0, 'OCAML', 1980, 'NESC'], ['GN', 0, 0, 0, 'PERL'], ['J', 'NL', 'HYPHY', 0, 'PERL'], ['J', 'SCSS', 'HYPHY', 0, 'PERL'], ['J', 'TLA', 'HYPHY', 0, 'PERL'], ['J', 0, 'VHDL', 0, 'PERL'], ['J', 0, 'OCAML', 0, 'PERL'], [0, 0, 0, 0, 'MUPAD']] for i in range(0, 15): a = 0 for j in range(0, 5): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 5: return i return main(['GN', 'TLA', 'HYPHY', 1995, 'MUPAD'])" "def main(mass): matrix = [[0, 'SHEN', 'SLIM', 'PIC', 0], [0, 'SHEN', 'XPROC', 'PIC', 'OX'], [0, 'SHEN', 'XPROC', 'PIC', 'NINJA'], [0, 'SHEN', 'XPROC', 'PIC', 'DYLAN'], [0, 'SHEN', 0, 'CLIPS', 0], [0, 'GAMS', 'SLIM', 0, 0], ['ZIMPL', 'GAMS', 'XPROC', 0, 'OX'], ['LUA', 'GAMS', 'XPROC', 0, 'OX'], ['FORTH', 'GAMS', 'XPROC', 0, 'OX'], ['ZIMPL', 'GAMS', 'XPROC', 0, 'NINJA'], ['LUA', 'GAMS', 'XPROC', 0, 'NINJA'], ['FORTH', 'GAMS', 'XPROC', 0, 'NINJA'], [0, 'GAMS', 'XPROC', 0, 'DYLAN'], [0, 'EBNF', 0, 0, 0]] for i in range(0, 14): a = 0 for j in range(0, 5): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 5: return i return main(['LUA', 'GAMS', 'SLIM', 'PIC', 'DYLAN'])" "def main(x): arr = [[1999, x[1], 'ASN.1', 2013, 'RAML'], [1998, x[1], 'ASN.1', 2013, 'RAML'], [1964, x[1], 'ASN.1', 2013, 'RAML'], [x[0], 1978, 'ASN.1', 2000, 'RAML'], [x[0], 1999, 'ASN.1', 2000, 'RAML'], [x[0], x[1], 'ASN.1', 2007, 'RAML'], [x[0], x[1], 'ASN.1', x[3], 'MESON'], [1999, x[1], 'ASN.1', 2013, 'XS'], [1988, x[1], 'ASN.1', 2013, 'XS'], [1964, x[1], 'ASN.1', 2013, 'XS'], [x[0], x[1], 'ASN.1', 2000, 'XS'], [x[0], x[1], 'ASN.1', 2007, 'XS'], [x[0], x[1], 'JSON5', x[3], x[4]]] if x in arr: return arr.index(x)" "def choicex2(cond, x): if cond == 'SASS': return x return x + 1 def choicex3(cond, x): if cond == 1965: return x return x + 1 def main(x): if x[2] == 2016: if x[1] == 'RAML': return choicex2(x[0], 0) elif x[1] == 'IOKE': return choicex3(x[3], 2) elif x[1] == 'MQL5': return choicex3(x[3], 4) elif x[2] == 1983: if x[3] == 1965: return choicex2(x[0], 6) return choicex2(x[0], 8) return 10" "def main(x): match x[3]: case 'RHTML': match x[0]: case 'ROFF': match x[4]: case 'J': match x[2]: case 'SCSS': return 0 case 'VUE': return 1 case 'XSLT': return 2 case 'VOLT': return 3 case 'NINJA': match x[2]: case 'SCSS': return 4 case 'VUE': match x[1]: case 1971: return 5 case 1979: return 6 case 'XSLT': match x[1]: case 1971: return 7 case 1979: return 8 case 'SHEN': match x[2]: case 'SCSS': return 9 case 'VUE': return 10 case 'XSLT': return 11" "def zero(items, left, middle, right): if items[0] == 1992: return left if items[0] == 1987: return middle if items[0] == 2011: return right def three(items, left, middle, right): if items[3] == 'PUG': return left if items[3] == 'XPROC': return middle if items[3] == 'LESS': return right def two(items, left, right): if items[2] == 'JSON': return left if items[2] == 'DIFF': return right def one(items, left, middle, right): if items[1] == 'TEA': return left if items[1] == 'NL': return middle if items[1] == 'XTEND': return right def main(items): return zero(items, two(items, one(items, 0, 1, 2), three(items, 3, 4, 5)), 6, three(items, 7, 8, one(items, 9, 10, 11)))" "def three(items, left, middle, right): if items[3] == 'MINID': return left if items[3] == 'D': return middle if items[3] == 'REBOL': return right def one(items, left, middle, right): if items[1] == 1970: return left if items[1] == 1966: return middle if items[1] == 1999: return right def zero(items, left, middle, right): if items[0] == 'C': return left if items[0] == 'UNO': return middle if items[0] == 'ELM': return right def two(items, left, right): if items[2] == 1971: return left if items[2] == 1986: return right def four(items, left, middle, right): if items[4] == 'NIT': return left if items[4] == 'ECL': return middle if items[4] == 'SHELL': return right def main(items): return four(items, two(items, zero(items, three(items, 0, 1, 2), three(items, 3, 4, 5), 6), zero(items, 7, 8, one(items, 9, 10, 11))), 12, 13)" "def zero(items, left, right): if items[0] == 'E': return left if items[0] == 'HAXE': return right def four(items, left, middle, right): if items[4] == 1999: return left if items[4] == 2017: return middle if items[4] == 1989: return right def three(items, left, right): if items[3] == 1989: return left if items[3] == 1973: return right def two(items, left, right): if items[2] == 'MQL5': return left if items[2] == 'JFLEX': return right def one(items, left, middle, right): if items[1] == 1986: return left if items[1] == 2007: return middle if items[1] == 2002: return right def main(items): return one(items, three(items, four(items, 0, 1, zero(items, 2, 3)), four(items, 4, 5, zero(items, 6, 7))), three(items, two(items, zero(items, 8, 9), 10), 11), 12)" "def main(x): minid_1971 = {'LFE': 0, 'ASN.1': 1, 'LEAN': 2} minid_1970 = {'LFE': 3, 'ASN.1': 4, 'LEAN': 5} minid_1966 = {'LFE': 6, 'ASN.1': 7, 'LEAN': 8} stan_1971 = {'LFE': 9, 'ASN.1': 10, 'LEAN': 11} all = {1970: 12, 1966: 13} if str(x[1]) == 'MINID': if x[3] == 1971: return minid_1971.get(x[2]) elif x[3] == 1970: return minid_1970.get(x[2]) elif x[3] == 1966: return minid_1966.get(x[2]) elif str(x[1]) == 'STAN': if x[3] == 1971: return stan_1971.get(x[2]) else: return all.get(x[3])" "def main(x): a = [3, {2018: [4, {2013: [0, {1993: [1, {2007: 0, 1985: 1, 1997: 2}], 1964: 3, 1960: 4}], 1984: [0, {1993: [1, {2007: 5, 1985: 6, 1997: 7}], 1964: 8, 1960: [1, {2007: 9, 1985: 10, 1997: 11}]}], 2016: 12}], 1982: 13}] while type(a) is not int: a = a[1][x[a[0]]] return a" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n1_1 = Node(0, [], []) n1_2 = Node(1, [], []) n1_3 = Node(2, [], []) n1 = Node(x[0], ['P4', 'CIRRU', 'ASN.1'], [n1_1, n1_2, n1_3]) n2_1 = Node(3, [], []) n2_2 = Node(4, [], []) n2_3 = Node(5, [], []) n2 = Node(x[0], ['P4', 'CIRRU', 'ASN.1'], [n2_1, n2_2, n2_3]) n3_1 = Node(7, [], []) n3_2 = Node(8, [], []) n3 = Node(x[4], ['PIC', 'XS'], [n3_1, n3_2]) n4_1 = Node(9, [], []) n4_2 = Node(10, [], []) n4_3 = Node(11, [], []) n4 = Node(x[3], ['ABNF', 'VALA', 'PIC'], [n4_1, n4_2, n4_3]) n5 = Node(x[4], ['PIC', 'XS'], [n1, n2]) n6_1 = Node(6, [], []) n6 = Node(x[0], ['P4', 'CIRRU', 'ASN.1'], [n6_1, n3, n4]) n7_1 = Node(12, [], []) n7 = Node(x[2], [2003, 1996, 1978], [n5, n6, n7_1]) n8_1 = Node(13, [], []) n = Node(x[1], [1998, 1964], [n7, n8_1]) while n: res = n n = n.find_next() return res.data" "def main(vector): match vector[0]: case 'STON': return 14 case 'MQL5': match vector[2]: case 'ASP': return 8 case 'QML': return 13 case 'MUPAD': match vector[3]: case 2011: return 12 case 1972: match vector[4]: case 'RUST': return 9 case 'YANG': return 10 case 'NSIS': return 11 case 'OOC': match vector[3]: case 2011: return 7 case 1972: match vector[2]: case 'QML': return 6 case 'MUPAD': match vector[4]: case 'RUST': return 3 case 'YANG': return 4 case 'NSIS': return 5 case 'ASP': match vector[1]: case 1958: return 0 case 1991: return 1 case 2014: return 2" "def main(args): dict1 = {1968: 0, 1981: 1, 1988: 2} dict1v2 = {1968: 4, 1981: 5, 1988: 6} dict1v3 = {1968: 7, 1981: 8, 1988: 9} dict3 = {1961: 3, 1976: dict1v2[args[1]]} dict0 = {'OPAL': dict1v3[args[1]], 'SHELL': 10, 'MQL5': 11} dict2 = {'TEXT': dict1[args[1]], 'MASK': dict3[args[3]], 'LEX': dict0[args[0]]} dict4 = {1971: dict2[args[2]], 2017: 12, 2016: 13} return dict4[args[4]]" "def main(keys_vector): keys_dict_0 = {'PIKE': 7, 'SQL': 6} keys_dict_2 = {'TEX': 0, 'GAMS': 1, 'ASP': 2} keys_dict_2_2 = {'TEX': 3, 'GAMS': 4, 'ASP': 5} keys_dict_2_3 = {'TEX': keys_dict_0, 'GAMS': 8, 'ASP': 9} if keys_vector[3] == 2002: if keys_vector[1] == 2007: return keys_dict_2[keys_vector[2]] else: return keys_dict_2_2[keys_vector[2]] elif keys_vector[2] == 'TEX': return keys_dict_2_3['TEX'][keys_vector[0]] else: return keys_dict_2_3[keys_vector[2]]" "s = {1989: {1985: {1983: 0, 1978: 1}, 1996: {1974: 2, 1969: 3, 1978: 4}, 1995: 5}, 1966: {1983: {1985: 6, 1996: 7, 1995: 8}, 1978: {1985: 9, 1996: 10, 1995: 11}}} def main(path): if path[3] == 1966: return s[path[3]][path[2]][path[1]] else: if path[1] == 1985: return s[path[3]][path[1]][path[2]] if path[1] == 1996: return s[path[3]][path[1]][path[0]] else: return 5" "def start(x, up, down): if x[2] == 'MTML': return up if x[2] == 'URWEB': return down def one(x, up, middle, down): if x[1] == 1964: return up if x[1] == 1976: return middle if x[1] == 1975: return down def zero(x, up, down): if x[0] == 1990: return up if x[0] == 1978: return down def three(x, up, down): if x[3] == 1979: return up if x[3] == 1970: return down def main(x): return start(x, one(x, zero(x, 0, 1), zero(x, 2, 3), 4), three(x, zero(x, 5, 6), one(x, 7, 8, 9)))" "def one(x, up, down): if x[1] == 2018: return up if x[1] == 2007: return down def zero(x, up, middle, down): if x[0] == 1998: return up if x[0] == 2007: return middle if x[0] == 1970: return down def four(x, up, middle, down): if x[4] == 2002: return up if x[4] == 2010: return middle if x[4] == 2006: return down def two(x, up, down): if x[2] == 2005: return up if x[2] == 1969: return down def three(x, up, down): if x[3] == 'TCSH': return up if x[3] == 'ADA': return down def main(x): return one(x, zero(x, four(x, two(x, 0, 1), two(x, 2, 3), 4), 5, three(x, two(x, 6, 7), four(x, 8, 9, 10))), 11)" "def zero(x, left, right): if x[0] == 'CIRRU': return left return right def one(x, left, right): if x[1] == 'ECL': return left return right def two(x, left, middle, right): if x[2] == 2013: return left if x[2] == 1988: return middle return right def three(x, left, middle, right): if x[3] == 'SVG': return left if x[3] == 'MAX': return middle return right def four(x, left, right): if x[1] == 1973: return left return right def main(x): return three(x, one(x, two(x, 0, four(x, 1, 2), 3), zero(x, 4, 5)), one(x, 6, 7), one(x, 8, two(x, 9, 10, 11)))" "def zero(items, left, right): if items[0] == 2003: return left if items[0] == 1968: return right def three(items, left, middle, right): if items[3] == 'RUST': return left if items[3] == 'TEXT': return middle if items[3] == 'SMT': return right def two(items, left, middle, right): if items[2] == 1957: return left if items[2] == 2016: return middle if items[2] == 2012: return right def one(items, left, middle, right): if items[1] == 2015: return left if items[1] == 2007: return middle if items[1] == 2003: return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), three(items, 3, 4, 5)), one(items, zero(items, 6, 7), zero(items, 8, 9), 10), 11)" "def main(res): ans = {0: {'EDN': {1: {'SHEN': 6, 'SVG': {2: {'ELM': 7, 'MESON': 8}}, 'RAGEL': 9}}, 'YAML': {3: {'KICAD': 5, 'C': 4}}, 'LOGOS': {3: {'KICAD': 3, 'C': {2: {'MESON': 2, 'ELM': {4: {1977: 1, 1962: 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): if x[1] == 'KRL': return x3_1(x) elif x[1] == 'GAP': return 13 elif x[1] == 'RED': return 14 def x3_1(x): if x[3] == 1999: return x4_3(x) elif x[3] == 1979: return x4_3_1(x) elif x[3] == 1963: return 12 def x4_3(x): if x[4] == 'JSX': return 0 elif x[4] == 'MUF': return x2_3_1(x) elif x[4] == 'SMT': return x2_3_2(x) def x4_3_1(x): if x[4] == 'JSX': return 7 elif x[4] == 'MUF': return x2_3_3(x) elif x[4] == 'SMT': return 11 def x2_3_1(x): if x[2] == 'GOLO': return 1 elif x[2] == 'OPA': return 2 elif x[2] == 'MESON': return 3 def x2_3_2(x): if x[2] == 'GOLO': return 4 elif x[2] == 'OPA': return 5 elif x[2] == 'MESON': return 6 def x2_3_3(x): if x[2] == 'GOLO': return 8 elif x[2] == 'OPA': return 9 elif x[2] == 'MESON': return 10" "def main(x): def checkFor1(a, b, c): if x[1] == 'FISH': return a if x[1] == 'GLSL': return b if x[1] == 'GAP': return c def checkFor0(a, b): if x[0] == 2014: return a if x[0] == 1981: return b def checkFor4(a, b): if x[4] == 1980: return a if x[4] == 1988: return b if x[2] == 1981: return checkFor0(checkFor4(checkFor1(0, 1, 2), checkFor1(3, 4, 5)), 6) elif x[2] == 1984: if x[3] == 'XML': return 7 elif x[3] == 'EC': return checkFor4(8, checkFor0(9, 10))" "def zero(items, left, middle, right): if items[0] == 1963: return left if items[0] == 1985: return middle if items[0] == 1987: return right def two(items, left, middle, right): if items[2] == 'E': return left if items[2] == 'SCSS': return middle if items[2] == 'LIMBO': return right def three(items, left, middle, right): if items[3] == 1974: return left if items[3] == 2007: return middle if items[3] == 1997: return right def main(items): return three(items, two(items, zero(items, 0, 1, 2), zero(items, 3, 4, 5), zero(items, 6, 7, 8)), zero(items, two(items, 9, 10, 11), 12, 13), 14)" "def zero(items, left, right): if items[0] == 1960: return left if items[0] == 1990: return right def four(items, left, middle, right): if items[4] == 'RDOC': return left if items[4] == 'RUBY': return middle if items[4] == 'ORG': return right def three(items, left, middle, right): if items[3] == 'GAMS': return left if items[3] == 'MAKO': return middle if items[3] == 'PUG': return right def two(items, left, middle, right): if items[2] == 'TEX': return left if items[2] == 'CSS': return middle if items[2] == 'COQ': return right def one(items, left, middle, right): if items[1] == 2012: return left if items[1] == 1991: return middle if items[1] == 1989: return right def main(items): return three(items, one(items, zero(items, 0, 1), two(items, 2, 3, zero(items, 4, 5)), 6), 7, four(items, 8, zero(items, 9, 10), 11))" "def main(x): dict3_l = {1994: 0, 1990: 1, 2011: 2} dict3_c = {'MUF': 5, 'BLADE': 6} dict3_r = {2020: 8, 2013: 9, 1958: 10} dict2_l = {2020: dict3_l[x[1]], 2013: 3, 1958: 4} dict2_r = {1994: dict3_c[x[3]], 1990: 7, 2011: dict3_r[x[0]]} dict1 = {1960: dict2_l[x[0]], 1987: dict2_r[x[1]], 1995: 11} return dict1[x[2]]" "def main(x): x1 = {'OOC': 1, 'VALA': 2} x3a = {'DYLAN': 0, 'RAGEL': x1[x[1]], 'HAML': 3} x2a = {2015: 4, 1972: 5} x2b = {2015: 7, 1972: 8} x3b = {'DYLAN': x2a[x[2]], 'RAGEL': 6, 'HAML': x2b[x[2]]} x0 = {'GENIE': x3a[x[3]], 'CSON': x3b[x[3]]} x4 = {1964: x0[x[0]], 1996: 9, 2012: 10} return x4[x[4]]" "def main(listx): if listx[3] == 1994: if listx[4] == 'LLVM': return func1(listx) elif listx[4] == 'LATTE': return func2(listx) elif listx[4] == 'SHEN': return 9 elif listx[3] == 2013: return 10 def func1(listx): if listx[1] == 'SQLPL': if listx[0] == 2008: return 0 elif listx[0] == 1960: return 1 elif listx[0] == 1959: return 2 if listx[1] == 'COBOL': return 3 if listx[1] == 'INI': return func3(listx) def func3(listx): if listx[0] == 2008: return 4 elif listx[0] == 1960: return 5 elif listx[0] == 1959: return 6 def func2(listx): if listx[2] == 1993: return 7 return 8" "def main(x): match x[1]: case 'TLA': match x[4]: case 'JSON5': match x[0]: case 1986: return 0 case 1974: return 1 case 'NCL': match x[2]: case 1986: match x[3]: case 2012: return 2 case 1970: return 3 case 1962: return 4 case 1991: match x[3]: case 2012: return 5 case 1970: return 6 case 1962: return 7 case 'RAML': match x[4]: case 'JSON5': match x[3]: case 2012: match x[2]: case 1986: return 8 case 1974: return 9 case 1970: return 10 case 1962: return 11 case 'NCL': return 12" "tree = [-1, 3, {'TEA': [11], 'SELF': [-1, 0, {'SWIFT': [-1, 1, {'DIFF': [5], 'SHELL': [6], 'NCL': [7]}], 'ORG': [-1, 1, {'DIFF': [8], 'SHELL': [9], 'NCL': [10]}]}], 'FREGE': [-1, 1, {'DIFF': [-1, 0, {'SWIFT': [0], 'ORG': [1]}], 'SHELL': [-1, 2, {2005: [2], 1990: [3]}], 'NCL': [4]}]}] def main(x): cur = tree while True: cur = cur[2][x[cur[1]]] if cur[0] > -1: return cur[0]" "def main(keys_vector): dict_4 = {1979: 1, 2017: 2, 2000: 3} dict_0 = {'JAVA': 4, 'GLYPH': 5} dict_3 = {'HY': 8, 'AGDA': 9, 'SCALA': 10} if keys_vector[2] == 2001: return dict_3[keys_vector[3]] elif keys_vector[1] == 'C': return 7 elif keys_vector[1] == 'LFE': return 6 elif keys_vector[3] == 'AGDA': return dict_4[keys_vector[4]] elif keys_vector[3] == 'SCALA': return dict_0[keys_vector[0]] else: return 0" "def choicex2(cond, x): if cond == 'REXX': return x elif cond == 'TEXT': return x + 1 return x + 2 def choicex0(cond, x): if cond == 'SMALI': return x return x + 1 def main(x): if x[4] == 1958: if x[0] == 'SMALI': if x[1] == 1963: return choicex2(x[2], 0) return 3 return 4 elif x[4] == 1979: if x[2] == 'REXX': if x[3] == 1958: return 5 elif x[3] == 1980: return 6 return choicex0(x[0], 7) elif x[2] == 'TEXT': return 9 return 10 return 11" "def main(args): dict2 = {2000: 0, 1995: 1} dict3 = {'CUDA': 2, 'PHP': 3, 'SMALI': 4} dict22 = {2000: 5, 1995: 6} dict222 = {2000: 7, 1995: 8} dict2222 = {2000: 9, 1995: 10} dict1 = {'VCL': dict2[args[2]], 'SASS': dict3[args[3]]} dict3_up = {'CUDA': dict22[args[2]], 'PHP': dict222[args[2]], 'SMALI': dict2222[args[2]]} dict0 = {'NESC': dict1[args[1]], 'XTEND': dict3_up[args[3]], 'SAGE': 11} return dict0[args[0]]" "def main(x): dict0_l = {'FANCY': 0, 'COOL': 1, 'COBOL': 2} dict0_c = {'FANCY': 4, 'COOL': 5, 'COBOL': 6} dict3_l = {'SASS': dict0_l[x[0]], 'RUBY': 3, 'REXX': dict0_c[x[0]]} dict3 = {'SASS': 7, 'RUBY': 8, 'REXX': 9} dict0_r = {'FANCY': dict3[x[3]], 'COOL': 10, 'COBOL': 11} dict4 = {1983: dict3_l[x[3]], 1963: dict0_r[x[0]]} dict1 = {2010: dict4[x[4]], 2018: 12, 1993: 13} return dict1[x[1]]" "def main(x): if x[2] == 'CSV': return lv1(x) elif x[2] == 'SVG': return lv4(x) else: return 9 def lv1(x): if x[0] == 'GLYPH': return lv2(x) else: return lv3(x) def lv2(x): if x[3] == 1962: return 0 elif x[3] == 1977: return 1 else: return 2 def lv3(x): if x[3] == 1962: return 3 elif x[3] == 1977: return 4 else: return 5 def lv4(x): if x[1] == 'NIX': return lv5(x) else: return 8 def lv5(x): if x[0] == 'GLYPH': return 6 else: return 7" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n4_1 = Node(0, [], []) n4_2 = Node(1, [], []) n4_3 = Node(2, [], []) n4_4 = Node(3, [], []) n4_5 = Node(4, [], []) n4_6 = Node(5, [], []) n4_7 = Node(7, [], []) n4_8 = Node(8, [], []) n3_1 = Node(x[3], ['EBNF', 'LESS'], [n4_1, n4_2]) n3_2 = Node(x[3], ['EBNF', 'LESS'], [n4_3, n4_4]) n3_3 = Node(x[1], [2015, 1982], [n4_5, n4_6]) n3_4 = Node(6, [], []) n3_5 = Node(x[3], ['EBNF', 'LESS'], [n4_7, n4_8]) n2_1 = Node(x[1], [2015, 1982], [n3_1, n3_2]) n2_2 = Node(x[2], ['E', 'DM', 'C++'], [n3_3, n3_4, n3_5]) n2_3 = Node(9, [], []) n1 = Node(x[0], [1981, 1991, 2000], [n2_1, n2_2, n2_3]) while n1: res = n1.data n1 = n1.find_next() return res" "def z(items, left, middle, right): if items[0] == 'DART': return left if items[0] == 'RED': return middle if items[0] == 'SQLPL': return right def o(items, left, middle, right): if items[1] == 'EAGLE': return left if items[1] == 'YANG': return middle if items[1] == 'EJS': return right def t(items, left, middle, right): if items[3] == 2008: return left if items[3] == 1977: return middle if items[3] == 2004: return right def f(items, left, right): if items[4] == 'TOML': return left if items[4] == 'LSL': return right def main(i): return f(i, t(i, o(i, 0, z(i, 1, 2, 3), z(i, 4, 5, 6)), 7, 8), 9)" "def one(items, left, middle, right): if items[1] == 'JSX': return left if items[1] == 'ROFF': return middle if items[1] == 'COQ': return right def two(items, left, right): if items[2] == 1991: return left if items[2] == 2013: return right def three(items, left, right): if items[3] == 2015: return left if items[3] == 1980: return right def main(items): return two(items, three(items, one(items, 0, 1, 2), one(items, 3, 4, 5)), one(items, three(items, 6, 7), three(items, 8, 9), 10))" "def main(x): rrr = {1997: 0, 1965: 1, 1969: 2} rr = {'MQL4': rrr[x[4]], 'PIC': 3} r = {'FREGE': rr[x[1]], 'SQF': 4, 'LATTE': 5} L = {1997: 7, 1965: 8, 1969: 9} c = {'PUG': r[x[3]], 'VUE': 6, 'OPAL': L[x[4]]} return c[x[0]]" "def main(x): if x[2] == 'OX': return 10 if x[4] == 1980: if x[0] == 'HTTP': match x[1]: case 2008: return 7 case 1976: return 8 return 9 if x[0] == 'ASP': if x[1] == 2008: return 4 if x[1] == 1976: return 5 return 6 if x[3] == 'CLICK': return 2 return 3 if x[3] == 'CLICK': return 0 return 1" "def two(items, left, right): if items[2] == 'OOC': return left if items[2] == 'LLVM': return right def zero(items, left, middle, right): if items[0] == 'KIT': return left if items[0] == 'TLA': return middle if items[0] == 'TCL': return right def one(items, left, middle, right): if items[1] == 1984: return left if items[1] == 1957: return middle if items[1] == 1958: return right def three(items, left, right): if items[3] == 'DIFF': return left if items[3] == 'CSON': return right def main(items): return three(items, one(items, two(items, 0, 1), zero(items, 2, 3, 4), two(items, 5, 6)), zero(items, 7, 8, two(items, 9, 10)))" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n6_3 = Node(9, [], []) n6_2 = Node(8, [], []) n6_1 = Node(7, [], []) n6 = Node(x[3], [2009, 1977, 1968], [n6_1, n6_2, n6_3]) n5_3 = Node(6, [], []) n5_2 = Node(5, [], []) n5_1 = Node(4, [], []) n5 = Node(x[3], [2009, 1977, 1968], [n5_1, n5_2, n5_3]) n4_3 = Node(2, [], []) n4_2 = Node(1, [], []) n4_1 = Node(0, [], []) n4 = Node(x[3], [2009, 1977, 1968], [n4_1, n4_2, n4_3]) n3_1 = Node(10, [], []) n3 = Node(x[0], [2010, 1982, 2020], [n5, n6, n3_1]) n2_1 = Node(3, [], []) n2 = Node(x[2], [2002, 1972], [n4, n2_1]) n1_1 = Node(11, [], []) n1 = Node(x[4], ['BLADE', 'VALA', 'PERL6'], [n2, n3, n1_1]) n_1 = Node(12, [], []) n = Node(x[1], [2017, 1971], [n1, n_1]) while n: res = n.data n = n.find_next() return res" "def x0(Items): if Items[0] == 1994: return x4(Items) if Items[0] == 2006: return 9 def x2a(Items): if Items[2] == 'XC': return 3 if Items[2] == 'FLUX': return x3(Items) def x2b(Items): if Items[2] == 'XC': return x1a(Items) if Items[2] == 'FLUX': return 8 def x1a(Items): if Items[1] == 'MINID': return 6 if Items[1] == 'NSIS': return 7 def x3(Items): if Items[3] == 1998: return 4 if Items[3] == 2020: return 5 def x4(Items): if Items[4] == 'HYPHY': return x1(Items) if Items[4] == 'FLUX': return x2a(Items) if Items[4] == 'KIT': return x2b(Items) def x1(Items): if Items[1] == 'MINID': return 0 if Items[1] == 'NSIS': return x2(Items) def x2(Items): if Items[2] == 'XC': return 1 if Items[2] == 'FLUX': return 2 def main(items): return x0(items)" "def main(args): dict2 = {'OPA': 0, 'CLEAN': 1} dict4 = {'NCL': 2, 'INI': 3} dict1 = {2016: 8, 2018: 9, 1969: 10} dict0 = {1973: dict2[args[2]], 1995: dict4[args[4]]} dict00 = {1973: 7, 1995: dict1[args[1]]} dict1_up = {2016: dict0[args[0]], 2018: 4, 1969: 5} dict2_up = {'OPA': dict00[args[0]], 'CLEAN': 11} dict3 = {'ASN.1': dict1_up[args[1]], 'SQF': 6, 'IDRIS': dict2_up[args[2]]} return dict3[args[3]]" "def main(mass): matrix = [['OX', 0, 1993, 'JFLEX', 0], ['OX', 1980, 1993, 'HAML', 0], ['OX', 2016, 1993, 'HAML', 0], ['OX', 2015, 1993, 'HAML', 0], ['OX', 0, 1993, 'PUG', 0], ['OX', 0, 2014, 'JFLEX', 0], ['OX', 0, 2014, 'HAML', 0], ['OX', 0, 2014, 'PUG', 1961], ['OX', 0, 2014, 'PUG', 1989], ['OX', 0, 2014, 'PUG', 1980], ['OX', 0, 2016, 0, 0], ['E', 0, 0, 0, 0], ['KRL', 0, 0, 0, 0]] for i in range(0, 13): a = 0 for j in range(0, 5): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 5: return i return main(['OX', 2015, 2014, 'JFLEX', 1989])" "def main(x): if x[3] == 1966: return two(x) elif x[2] == 'KICAD': if x[1] == 1962: return 7 else: return 8 elif x[4] == 'ELM': return 9 else: return 10 def two(x): if x[0] == 'TOML': if x[4] == 'WISP': if x[1] == 1962: return 1 else: return 2 else: return 0 if x[0] == 'TLA': return 3 elif x[2] == 'KICAD': if x[4] == 'WISP': return 5 else: return 4 else: return 6" "def main(x): if x[2] == 'ECL': if x[0] == 2009: return choice1(x[1], 0) elif x[0] == 1998: return 3 else: return 4 elif x[2] == 'LASSO': if x[0] == 2009: return 5 elif x[0] == 1998: return choice1(x[1], 6) else: return choice2(x[3], 9) else: return 12 def choice1(cond, x): if cond == 'NIX': return x elif cond == 'ASP': return x + 1 return x + 2 def choice2(cond, x): if cond == 2018: return x elif cond == 1986: return x + 1 return x + 2" "def four(items, left, middle, right): if items[4] == 1965: return left if items[4] == 1974: return middle if items[4] == 1960: return right def three(items, left, middle, right): if items[3] == 1991: return left if items[3] == 1987: return middle if items[3] == 1978: return right def two(items, left, right): if items[2] == 'VCL': return left if items[2] == 'VUE': return right def one(items, left, middle, right): if items[1] == 1990: return left if items[1] == 1976: return middle if items[1] == 1989: return right def zero(items, left, right): if items[0] == 'EC': return left if items[0] == 'HTML': return right def main(items): return zero(items, three(items, four(items, two(items, 0, 1), one(items, 2, 3, 4), 5), 6, two(items, one(items, 7, 8, 9), 10)), 11)" "def main(xx): x = xx def x0(value): if value == 'COBOL': if x[0] == 1975: return 0 elif x[0] == 2006: return 1 elif value == 'VOLT': if x[0] == 1975: return 4 elif x[0] == 2006: return 5 elif value == 1982: if x[0] == 1975: return 7 elif x[0] == 2006: return x1(x[0]) def x1(value): if value == 'HTML': if x[1] == 1975: return 2 elif x[1] == 2019: return 3 elif value == 2006: if x[1] == 1975: return 8 elif x[1] == 2019: return 9 def x2(value): if value == 1972: if x[2] == 'COBOL' or x[2] == 'VOLT': return x0(x[2]) elif x[2] == 'HTML': return x1(x[2]) def x3(): if x[3] == 1972: return x2(x[3]) elif x[3] == 1994: return 6 elif x[3] == 1982: return x0(x[3]) return x3()" "def three(items, left, middle, right): if items[3] == 2019: return left if items[3] == 1981: return right if items[3] == 1978: return middle def two(items, left, right): if items[2] == 'XPROC': return left if items[2] == 'ADA': return right def zero(items, left, right): if items[0] == 2000: return left if items[0] == 1958: return right def one(items, left, middle, right): if items[1] == 'MQL5': return left if items[1] == 'HTML': return middle if items[1] == 'STAN': return right def main(items): return one(items, zero(items, two(items, 0, 1), 2), two(items, 3, three(items, 4, 5, 6)), zero(items, 7, three(items, 8, 9, 10)))" "def main(x): if x[4] == 1965: return x3(x) if x[4] == 2007: return 7 if x[4] == 2004: return x2(x) def x3(x): if x[3] == 'ABNF': return x0(x) if x[3] == 'NIM': return 5 if x[3] == 'GLYPH': return 6 def x0(x): if x[0] == 'BISON': return x20(x) if x[0] == 'QML': return 3 if x[0] == 'PAN': return 4 def x20(x): if x[2] == 1988: return 0 if x[2] == 2019: return 1 if x[2] == 1958: return 2 def x2(x): if x[2] == 1988: return x32(x) if x[2] == 2019: return 13 if x[2] == 1958: return 14 def x32(x): if x[3] == 'ABNF': return x02(x) if x[3] == 'NIM': return 11 if x[3] == 'GLYPH': return 12 def x02(x): if x[0] == 'BISON': return 8 if x[0] == 'QML': return 9 if x[0] == 'PAN': return 10" "def zero(items, left, right): if items[0] == 'KICAD': return left if items[0] == 'MASK': return right def three(items, left, middle, right): if items[3] == 1997: return left if items[3] == 1977: return middle if items[3] == 2006: return right def two(items, left, right): if items[2] == 1979: return left if items[2] == 1960: return right def one(items, left, middle, right): if items[1] == 'PHP': return left if items[1] == 'JSON5': return middle if items[1] == 'TEXT': return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), 3), three(items, 4, one(items, 5, 6, 7), one(items, 8, 9, 10)))" "def main(x): if x[1] == 2005: if x[4] == 'IDRIS': if x[3] == 'EC': return 7 elif x[0] == 'GN': return 8 else: return 9 elif x[0] == 'GN': return 4 else: return choicex1(x[3], 5) elif x[4] == 'IDRIS': return 3 elif x[2] == 'OPAL': return 0 else: return choicex2(x[0], 1) def choicex1(cond, x): if cond == 'EC': return 5 return x + 1 def choicex2(cond, x): if cond == 'GN': return x return x + 1" "def zero(items, left, middle, right): if items[0] == 1988: return left if items[0] == 2016: return middle if items[0] == 2002: return right def four(items, left, right): if items[4] == 'ABNF': return left if items[4] == 'REXX': return right def three(items, left, middle, right): if items[3] == 1997: return left if items[3] == 1977: return middle if items[3] == 1970: return right def two(items, left, right): if items[2] == 2019: return left if items[2] == 1996: return right def one(items, left, right): if items[1] == 'OX': return left if items[1] == 'COBOL': return right def main(items): return three(items, zero(items, two(items, 0, four(items, 1, 2)), one(items, two(items, 3, 4), 5), one(items, 6, two(items, 7, 8))), two(items, zero(items, 9, 10, 11), 12), 13)" "def main(x): dict4 = {1976: 1, 1993: 2, 2015: 3} dict3_l = {1981: 0, 2001: dict4[x[1]], 1975: 4} dict3_c = {2005: 6, 1977: 7} dict3_r = {1976: 9, 1993: 10, 2015: 11} dict2_l = {'TOML': dict3_l[x[2]], 'OX': 5, 'NL': dict3_c[x[0]]} dict2_r = {'TOML': 8, 'OX': dict3_r[x[1]], 'NL': 12} dict1 = {2008: dict2_l[x[3]], 1969: dict2_r[x[3]], 1958: 13} return dict1[x[4]]" "def main(x): match x[4]: case 'JSX': match x[2]: case 'STON': match x[1]: case 'EDN': return 0 case 'RED': match x[0]: case 1967: return 1 case 2015: return 2 case 'SELF': return 3 case 'DM': match x[3]: case 'HAML': match x[1]: case 'RED': return 5 case 'EDN': return 4 case 'MAKO': match x[1]: case 'RED': return 7 case 'EDN': return 6 case 'MAKO': match x[3]: case 'HAML': return 8 case 'MAKO': return 9" "_dict = {'IDL': {1983: {2020: 0, 2008: 1, 1957: 2}, 2010: 3, 2018: 4}, 'IO': {1983: 5, 2010: {1992: 6, 1960: 7, 1978: 8}, 2018: 9}, 'SCALA': 10} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def choicex1(cond, x): if cond == 'HACK': return x elif cond == 'X10': return x + 1 return x + 2 def choicex2(cond, x): if cond == 'NGINX': return x return x + 1 def main(x): if x[0] == 'TEA': if x[4] == 1989: if x[3] == 'LOGOS': return choicex2(x[2], 1) elif x[3] == 'XSLT': return choicex2(x[2], 3) return 0 elif x[4] == 1976: return 5 return 6 elif x[0] == 'NU': return choicex1(x[1], 8) return 7" "from __future__ import annotations from typing import List tree = {'NCL': {'1970': {'2017': 0, '1958': 1, '1971': 2}, '2000': {'2017': 3, '1958': 4, '1971': 5}}, 'URWEB': {'1970': 6, '2000': {'BISON': 7, 'HAML': 8, 'KICAD': 9}}} def main(arr: List) -> int: global tree step = tree while True: for item in arr[::-1]: key = str(item) if key in step.keys(): step = step[key] if isinstance(step, int): return step" "from typing import List tree = {'CMAKE': {'1978': {'KICAD': 0, 'SQLPL': 1}, '1983': {'KICAD': 2, 'SQLPL': 3}, '1965': {'1969': 4, '1997': 5}}, 'EQ': {'1978': {'1969': 6, '1997': 7}, '1983': 8, '1965': 9}, 'TEXT': 10} def main(arr: List) -> int: global tree step = tree while True: for item in arr[::-1]: key = str(item) if key in step.keys(): step = step[key] if isinstance(step, int): return step" "def zero(items, left, right): if items[0] == 'FLUX': return left if items[0] == 'ARC': return right def one(items, left, right): if items[1] == 'PHP': return left if items[1] == 'TCSH': return right def two(items, left, right): if items[2] == 'AGDA': return left if items[2] == 'TCL': return right def three(items, left, right): if items[3] == 2009: return left if items[3] == 1971: return right def four(items, left, right): if items[4] == 2004: return left if items[4] == 1969: return right def main(items): return two(items, one(items, zero(items, four(items, 0, 1), 2), 3), three(items, one(items, zero(items, 4, 5), zero(items, 6, 7)), four(items, one(items, 8, 9), 10)))" "_dict = {'SQF': {'EBNF': {'MINID': {'CUDA': 0, 'POD': 1}, 'INI': 2}, 'IO': 3, 'SQL': {'VUE': 4, 'MTML': {'MINID': 5, 'INI': 6}, 'METAL': {'MINID': 7, 'INI': 8}}}, 'SVG': {'VUE': 9, 'MTML': 10, 'METAL': 11}} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def two(items, left, middle, right): if items[2] == 'ZIMPL': return left if items[2] == 'MQL5': return middle if items[2] == 'BISON': return right def three(items, left, right): if items[3] == 1961: return left if items[3] == 1992: return right def one(items, left, middle, right): if items[1] == 2010: return left if items[1] == 1990: return middle if items[1] == 2015: return right def four(items, left, middle, right): if items[4] == 2013: return left if items[4] == 1961: return middle if items[4] == 1981: return right def main(items): return four(items, one(items, three(items, 0, two(items, 1, 2, 3)), 4, 5), three(items, 6, two(items, one(items, 7, 8, 9), 10, 11)), 12)" "import math def main(x): b = 0 match x[3]: case 2014: match x[1]: case 1984: b = 12 case 1980: match x[2]: case 'MASK': b = 11 case 'NIX': b = 10 case 'TERRA': b = 9 case _: return b case _: return b case 2006: match x[4]: case 'RUST': b = 8 case 'SCAML': match x[0]: case 'APL': b = 7 case 'GAP': match x[2]: case 'MASK': b = 6 case 'NIX': b = 5 case 'TERRA': b = 4 case _: return b case _: return b case 'SAS': match x[1]: case 1984: b = 3 case 1980: match x[2]: case 'MASK': b = 2 case 'NIX': b = 1 case 'TERRA': b = 0 case _: return b case _: return b case _: return b case _: return b return b" "def main(ml: list): match ml[1]: case 1986: match ml[2]: case 'KIT': match ml[3]: case 1980: return 0 case 1976: return 1 case 'COQ': match ml[3]: case 1980: return 2 case 1976: return 3 case 1970: return 4 case 1960: match ml[4]: case 'LIMBO': match ml[3]: case 1980: return 5 case 1976: return 6 case 'GAMS': match ml[3]: case 1980: match ml[0]: case 2007: return 7 case 1972: return 8 case 2004: return 9 case 1976: return 10 case 'MQL4': return 11" "def choicex0(cond, x): if cond == 'MTML': return x elif cond == 'FISH': return x + 1 return x + 2 def choicex3(cond, x): if cond == 1998: return x elif cond == 2003: return x + 1 return x + 2 def main(x): if x[2] == 2014: if x[1] == 'JSON5': return choicex3(x[3], 0) return 3 elif x[2] == 2002: if x[1] == 'JSON5': return choicex0(x[0], 4) elif x[1] == 'CSON': return choicex0(x[0], 7)" "_dict = {1968: {2001: {1978: 0, 1960: 1}, 1964: {'XS': 2, 'GDB': 3}}, 1993: {'XS': {1978: 4, 1960: 5}, 'GDB': {2001: 6, 1964: 7}}, 1981: {1978: {2001: 8, 1964: 9}, 1960: 10}} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def main(xx): x = xx def x0(): if x[0] == 1991: return x3(x[0]) elif x[0] == 1989: return 11 elif x[0] == 2015: return 12 def x2(value): if value == 2017: if x[2] == 'QML': return 0 elif x[2] == 'ASP': return 1 elif x[2] == 'PONY': return 2 elif value == 1991: if x[2] == 'QML': return 4 elif x[2] == 'ASP': return 5 elif x[2] == 'PONY': return 6 def x3(value): if value == 1991: if x[3] == 'MINID' or x[3] == 'LOGOS': return x4(x[3]) elif x[3] == 'EQ': return 7 def x4(value): if value == 'MINID': if x[4] == 2017 or x[4] == 1991: return x2(x[4]) elif x[4] == 2008: return 3 elif value == 'LOGOS': if x[4] == 2017: return 8 elif x[4] == 2008: return 9 elif x[4] == 1991: return 10 return x0()" "def main(x): if x[1] == 'TLA': return 9 elif x[3] == 1981: return 8 elif x[3] == 2011: if x[0] == 2018: return 4 elif x[4] == 'SHELL': return 5 elif x[4] == 'TERRA': return 6 else: return 7 elif x[4] == 'SHELL': return 0 elif x[4] == 'SLIM': return 3 elif x[0] == 2018: return 1 else: return 2" "def main(x): if x[0] == 1982: if x[1] == 1972: return {1963: 0, 1973: 1, 2007: 2}[x[3]] elif x[1] == 2000: return {'SAGE': 4, 'PONY': 5}[x[2]] else: return 3 elif x[0] == 1983: if x[3] == 1973: return {1972: 7, 1969: 8, 2000: 9}[x[1]] elif x[3] == 1963: return 6 elif x[3] == 2007: return 10" "def zero(items, left, middle, right): if items[0] == 1980: return left if items[0] == 1968: return middle if items[0] == 1982: return right def three(items, left, right): if items[3] == 'AMPL': return left if items[3] == 'BLADE': return right def two(items, left, middle, right): if items[2] == 'SMT': return left if items[2] == 'FORTH': return middle if items[2] == 'POD': return right def one(items, left, middle, right): if items[1] == 'SELF': return left if items[1] == 'M4': return middle if items[1] == 'RDOC': return right def main(items): a = two(items, one(items, 0, 1, 2), 3, one(items, 4, 5, 6)) return zero(items, a, one(items, 7, three(items, 8, 9), 10), 11)" "_dict = {2012: {'MINID': {1975: 0, 1996: 1, 1986: 2}, 'PUG': {1975: 3, 1996: 4, 1986: 5}, 'REBOL': 6}, 2003: {'GOSU': 7, 'EAGLE': 8}, 1960: 9} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def main(args): dict3 = {1987: 0, 1988: 1} dict0 = {'XC': 3, 'TEX': 4} dict2 = {1966: 6, 1994: 7, 1959: 8} dict33 = {1987: 9, 1988: 10} dict2_up = {1966: dict3[args[3]], 1994: 2, 1959: dict0[args[0]]} dict0_up = {'XC': dict2[args[2]], 'TEX': dict33[args[3]]} dict1 = {'ATS': dict2_up[args[2]], 'RDOC': 5, 'GO': dict0_up[args[0]]} return dict1[args[1]]" "s = {2006: {2016: {'CHUCK': 0, 'IDL': 1, 'NINJA': 2}, 2002: {'CHUCK': 3, 'IDL': 4, 'NINJA': 5}, 2014: {'CHUCK': 6, 'IDL': 7, 'NINJA': 8}}, 2019: 9} def main(path): s1 = s[path[2]] if isinstance(s1, int): return s1 else: s2 = s1[path[1]] s3 = s2[path[0]] return s3" "def two(items, left, middle, right): if items[2] == 1980: return left if items[2] == 2003: return middle if items[2] == 2017: return right def one(items, middle, right): if items[1] == 1975: return middle if items[1] == 1974: return right def three(items, left, middle, right): if items[3] == 1998: return left if items[3] == 2009: return middle if items[3] == 1994: return right def zero(items, left, middle, right): if items[0] == 'XPROC': return left if items[0] == 'NUMPY': return middle if items[0] == 'DART': return right def main(items): return two(items, three(items, one(items, 0, 1), one(items, 2, 3), 4), 5, one(items, 6, zero(items, 7, 8, 9)))" "def zero(items, left, middle, right): if items[0] == 1990: return left if items[0] == 1965: return middle if items[0] == 2010: return right def three(items, left, middle, right): if items[3] == 2014: return left if items[3] == 1986: return middle if items[3] == 2002: return right def two(items, left, middle, right): if items[2] == 2004: return left if items[2] == 1966: return middle if items[2] == 1996: return right def one(items, left, middle, right): if items[1] == 'YANG': return left if items[1] == 'COBOL': return middle if items[1] == 'PHP': return right def main(items): return two(items, zero(items, one(items, 0, 1, 2), one(items, 3, 4, 5), 6), three(items, 7, one(items, 8, 9, 10), 11), 12)" "def main(res): ans = {3: {'NESC': 11, 'MINID': {1: {'XBASE': 10, 'IOKE': {4: {1981: 5, 1984: {2: {'RHTML': 8, 'C++': 7, 'YANG': 6}}, 1971: {0: {2015: 9}}}}, 'SMALI': {4: {1971: 4, 1984: {0: {2015: 3}}, 1981: {2: {'RHTML': 2, 'C++': 1, 'YANG': 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(xx): x = xx def x0(value): if value == 'REXX': if x[0] == 'YAML': return 0 elif x[0] == 'R': return 1 elif x[0] == 'TEXT': return 2 if value == 'GENIE': if x[0] == 'YAML': return 6 elif x[0] == 'R': return 7 elif x[0] == 'TEXT': return 8 def x1(value): if value == 'CSV': if x[1] == 'SLASH': return 3 elif x[1] == 'CMAKE': return 4 elif x[1] == 'APL': return 5 if value == 1965: if x[1] == 'SLASH': return 9 elif x[1] == 'CMAKE': return 10 elif x[1] == 'APL': return 11 def x2(value): if value == 1999: if x[2] == 'REXX' or x[2] == 'GENIE': return x0(x[2]) elif x[2] == 'CSV': return x1(x[2]) def x3(): if x[3] == 1999: return x2(x[3]) elif x[3] == 1965: return x1(x[3]) return x3()" "def main(x): match x[1]: case 1962: match x[4]: case 2010: match x[0]: case 2011: match x[3]: case 'RED': return 0 case 'MAX': return 1 case 1964: match x[2]: case 1993: return 2 case 1958: return 3 case 1996: return 4 case 1994: match x[0]: case 2011: return 5 case 1964: return 6 case 2018: match x[0]: case 2011: match x[2]: case 1993: return 7 case 1958: return 8 case 1996: return 9 case 1964: return 10 case 1988: return 11 case 1965: return 12" "dictionary1 = {'REBOL': 0, 'ZIMPL': 1} dictionary2 = {'RED': 2, 'GOSU': 3, 'TERRA': 4} dictionary3 = {'EJS': 9, 'APEX': 10} def main(items): if items[1] == 1985: if items[0] == 'SAS': if items[3] == 'EJS': return dictionary1.get(items[2]) else: return dictionary2.get(items[4]) elif items[0] == 'GN': return 5 else: return 6 if items[1] == 1992: if items[0] == 'BOO': if items[2] == 'REBOL': return dictionary3.get(items[3]) else: return 11 elif items[0] == 'SAS': return 7 else: return 8" "def zero(items, left, middle, right): if items[0] == 'METAL': return left if items[0] == 'J': return middle if items[0] == 'REBOL': return right def one(items, left, right): if items[1] == 'IOKE': return left if items[1] == 'GOSU': return right def three(items, left, middle, right): if items[3] == 2002: return left if items[3] == 1965: return middle if items[3] == 1970: return right def four(items, left, middle, right): if items[4] == 'EC': return left if items[4] == 'LEAN': return middle if items[4] == 'CSV': return right def main(items): return one(items, four(items, three(items, zero(items, 0, 1, 2), 3, 4), zero(items, 5, three(items, 6, 7, 8), 9), 10), 11)" "def main(args): dict1 = {'OCAML': 1, 'J': 2, 'JULIA': 3} dict4 = {2000: 0, 2006: dict1[args[1]]} dict1_up = {'OCAML': 4, 'J': 5, 'JULIA': 6} dict1_1_up = {'OCAML': 7, 'J': 8, 'JULIA': 9} dict2 = {'NINJA': dict1_up[args[1]], 'CMAKE': dict1_1_up[args[1]], 'PUG': 10} dict0 = {'NIM': dict4[args[4]], 'SHELL': dict2[args[2]], 'FREGE': 11} dict3 = {2006: dict0[args[0]], 1977: 12, 1979: 13} return dict3[args[3]]" "def main(x): match x[4]: case 2015: match x[3]: case 1994: match x[1]: case 2007: return 0 case 1964: match x[2]: case 1987: return 1 case 2008: return 2 case 1996: return 3 case 1979: return 4 case 1999: match x[1]: case 2007: return 5 case 1964: match x[2]: case 1987: return 6 case 2008: return 7 case 1996: return 8 case 1973: return 9" "def main(x): if x[0] == 2013 and x[3] == 'EJS' and (x[2] == 'STAN'): return 0 elif x[0] == 2013 and x[3] == 'EJS' and (x[2] == 'EJS'): return 1 elif x[0] == 2013 and x[3] == 'CLIPS': return 2 return b(x) def b(x): if x[0] == 2013 and x[3] == 'JSX': return 3 elif x[0] == 1987: return 9 if x[0] == 1973 and x[2] == 'STAN' and (x[3] == 'EJS'): return 4 return a(x) def a(x): if x[0] == 1973 and x[2] == 'STAN' and (x[3] == 'CLIPS'): return 5 if x[0] == 1973 and x[2] == 'STAN' and (x[3] == 'JSX'): return 6 if x[0] == 1973 and x[2] == 'EJS' and (x[1] == 'ORG'): return 7 return q(x) def q(x): if x[0] == 1973 and x[2] == 'EJS' and (x[1] == 'XOJO'): return 8" "def main(x): x_3_b = {2007: 6, 1978: 7, 1965: 8} x_3_a = {2007: 3, 1978: 4, 1965: 5} x_2 = {2006: 0, 1991: 1, 2018: 2} x_0 = {'E': x_2[x[2]], 'VOLT': x_3_a[x[3]], 'SLIM': x_3_b[x[3]]} x_1 = {'D': x_0[x[0]], 'KICAD': 9} return x_1[x[1]]" "def main(x): a = [0, {1983: [3, {'CSV': 7, 'LLVM': [4, {1957: [2, {'OCAML': 0, 'SCALA': 1, 'SLASH': 2}], 1965: [2, {'OCAML': 3, 'SCALA': 4, 'SLASH': 5}], 1964: 6}]}], 1981: [3, {'LLVM': [4, {1957: 8, 1965: [1, {'NSIS': 9, 'EC': 10, 'SLASH': 11}], 1964: 12}], 'CSV': 13}]}] while type(a[1][x[a[0]]]) != int: a = a[1][x[a[0]]] return a[1][x[a[0]]]" "def zero(items, left, middle, right): if items[0] == 2002: return left if items[0] == 1997: return middle if items[0] == 1986: return right def four(items, left, middle, right): if items[4] == 1991: return left if items[4] == 1973: return middle if items[4] == 2013: return right def three(items, left, right): if items[3] == 2002: return left if items[3] == 1979: return right def two(items, left, middle, right): if items[2] == 1969: return left if items[2] == 1994: return middle if items[2] == 1975: return right def one(items, left, middle, right): if items[1] == 2017: return left if items[1] == 1977: return middle if items[1] == 1994: return right def main(items): return three(items, one(items, four(items, 0, two(items, 1, 2, 3), two(items, 4, 5, 6)), four(items, zero(items, 7, 8, 9), 10, 11), 12), 13)" "def main(x): x1 = {1988: 7, 1977: 8} x2_1 = {'ASN.1': 2, 'JSON': 3, 'JSX': 4} x2 = {'ASN.1': 6, 'JSX': 9, 'JSON': x1[x[1]]} x4 = {'BOO': 0, 'FANCY': 1, 'LEX': x2_1[x[2]]} x0_1 = {1980: x2[x[2]], 2018: 10} x0 = {1980: x4[x[4]], 2018: 5} x3 = {2004: x0[x[0]], 1957: x0_1[x[0]], 2018: 11} return x3[x[3]]" "def main(x): match x[3]: case 'TEA': match x[1]: case 'BLADE': match x[2]: case 2013: return 0 case 2008: return 1 case 1995: return 2 case 'GDB': return 3 case 'SVG': return 4 case 'GENIE': match x[2]: case 2013: match x[1]: case 'BLADE': return 5 case 'GDB': return 6 case 'SVG': return 7 case 2008: match x[0]: case 'URWEB': return 8 case 'CMAKE': return 9 case 1995: return 10 case 'PAN': return 11" "def main(args): dict1 = {'C++': 0, 'STON': 1, 'XPROC': 2} dict4 = {'POD': dict1[args[1]], 'R': 3} dict0 = {1991: 4, 1988: 5} dict3 = {1981: dict4[args[4]], 2013: dict0[args[0]]} dict3_up = {1981: 7, 2013: 8} dict00 = {1991: dict3_up[args[3]], 1988: 9} dict2 = {'IDRIS': dict3[args[3]], 'NGINX': 6, 'AWK': dict00[args[0]]} return dict2[args[2]]" "def main(x): match x[1]: case 2005: match x[2]: case 1971: match x[3]: case 1971: return 0 case 1977: return 1 case 1982: return 2 case 1995: match x[0]: case 1957: return 3 case 1980: return 4 case 1998: return 5 case 2002: match x[3]: case 1971: return 6 case 1977: return 7 case 1982: return 8 case 1974: match x[2]: case 1971: return 9 case 1995: return 10 case 2002: return 11" "def main(x): dict1 = {'TCSH': 0, 'XS': 1} dict2 = {'TCSH': 2, 'XS': 3} dict3 = {1986: 5, 2020: 6} dict4 = {'TCSH': 9, 'XS': 10} dict5 = {2018: dict1.get(x[3]), 2013: dict2.get(x[3]), 1991: 4} dict6 = {'TCSH': dict3.get(x[4]), 'XS': 7} dict7 = {1986: 8, 2020: dict4.get(x[3])} if x[0] == 1974: if x[2] == 1999: return dict5.get(x[1]) elif x[2] == 1968: return dict6.get(x[3]) elif x[2] == 1977: return dict7.get(x[4]) elif x[0] == 1995: return 11" "def main(res): ans = {3: {1998: 11, 2014: {0: {1998: 6, 2014: {1: {1968: 8, 1958: 7}}, 2001: {1: {1958: 9, 1968: 10}}}}, 2013: {1: {1968: 5, 1958: {2: {'SMALI': {0: {2001: 4, 2014: 3, 1998: 2}}, 'KRL': {4: {1972: 1, 1999: 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): dict5 = {'EJS': 3, 'ABAP': 4} dict6 = {'EJS': 6, 'ABAP': 7} dict7 = {'EJS': 9, 'ABAP': 10} dict1 = {1980: 2, 1963: 5} dict3 = {'EQ': 0, 'IOKE': 1} if x[4] == 'PIC': if x[0] == 'HY': return dict3.get(x[2]) elif x[0] == 'M': if x[1] == 1989: return dict5.get(x[3]) else: return dict1.get(x[1]) elif x[4] == 'GO': if x[2] == 'EQ': if x[1] == 1980: return dict6.get(x[3]) elif x[1] == 1989: return 8 elif x[1] == 1963: return dict7.get(x[3]) else: return 11" "def main(res): ams = {0: {1980: {3: {'ALLOY': {4: {'LSL': 9, 'NESC': 10}}, 'JULIA': 11, 'SWIFT': 12}}, 1996: {1: {1971: 8, 2016: 7, 1972: {2: {'ECL': {3: {'ALLOY': 0, 'JULIA': 1, 'SWIFT': 2}}, 'PAN': {3: {'ALLOY': 3, 'JULIA': 4, 'SWIFT': 5}}, 'QMAKE': 6}}}}}} while isinstance(ams, dict): ind = int(*ams) ams = ams[ind] key = res[ind] ams = ams[key] return ams assert main([1996, 1971, 'QMAKE', 'SWIFT', 'LSL']) == 8 assert main([1980, 1971, 'PAN', 'JULIA', 'LSL']) == 11" "s = ({1992, 2012, 1994, 1962}, {1992, 2012, 1994, 1967}, {1992, 2012, 1994, 1987}, {1992, 2012, 1977, 'VALA'}, {1992, 2012, 1977, 'C++'}, {1992, 2012, 1959}, {1992, 1999, 1962, 1994}, {1992, 1999, 1962, 1977}, {1992, 1999, 1962, 1959}, {1992, 1999, 1967}, {1992, 1999, 1987}, {1992, 2001}, {1973}) def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "def choicex2(cond, x): if cond == 1995: return x elif cond == 2007: return x + 1 return x + 2 def choicex3(cond, x): if cond == 'PERL6': return x return x + 1 def choicex1(cond, x): if cond == 1999: return x elif cond == 2012: return x + 1 return x + 2 def main(x): if x[2] == 2011: if x[3] == 1984: if x[0] == 'PERL6': return choicex1(x[4], 2) return choicex2(x[1], 5) return choicex3(x[0], 0) elif x[2] == 1967: return 8 return 9" "def four(items, left, middle, right): if items[4] == 1982: return left if items[4] == 1988: return middle if items[4] == 1969: return right def three(items, left, right): if items[3] == 'MTML': return left if items[3] == 'SMT': return right def two(items, left, middle, right): if items[2] == 2019: return left if items[2] == 2006: return right if items[2] == 1973: return middle def one(items, left, middle, right): if items[1] == 'IDRIS': return left if items[1] == 'MASK': return middle if items[1] == 'NIM': return right def main(items): return two(items, three(items, one(items, four(items, 0, 1, 2), four(items, 3, 4, 5), four(items, 6, 7, 8)), 9), 10, 11)" "def choicex0(cond, x): if cond == 'C': return x elif cond == 'NIX': return x + 1 return x + 2 def main(x): if x[2] == 1957: if x[3] == 'UNO': if x[4] == 2009: return choicex0(x[0], 0) return choicex0(x[0], 3) elif x[3] == 'HCL': if x[1] == 2002: return choicex0(x[0], 8) elif x[1] == 2005: return 7 return 11 return 6 elif x[2] == 1968: return 12 return 13" "def one(items, left, middle, right): if items[1] == 'PERL6': return left if items[1] == 'ASN.1': return middle if items[1] == 'VCL': return right def zero(items, left, middle, right): if items[0] == 'MIRAH': return left if items[0] == 'RAGEL': return middle if items[0] == 'ELM': return right def three(items, left, middle, right): if items[3] == 2012: return left if items[3] == 2005: return middle if items[3] == 1973: return right def two(items, left, middle, right): if items[2] == 1995: return left if items[2] == 2020: return middle if items[2] == 1959: return right def main(items): return two(items, zero(items, one(items, 0, 1, 2), one(items, 3, 4, 5), one(items, 6, 7, 8)), three(items, 9, 10, 11), 12)" "def zero(items, left, right): if items[0] == 'RUBY': return left if items[0] == 'IDRIS': return right def four(items, left, middle, right): if items[4] == 'RUBY': return left if items[4] == 'C++': return middle if items[4] == 'JSX': return right def three(items, left, middle, right): if items[3] == 'KICAD': return left if items[3] == 'REBOL': return middle if items[3] == 'ELM': return right def two(items, left, middle, right): if items[2] == 2002: return left if items[2] == 1984: return middle if items[2] == 2011: return right def one(items, left, right): if items[1] == 1974: return left if items[1] == 2015: return right def main(items): return two(items, zero(items, one(items, 0, 1), 2), three(items, one(items, 3, 4), zero(items, four(items, 5, 6, 7), 8), one(items, 9, 10)), 11)" "def main(x): if x[0] == 1957: if x[1] == 'PIC': return [1990, 1972, 1985].index(x[2]) elif x[1] == 'SASS': return [1990, 1972, 1985].index(x[2]) + 3 else: return 6 elif x[0] == 1993: return 7 elif x[2] == 1990: return 8 elif x[2] == 1972: return ['AWK', 'ANTLR'].index(x[3]) + 9 else: return 11" "def choicex0(cond, x): if cond == 1999: return x elif cond == 2018: return x + 1 return x + 2 def choicex3(cond, x): if cond == 2014: return x elif cond == 1980: return x + 1 return x + 2 def main(x): if x[4] == 'CSS': if x[1] == 'ASN.1': if x[3] == 1978: return choicex0(x[0], 2) elif x[3] == 1980: return 1 return 0 elif x[1] == 'CIRRU': if x[2] == 1971: return choicex3(x[3], 6) elif x[2] == 1980: return 5 return 9 return 10 return 11" "def zero(items, left, right): if items[0] == 1986: return left if items[0] == 1988: return right def three(items, left, right): if items[3] == 2007: return left if items[3] == 2019: return right def two(items, left, right): if items[2] == 2005: return left if items[2] == 2017: return right def one(items, left, middle, right): if items[1] == 'XOJO': return left if items[1] == 'EDN': return middle if items[1] == 'YAML': return right def main(items): return zero(items, two(items, three(items, 0, 1), one(items, 2, 3, 4)), two(items, one(items, 5, 6, 7), three(items, 8, 9)))" "decision_tree = {'GLYPH': (3, {'MTML': (4, {2007: 0, 1991: 1, 1970: 2}), 'GRACE': 3, 'COQ': 4}), 'SLIM': (1, {1996: (3, {'MTML': 5, 'GRACE': (0, {'XPROC': 6, 'SLIM': 7, 'FORTH': 8}), 'COQ': (0, {'XPROC': 9, 'SLIM': 10, 'FORTH': 11})}), 1992: 12})} def main(x): node = decision_tree[x[2]] while not isinstance(node, int): subtree = node[1] idx = node[0] val = x[idx] node = subtree[val] return node" "_dict = {'IDRIS': {'XSLT': {1993: {'KIT': 0, 'ADA': 1}, 1996: {'KIT': 2, 'ADA': 3}, 1977: 4}, 'LASSO': {'KIT': {1993: 5, 1996: 6, 1977: 7}, 'ADA': 8}, 'EQ': {'KIT': {1993: 9, 1996: 10, 1977: 11}, 'ADA': 12}}, 'GENIE': 13, 'IO': 14} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def main(x): dict2_l = {'LATTE': 0, 'SCSS': 1, 'PAWN': 2} dict2_c = {'LATTE': 3, 'SCSS': 4, 'PAWN': 5} dict3_l = {1960: dict2_l[x[2]], 1996: dict2_c[x[2]]} dict2_r = {'LATTE': 8, 'SCSS': 9, 'PAWN': 10} dict3_r = {1960: 7, 1996: dict2_r[x[2]]} dict1 = {'STATA': dict3_l[x[3]], 'LIMBO': 6, 'ABAP': dict3_r[x[3]]} dict0 = {2017: dict1[x[1]], 1975: 11} return dict0[x[0]]" "def zero(items, middle): if items[0] == 1963: return middle def four(items, left, right): if items[4] == 'EDN': return left if items[4] == 'VCL': return right def three(items, left, middle, right): if items[3] == 'COOL': return left if items[3] == 'NIT': return middle if items[3] == 'PAWN': return right def two(items, left, middle, right): if items[2] == 1971: return left if items[2] == 1963: return middle if items[2] == 1970: return right def one(items, left, right): if items[1] == 2003: return left if items[1] == 1964: return right def main(items): return three(items, two(items, four(items, one(items, 0, 1), one(items, 2, 3)), zero(items, 4), 5), two(items, 6, four(items, 7, 8), four(items, one(items, 9, 10), 11)), 12)" "def main(x): if x[1] == 'FISH': if x[3] == 'DM': if x[0] == 1963: list1 = {1987: 0, 1980: 1} return list1[x[4]] else: list2 = {1998: 2, 2006: 3, 1990: 4} return list2[x[2]] if x[3] == 'SQF': return 5 if x[1] == 'TXL': if x[3] == 'DM': return 6 if x[3] == 'SQF': if x[4] == 1987: return 7 else: list3 = {1998: 8, 2006: 9, 1990: 10} return list3[x[2]]" "def zero(items, left, middle, right): if items[0] == 'CLICK': return left if items[0] == 'EC': return middle if items[0] == 'MUPAD': return right def one(items, left, middle, right): if items[1] == 'RAML': return left if items[1] == 'FISH': return middle if items[1] == 'GAMS': return right def two(items, left, right): if items[2] == 1959: return left if items[2] == 1990: return right def three(items, left, middle, right): if items[3] == 2005: return left if items[3] == 2008: return middle if items[3] == 2010: return right def four(items, left, right): if items[4] == 2019: return left if items[4] == 1980: return right def main(items): return one(items, two(items, four(items, 0, 1), 2), two(items, 3, three(items, 4, four(items, 5, 6), zero(items, 7, 8, 9))), 10)" "def main(x): match x[3]: case 2014: match x[2]: case 'ORG': match x[1]: case 'LIMBO': return 0 case 'CHUCK': return 1 case 'STON': return 2 case 'TEA': return 3 case 1963: match x[1]: case 'LIMBO': return 4 case 'CHUCK': match x[0]: case 2006: return 5 case 1976: return 6 case 'STON': return 7 case 1998: match x[2]: case 'ORG': match x[0]: case 2006: return 8 case 1976: return 9 case 'TEA': return 10" "def three_1(item): if item == 'PONY': return 2 if item == 'LUA': return 3 if item == 'GLSL': return 4 def three_2(item): if item == 'PONY': return 5 if item == 'LUA': return 6 if item == 'GLSL': return 7 def three_3(item): if item == 'PONY': return 8 if item == 'LUA': return 9 if item == 'GLSL': return 10 def one_2(item): if item[0] == 1981: return three_2(item[2]) if item[0] == 2002: return three_3(item[2]) if item[0] == 2013: return 11 def one_1(item): if item[0] == 1981: return 0 if item[0] == 2002: return 1 if item[0] == 2013: return three_1(item[2]) def four(item): items = [item[0], item[1], item[2]] if item[3] == 2020: return one_2(items) else: return one_1(items) def func(item): if item[0] == 'OOC': return 12 if item[0] == 'HAXE': return 13 else: items = [item[1], item[2], item[3], item[4]] return four(items) def main(item): return func(item)" "s = ({'PAWN', 2015, 1959}, {'PAWN', 2015, 1985}, {'PAWN', 2015, 1968}, {'PAWN', 1979, 'SHELL', 'TEX'}, {'PAWN', 1979, 'SHELL', 'HTTP'}, {'PAWN', 1979, 'SHELL', 'SLIM'}, {'PAWN', 1979, 'KRL', 1959}, {'PAWN', 1979, 'KRL', 1985}, {'PAWN', 1979, 'KRL', 1968}, {'PAWN', 1979, 'OX'}, {'MIRAH'}, {'GRACE'}) def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "def main(x): match x[2]: case 'NINJA': match x[4]: case 'PLSQL': match x[0]: case 1992: match x[1]: case 1965: return 0 case 1970: return 1 case 2018: match x[1]: case 1965: return 2 case 1970: return 3 case 1964: match x[1]: case 1965: return 4 case 1970: return 5 case 'RUBY': match x[3]: case 'RUBY': match x[0]: case 1992: return 6 case 2018: return 7 case 1964: return 8 case 'SELF': return 9 case 'OZ': return 10 case 'SLIM': return 11" "def zero(items, left, middle, right): if items[0] == 'ASN.1': return left if items[0] == 'EAGLE': return middle if items[0] == 'HTTP': return right def three(items, left, right): if items[3] == 'YAML': return left if items[3] == 'BOO': return right def two(items, left, middle, right): if items[2] == 'DYLAN': return left if items[2] == 'PUG': return middle if items[2] == 'GLSL': return right def one(items, left, middle, right): if items[1] == 'IDL': return left if items[1] == 'OPA': return middle if items[1] == 'TEA': return right def main(items): return one(items, three(items, two(items, 0, 1, 2), two(items, 3, 4, 5)), zero(items, two(items, 6, 7, 8), 9, 10), 11)" "def main(x): tree = (1, {'OOC': (2, {1999: (0, {'CSV': 0, 'ASP': 1, 'XOJO': 2}), 1997: (0, {'CSV': 3, 'ASP': 4, 'XOJO': 5}), 1972: (3, {'HYPHY': 6, 'GLYPH': 7})}), 'NSIS': (0, {'CSV': (3, {'HYPHY': 8, 'GLYPH': 9}), 'ASP': 10, 'XOJO': 11})}) while not isinstance(tree, int): tree = tree[1][x[tree[0]]] return tree" "def zero(items, left, right): if items[0] == 'OOC': return left if items[0] == 'TEX': return right def four(items, left, middle, right): if items[4] == 'HLSL': return left if items[4] == 'LSL': return middle if items[4] == 'NSIS': return right def three(items, left, right): if items[3] == 'TOML': return left if items[3] == 'SCAML': return right def two(items, left, middle, right): if items[2] == 1992: return left if items[2] == 1971: return middle if items[2] == 1969: return right def one(items, left, right): if items[1] == 'LUA': return left if items[1] == 'PERL6': return right def main(items): return four(items, zero(items, three(items, one(items, 0, 1), two(items, 2, 3, 4)), one(items, three(items, 5, 6), 7)), 8, two(items, zero(items, three(items, 9, 10), 11), 12, 13))" "_dict = {1982: {2017: {'KIT': {'LEAN': 0, 'REBOL': 1, 'C': 2}, 'CSS': 3}, 1959: {2001: 4, 1998: {'LEAN': 5, 'REBOL': 6, 'C': 7}, 2014: 8}}, 2020: 9} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "s = {'SQLPL': {'MINID': {'X10': 0, 'YANG': {'PHP': 1, 'LESS': 2, 'FORTH': 3}}, 'ASN.1': 10}, 'ADA': {'MINID': {'GLYPH': 5, 'EJS': 6, 'NINJA': 7}, 'ASN.1': {'GLYPH': 8, 'EJS': {'PHP': 9, 'LESS': 10, 'FORTH': 11}, 'NINJA': 12}}} def main(path): s1 = s[path[2]] if path[2] == 'SQLPL': s2 = s1[path[3]] if path[3] == 'MINID': s3 = s2[path[0]] if isinstance(s3, int): return s3 return s3[path[1]] return 4 else: s2 = s1[path[3]] if path[3] == 'ASN.1': s3 = s2[path[4]] if path[4] == 'GLYPH': return 8 elif path[4] == 'NINJA': return 12 else: return s3[path[1]] else: return s2[path[4]]" "def main(x): dict1 = {'BISON': 1, 'ABNF': 2, 'EAGLE': 3} dict2 = {'LSL': 5, 'QMAKE': 6, 'OPAL': 7} if x[0] == 'P4': if x[2] == 2019: if x[3] == 'SMT': return 0 elif x[3] == 'SQLPL': return dict1.get(x[4]) elif x[2] == 2016: if x[4] == 'BISON': return 4 elif x[4] == 'ABNF': return dict2.get(x[1]) elif x[4] == 'EAGLE': return 8 return 9" "def zero(items, left, right): if items[0] == 'CLIPS': return left if items[0] == 'APL': return right def four(items, left, right): if items[4] == 1979: return left if items[4] == 1975: return right def three(items, left, right): if items[3] == 'ROUGE': return left if items[3] == 'COOL': return right def two(items, left, middle, right): if items[2] == 2007: return left if items[2] == 1986: return middle if items[2] == 1989: return right def one(items, left, middle, right): if items[1] == 1963: return left if items[1] == 2019: return middle if items[1] == 1960: return right def main(items): return three(items, four(items, two(items, zero(items, 0, 1), one(items, 2, 3, 4), 5), 6), four(items, one(items, 7, zero(items, 8, 9), 10), 11))" "def main(x): ans1 = {1989: {'IDL': {2010: {1967: 0, 1985: 1}, 2017: 2}, 'PERL6': {1967: 3, 1985: 4}, 'NUMPY': {1967: 5, 1985: 6}}} ans2 = {1961: {2010: {'REBOL': 7, 'MUPAD': 8, 'FREGE': {1967: 9, 1985: 10}}, 2017: 11}} ans3 = {1985: 12} if x[3] == 1985: i = ans3 elif x[3] == 1961: i = ans2 elif x[3] == 1989: i = ans1 while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] break return i" "def zero(items, left, middle): if items[0] == 'STAN': return left if items[0] == 'KIT': return middle def four(items, left, middle, right): if items[4] == 1959: return left if items[4] == 1986: return middle if items[4] == 1987: return right def three(items, left, middle, right): if items[3] == 'BLADE': return left if items[3] == 'XTEND': return middle if items[3] == 'LASSO': return right def two(items, left, middle, right): if items[2] == 'SMT': return left if items[2] == 'RDOC': return middle if items[2] == 'RED': return right def one(items, left, middle, right): if items[1] == 2004: return left if items[1] == 1959: return middle if items[1] == 1976: return right def main(items): return two(items, three(items, zero(items, 0, four(items, 1, 2, 3)), one(items, four(items, 4, 5, 6), zero(items, 7, 8), zero(items, 9, 10)), 11), 12, 13)" "def main(x): t = {2010: (3, {1992: (4, {1968: 0, 1980: (0, {1965: 1, 1997: 2, 1987: 3})}), 1972: (2, {2000: 4, 2001: (0, {1965: 5, 1997: 6, 1987: 7}), 1964: 8})}), 2020: 9, 2014: 10} n = t[x[1]] while not isinstance(n, int): n = n[1][x[n[0]]] return n" "import math import random import copy tree = {2004: {1959: {2004: 0, 1966: {'OPAL': 1, 'SCAML': 2, 'SAS': 3}, 1977: {'FLUX': 4, 'YACC': 5, 'LOGOS': 6}}, 1999: 7, 1963: 8}, 1992: {'OPAL': {'FLUX': {1959: 9, 1999: 10, 1963: 11}, 'YACC': 12, 'LOGOS': 13}, 'SCAML': 14, 'SAS': 15}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(set(path))) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "def x0(cond, x): if cond == 2004: return x elif cond == 2018: return x + 1 return x + 2 def x3(cond, x): if cond == 1974: return x elif cond == 2000: return x + 1 return x + 2 def x4(cond, x): if cond == 'GDB': return x return x + 1 def main(x): if x[1] == 1991: if x[2] == 'COQ': if x[4] == 'GDB': return x0(x[0], 0) else: return x3(x[3], 3) elif x[3] == 1974: return x0(x[0], 6) elif x[3] == 2000: return x4(x[4], 9) else: return 11 else: return 12" "def main(x): a = [4, {2015: [0, {'TEXT': [2, {2011: 0, 1970: [1, {'XC': 1, 'NIT': 2, 'TEXT': 3}], 1988: [3, {'CIRRU': 4, 'ARC': 5, 'APEX': 6}]}], 'WISP': [2, {2011: 7, 1970: 8, 1988: [3, {'CIRRU': 9, 'ARC': 10, 'APEX': 11}]}]}], 1993: 12, 1989: 13}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): if x[2] == 'MQL5': if x[3] == 'JSX': return {x[4] == 'ADA': ['DM', 'XSLT'].index(x[1]), x[4] == 'GAP': 2, x[4] == 'HACK': 3}[True] elif x[3] == 'JSON5': return {x[0] == 1991: 4, x[0] == 1979: ['ADA', 'GAP', 'HACK'].index(x[4]) + 5, x[0] == 2000: ['DM', 'XSLT'].index(x[1]) + 8}[True] elif x[3] == 'CUDA': return 10 elif x[2] == 'SMALI': return 11" "def recurse(arr, i, bd, index): if type(bd[0]) == str or bd[0] > 15: return recurse(arr, i + 1, bd[bd.index(arr[index[i]]) + 1], index) else: return bd[0] def main(arr): i = 1 if arr[2] == 'OCAML': index1 = [1, 2, 4, 3] else: index1 = [1, 2, 0, 4, 4] if arr[1] == 'GENIE': return recurse(arr, i, ['GENIE', 'OCAML', [2013, [0], 1976, [1], 1995, [1967, [2], 1980, [3], 1960, [4]]], 'ATS', ['TCL', [2013, [5], 1976, [6], 1995, [7]], 'QML', [2013, [8], 1976, [9], 1995, [10]], 'RHTML', [11]], 'P4', [12]], index1) elif arr[1] == 'RDOC': return 13 else: return 14" "def two(items, left, middle, right): if items[2] == 'BRO': return left if items[2] == 'CUDA': return middle if items[2] == 'CSON': return right def three(items, left, middle, right): if items[3] == 1970: return left if items[3] == 1975: return middle if items[3] == 1958: return right def zero(items, left, middle, right): if items[0] == 'GO': return left if items[0] == 'HYPHY': return middle if items[0] == 'PHP': return right def one(items, left, middle, right): if items[1] == 'MAX': return left if items[1] == 'MTML': return middle if items[1] == 'CLICK': return right def main(items): return zero(items, three(items, two(items, 0, 1, 2), two(items, 3, 4, 5), one(items, 6, 7, 8)), 9, 10)" "def main(x: list) -> int: match x[0]: case 'UNO': match x[4]: case 1973: match x[2]: case 'HAXE': return 0 case 'XOJO': match x[3]: case 1985: return 1 case 2004: return 2 case 'ORG': match x[3]: case 1985: return 3 case 2004: return 4 case 1980: return 5 case 1967: return 6 case 'RUST': match x[1]: case 'APEX': match x[2]: case 'HAXE': return 7 case 'XOJO': return 8 case 'ORG': match x[4]: case 1973: return 9 case 1980: return 10 case 1967: return 11 case 'XOJO': return 12 case 'MQL5': return 13" "def main(x): return {'STAN': {2017: {1975: 0, 1998: 1, 1981: 2}[x[0]], 1977: {1975: 3, 1998: 4, 1981: 5}[x[0]], 1960: {1975: 6, 1998: 7, 1981: 8}[x[0]]}[x[2]], 'DYLAN': 9, 'GOLO': 10}[x[3]]" "def zero(items, left, right): if items[0] == 'REBOL': return left if items[0] == 'SLIM': return right def one(items, left, middle, right): if items[1] == 1996: return left if items[1] == 2015: return middle if items[1] == 1967: return right def two(items, left, middle, right): if items[2] == 'D': return left if items[2] == 'ATS': return middle if items[2] == 'PLSQL': return right def three(items, left, middle, right): if items[3] == 'CSON': return left if items[3] == 'JSON': return middle if items[3] == 'JAVA': return right def main(items): return two(items, one(items, three(items, 0, 1, 2), zero(items, 3, 4), three(items, 5, 6, 7)), one(items, 8, zero(items, 9, 10), 11), 12)" "def main(x): dict4_l = {'SELF': 2, 'FORTH': 3, 'VHDL': 4} dict4_c = {2014: 5, 1981: 6} dict4_r = {2014: 7, 1981: 8} dict3_l = {'APL': 0, 'RED': 1, 'NL': dict4_l[x[4]]} dict3_r = {'SELF': dict4_c[x[0]], 'FORTH': dict4_r[x[0]], 'VHDL': 9} dict2 = {'CLICK': dict3_l[x[3]], 'LIMBO': dict3_r[x[4]], 'STAN': 10} dict1 = {1974: dict2[x[1]], 1976: 11} return dict1[x[2]]" "def zero(items, left, middle, right): if items[0] == 1964: return left if items[0] == 1966: return middle if items[0] == 2020: return right def three(items, left, middle, right): if items[3] == 1983: return left if items[3] == 1966: return middle if items[3] == 1957: return right def two(items, left, middle, right): if items[2] == 'TLA': return left if items[2] == 'CSON': return middle if items[2] == 'SELF': return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), three(items, 3, 4, 5), three(items, 6, 7, 8)), zero(items, 9, 10, 11), 12)" "def choice(value, start): return {'OPA': start, 'P4': start + 1}[value] def main(x): if x[3] == 'BRO': return {'FLUX': 7, 'ECL': 8, 'C': 9}[x[2]] if x[2] == 'FLUX': return choice(x[1], 0) if x[2] == 'C': return choice(x[1], 5) return {1999: 2, 1966: 3, 2003: 4}[x[0]]" "def zero(items, left, middle, right): if items[0] == 'LEX': return left if items[0] == 'OZ': return middle if items[0] == 'RDOC': return right def one(items, left, middle, right): if items[1] == 1960: return left if items[1] == 1963: return middle if items[1] == 2001: return right def two(items, left, right): if items[2] == 'SAS': return left if items[2] == 'J': return right def three(items, left, middle, right): if items[3] == 2004: return left if items[3] == 1967: return middle if items[3] == 2001: return right def main(items): return three(items, zero(items, one(items, 0, 1, 2), two(items, 3, 4), one(items, 5, 6, 7)), 8, 9)" "def zero(items, left, middle, right): if items[0] == 1997: return left if items[0] == 2018: return middle if items[0] == 1972: return right def four(items, left, middle, right): if items[4] == 'STATA': return left if items[4] == 'SCALA': return middle if items[4] == 'XSLT': return right def three(items, left, middle): if items[3] == 1979: return left if items[3] == 1964: return middle def two(items, left, middle, right): if items[2] == 1989: return left if items[2] == 1983: return middle if items[2] == 2016: return right def one(items, left, right): if items[1] == 1967: return left if items[1] == 1986: return right def main(items): return four(items, one(items, three(items, two(items, 0, 1, 2), 3), two(items, 4, 5, zero(items, 6, 7, 8))), 9, 10)" "def main(x): match x[3]: case 2015: match x[2]: case 'P4': match x[1]: case 'IDL': match x[4]: case 'GENIE': return 0 case 'JSON': return 1 case 'OZ': return 2 case 'JSON': match x[0]: case 'CSV': return 3 case 'JSON5': return 4 case 'M4': match x[4]: case 'GENIE': return 5 case 'JSON': return 6 case 'OZ': return 7 case 'JSX': return 8 case 1973: match x[2]: case 'P4': match x[4]: case 'GENIE': match x[1]: case 'IDL': return 9 case 'JSON': return 10 case 'M4': return 11 case 'JSON': return 12 case 'OZ': return 13 case 'JSX': return 14 case 1965: return 15" "def one(items, left, right): if items[1] == 'SVG': return left elif items[1] == 'MINID': return right def two(items, left, middle, right): if items[2] == 'TEX': return left elif items[2] == 'ROUGE': return middle elif items[2] == 'KRL': return right def three(items, left, right): if items[3] == 'CUDA': return left if items[3] == 'VCL': return right def zero(items, left, middle, right): if items[0] == 'VHDL': return left if items[0] == 'XS': return middle if items[0] == 'VUE': return right def main(items): return one(items, two(items, three(items, zero(items, 0, 1, 2), 3), 4, 5), two(items, 6, zero(items, 7, 8, 9), 10))" "def X3(x, path): if path == 1: if x[3] == 1988: return 0 if x[3] == 2010: return 1 if x[3] == 1968: return 2 if x[3] == 1988: return 8 if x[3] == 2010: return 9 if x[3] == 1968: return 10 def X1(x, path): if path == 1: if x[1] == 'AWK': return X3(x, 1) if x[1] == 'PIKE': if x[0] == 1959: return 3 if x[0] == 1974: return 4 if x[1] == 'SCAML': return 5 if x[1] == 'AWK': return 6 if x[1] == 'PIKE': return 7 if x[1] == 'SCAML': return X3(x, path) def main(x): if x[2] == 'MQL4': return X1(x, 1) if x[2] == 'CLEAN': return X1(x, 2)" "def main(x): dict1 = {'M4': 0, 'CLICK': 1} dict2 = {'M4': 3, 'CLICK': 4} dict3 = {'M4': 5, 'CLICK': 6} dict4 = {1964: 7, 2005: 8, 2006: 9} if x[1] == 1961: if x[3] == 1964: return dict1.get(x[0]) elif x[3] == 2006: return dict2.get(x[0]) else: return 2 elif x[1] == 1994: return dict3.get(x[0]) elif x[1] == 1962: if x[0] == 'M4': return dict4.get(x[3]) else: return 10" "def main(x): x2b = {'SCALA': 0, 'MTML': 1} x0 = {'HTTP': 2, 'MESON': 3, 'RUST': 4} x2c = {'SCALA': 5, 'MTML': 6} x3b = {'GAMS': 8, 'JSON': 9, 'JSX': 10} x3a = {'GAMS': x2b[x[2]], 'JSON': x0[x[0]], 'JSX': x2c[x[2]]} x2a = {'SCALA': 7, 'MTML': x3b[x[3]]} x1 = {'TEXT': x3a[x[3]], 'VCL': x2a[x[2]]} return x1[x[1]]" "def x_1(x): if x[1] == 'NL': return 1 elif x[1] == 'ZIMPL': return 2 else: return 3 def x_2(x): if x[4] == 1974: return 8 elif x[4] == 1965: return 9 else: return 10 def x_3(x): if x[4] == 1974: return 5 elif x[4] == 1965: return 6 else: return 7 def main(x): if x[3] == 'LEX': if x[2] == 1985: if x[4] == 1965: return x_1(x) elif x[4] == 1974: return 0 else: return 4 elif x[2] == 2006: if x[0] == 'M': return x_3(x) elif x[0] == 'DIFF': return x_2(x) else: return 11 else: return 12" "def one(items, left, mid, right): if items[1] == 2019: return left if items[1] == 1996: return mid if items[1] == 2001: return right def two(items, left, mid, right): if items[2] == 'SQL': return left if items[2] == 'RHTML': return mid if items[2] == 'KIT': return right def three(items, left, mid, right): if items[3] == 'XTEND': return left if items[3] == 'WISP': return mid if items[3] == 'PLSQL': return right def four(items, left, mid, right): if items[4] == 'FLUX': return left if items[4] == 'TCL': return mid if items[4] == 'MTML': return right def main(items): return two(items, one(items, four(items, three(items, 0, 1, 2), three(items, 3, 4, 5), three(items, 6, 7, 8)), four(items, 9, 10, 11), 12), 13, 14)" "def main(x): match x[4]: case 'ELM': return 11 case 'DART': match x[0]: case 2019: return 5 case 1992: match x[3]: case 1984: return 3 case 1986: return 4 case 1998: match x[2]: case 1987: return 0 case 1992: return 1 case 2014: return 2 case 1966: match x[3]: case 1998: return 6 case 1986: return 10 case 1984: match x[1]: case 1969: return 7 case 1979: return 8 case 2006: return 9" "s = ({1981, 'QMAKE', 2019, 1983}, {1981, 'QMAKE', 2019, 2014}, {1981, 'QMAKE', 1967}, {1981, 'QMAKE', 1975, 1983}, {1981, 'QMAKE', 1975, 2014}, {1981, 'SMALI'}, {2010, 'QMAKE', 2019}, {2010, 'QMAKE', 1967}, {2010, 'QMAKE', 1975, 1977}, {2010, 'QMAKE', 1975, 1999}, {2010, 'SMALI'}, {1984}) def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "dict1 = {'ELM': 9, 'STAN': 10} dict2 = {'CUDA': 1, 'ELM': 2, 'STAN': 3} dict3 = {'XTEND': 6, 'ROUGE': 7, 'VCL': 8} dict4 = {1990: 4, 1984: 5} def main(x): a = x if 2018 in a: if 'JSON5' in a: a.remove('JSON5') if 'ROUGE' in a: a.remove('ROUGE') return dict2.get(a[1]) elif 'VCL' in a: a.remove('VCL') return dict4.get(a[2]) else: return 0 elif 'CUDA' in a: return dict3.get(a[3]) else: return dict1.get(a[2]) else: return 11" "import math def three(items, left, right): if items[3] == 1982: return left if items[3] == 2009: return right def one(items, left, middle, right): if items[1] == 'AGDA': return left if items[1] == 'FREGE': return middle if items[1] == 'TEX': return right def four(items, left, right): if items[4] == 1964: return left if items[4] == 1997: return right def zero(items, left, middle, right): if items[0] == 'REBOL': return left if items[0] == 'RDOC': return middle if items[0] == 'RED': return right def two(items, left, middle, right): if items[2] == 'SQLPL': return left if items[2] == 'IDL': return middle if items[2] == 'FORTH': return right def main(items): return two(items, four(items, one(items, three(items, 0, 1), 2, 3), 4), four(items, one(items, zero(items, 5, 6, 7), 8, zero(items, 9, 10, 11)), 12), 13)" "def _3_2(list): if list[3] == 'MIRAH': return 6 if list[3] == 'QML': return 7 if list[3] == 'HCL': return 8 def _2(list): if list[2] == 1991: return _3_2(list) if list[2] == 1999: return 9 if list[2] == 1961: return 5 def _3_1(list): if list[3] == 'MIRAH': return 1 if list[3] == 'QML': return 2 if list[3] == 'HCL': return 3 def _1(list): if list[1] == 1980: return _3_1(list) else: return 0 def _0(list): if list[0] == 1966: return _1(list) if list[0] == 1957: return _2(list) else: return 4 def main(list): if list[4] == 1967: return _0(list) else: return 10" "def zero(items, left, middle, right): if 2009 in items: return left if 2010 in items: return middle if 2006 in items: return right return -1 def one(items, left, middle, right): if 'MINID' in items: return left if 'HY' in items: return middle if 'HCL' in items: return right return -1 def two(items, left, middle, right): if 'GLYPH' in items: return left if 'PUG' in items: return middle if 'TERRA' in items: return right return -1 def three(items, left, right): if 1962 in items: return left if 2009 in items: return right return -1 def main(items): return three(items, two(items, zero(items, 0, 1, 2), zero(items, 3, 4, 5), one(items, 6, 7, 8)), one(items, 9, 10, 11))" "def main(find_text): tree = {'JAVA': {1962: {'HAXE': {1973: 0, 2016: 1}, 'GN': {1973: 2, 2016: 3}, 'OZ': 4}, 1968: 5, 2005: {1973: {'HAXE': 6, 'GN': 7, 'OZ': 8}, 2016: {'HAXE': 9, 'GN': 10, 'OZ': 11}}}, 'METAL': 12, 'NGINX': 13} way = tree value = None while not type(value) is int: for key in find_text: value = way.get(key) if type(value) is int: return value elif isinstance(value, dict): way = value continue" "def zero(items, left, middle, right): if items[0] == 'ZIMPL': return left if items[0] == 'OOC': return middle if items[0] == 'BOO': return right def four(items, left, right): if items[4] == 1970: return left if items[4] == 1958: return right def three(items, left, middle, right): if items[3] == 2020: return left if items[3] == 1979: return middle if items[3] == 1960: return right def two(items, left, middle, right): if items[2] == 1985: return left if items[2] == 1974: return middle if items[2] == 2005: return right def one(items, left, middle, right): if items[1] == 1987: return left if items[1] == 1975: return middle if items[1] == 1964: return right def main(items): return zero(items, four(items, three(items, 0, 1, two(items, 2, 3, 4)), one(items, 5, three(items, 6, 7, 8), 9)), 10, 11)" "def zero(items, left, middle, right): if items[0] == 'CMAKE': return left if items[0] == 'OPA': return middle if items[0] == 'AWK': return right def three(items, left, middle, right): if items[3] == 1962: return left if items[3] == 1997: return middle if items[3] == 1983: return right def two(items, left, middle, right): if items[2] == 'EAGLE': return left if items[2] == 'HTTP': return middle if items[2] == 'VUE': return right def one(items, left, right): if items[1] == 1997: return left if items[1] == 1984: return right def main(items): return three(items, two(items, zero(items, 0, 1, 2), zero(items, 3, 4, 5), 6), 7, two(items, one(items, 8, 9), 10, 11))" "def main(path): if path[1] == 1987: return 11 elif path[2] == 'JSX': if path[4] == 1981: return ['COBOL', 'YAML'].index(path[0]) else: return [2006, 1969].index(path[3]) + 2 elif path[2] == 'KICAD': if path[4] == 1981: return 4 else: return [2006, 1969].index(path[3]) + 5 elif path[0] == 'COBOL': return [1981, 1992].index(path[4]) + 7 else: return [1981, 1992].index(path[4]) + 9" "def two(items, left, right): if items[2] == 1975: return left if items[2] == 2014: return right def one(items, left, middle, right): if items[1] == 'EC': return left if items[1] == 'PERL6': return middle if items[1] == 'XSLT': return right def four(items, left, middle, right): if items[4] == 'LEAN': return left if items[4] == 'ATS': return middle if items[4] == 'CUDA': return right def zero(items, left, right): if items[0] == 'XC': return left if items[0] == 'SLIM': return right def three(items, left, middle, right): if items[3] == 2017: return left if items[3] == 2008: return middle if items[3] == 1999: return right def main(items): return three(items, zero(items, one(items, 0, two(items, 1, 2), 3), four(items, 4, one(items, 5, 6, 7), 8)), 9, 10) main(['XC', 'XSLT', 2014, 1999, 'CUDA'])" "def four(items, left, middle, right): if items[4] == 1984: return left if items[4] == 1980: return middle if items[4] == 2009: return right def three(items, left, middle, right): if items[3] == 1999: return left if items[3] == 1990: return middle if items[3] == 1959: return right def two(items, left, middle, right): if items[2] == 'FISH': return left if items[2] == 'PAWN': return middle if items[2] == 'HTML': return right def one(items, left, right): if items[1] == 'XS': return left if items[1] == 'SQF': return right def main(items): return four(items, one(items, three(items, two(items, 0, 1, 2), 3, 4), two(items, 5, 6, 7)), three(items, 8, two(items, one(items, 9, 10), 11, 12), 13), 14)" "def main(res): ans = {2: {1971: 13, 2000: {0: {1976: 8, 1966: {3: {'GDB': 11, 'YAML': {4: {1985: 10, 2014: 9}}}}, 1981: 12}}, 1991: {0: {1981: {3: {'YAML': 6, 'GDB': 7}}, 1966: {1: {'NIM': 5, 'JSX': 4}}, 1976: {4: {1985: {1: {'JSX': 2, 'NIM': 3}}, 2014: {3: {'GDB': 1, 'YAML': 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): dict3_l = {1986: 0, 1991: 1} dict3_ll = {1978: 2, 1999: 3, 1994: 4} dict3_rr = {1986: 5, 1991: 6} dict3_r = {2003: 7, 1972: 8, 1977: 9} dict2_l = {2003: dict3_l[x[3]], 1972: dict3_ll[x[2]], 1977: dict3_rr[x[3]]} dict2_r = {1978: dict3_r[x[1]], 1999: 10, 1994: 11} dict1 = {'NESC': dict2_l[x[1]], 'PONY': dict2_r[x[2]], 'HLSL': 12} return dict1[x[0]]" "def zero(items, left, middle): if 'M4' in items: return left if 'HTTP' in items: return middle def one(items, left, middle, right): if 'BISON' in items: return left if 'URWEB' in items: return middle if 'ARC' in items: return right def two(items, left, middle, right): if 'MESON' in items: return left if 'P4' in items: return middle if 'VHDL' in items: return right def three(items, left, right): if 1967 in items: return left if 1963 in items: return right def four(items, left, middle, right): if 1987 in items: return left if 2009 in items: return middle if 1966 in items: return right def main(items): return four(items, three(items, two(items, 0, zero(items, 1, 2), one(items, 3, 4, 5)), one(items, two(items, 6, 7, 8), two(items, 9, 10, 11), 12)), 13, 14)" "def main(res): ans = {1: {'KRL': 12, 'ARC': 11, 'P4': {0: {'HYPHY': 10, 'NIX': {2: {2018: {3: {1967: 6, 2020: 5, 1961: 4}}, 1989: {3: {1967: 9, 2020: 8, 1961: 7}}}}, 'GO': {2: {1989: 3, 2018: {3: {1967: 2, 2020: 1, 1961: 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero(items, left, middle, right): if items[0] == 'SHELL': return left if items[0] == 'QML': return middle if items[0] == 'HLSL': return right def four(items, left, middle, right): if items[4] == 1959: return left if items[4] == 1970: return middle if items[4] == 1984: return right def three(items, left, middle, right): if items[3] == 1962: return left if items[3] == 2009: return middle if items[3] == 2020: return right def one(items, left, right): if items[1] == 'OPA': return left if items[1] == 'ABNF': return right def main(items): return zero(items, one(items, three(items, four(items, 0, 1, 2), four(items, 3, 4, 5), 6), three(items, four(items, 7, 8, 9), 10, 11)), 12, 13)" "def four(items, left, right): if items[4] == 'AMPL': return left if items[4] == 'X10': return right def three(items, left, right): if items[3] == 'LLVM': return left if items[3] == 'HYPHY': return right def two(items, left, middle, right): if items[2] == 1968: return left if items[2] == 1998: return middle if items[2] == 2007: return right def one(items, left, right): if items[1] == 1971: return left if items[1] == 1960: return right def main(items): return three(items, two(items, four(items, 0, one(items, 1, 2)), one(items, four(items, 3, 4), four(items, 5, 6)), 7), one(items, four(items, 8, 9), 10))" "def main(res): ans = {3: {'POD': {1: {1960: 9, 2009: 8, 1999: 7}}, 'SCSS': 6, 'VCL': {0: {'LEX': {2: {'LUA': 3, 'XTEND': 4, 'IDL': 5}}, 'J': {1: {1960: 2, 2009: 1, 1999: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n8_2 = Node(8, [], []) n8_1 = Node(7, [], []) n8 = Node(x[1], ['HACK', 'CHUCK'], [n8_1, n8_2]) n7_2 = Node(5, [], []) n7_1 = Node(4, [], []) n7 = Node(x[4], ['SWIFT', 'MUPAD'], [n7_1, n7_2]) n6_2 = Node(1, [], []) n6_1 = Node(0, [], []) n6 = Node(x[1], ['HACK', 'CHUCK'], [n6_1, n6_2]) n5_1 = Node(6, [], []) n5 = Node(x[0], ['ZIMPL', 'SASS', 'HCL'], [n7, n5_1, n8]) n4_2 = Node(3, [], []) n4_1 = Node(2, [], []) n4 = Node(x[0], ['ZIMPL', 'SASS', 'HCL'], [n6, n4_1, n4_2]) n3_2 = Node(10, [], []) n3_1 = Node(9, [], []) n3 = Node(x[2], ['ATS', 'BISON'], [n3_1, n3_2]) n2 = Node(x[2], ['ATS', 'BISON'], [n4, n5]) n = Node(x[3], [2009, 1960], [n2, n3]) while n: res = n n = n.find_next() return res.data" "class Node(object): def __init__(self, condition='', value='123', number=100): self.kids = [] self.condition = condition self.value = value self.number = number def add_node(self, new_node): self.kids.append(new_node) def run(self, dict): if len(self.kids) == 0: return self.value else: for i in self.kids: if i.condition == dict[self.number]: return i.run(dict) def main(a): nodemain = Node(number=1) node1 = Node(condition=2005, number=2) node2 = Node(condition=1998, number=0) node3 = Node(condition=1999, number=2) node11 = Node(condition=1997, number=3) node12 = Node(condition=1959, value=2) node21 = Node(condition='D', value=3) node22 = Node(condition='AGDA', number=2) node23 = Node(condition='MQL4', number=2) node31 = Node(condition=1997, value=8) node32 = Node(condition=1959, number=0) node111 = Node(condition=1983, value=0) node112 = Node(condition=2013, value=1) node221 = Node(condition=1997, value=4) node222 = Node(condition=1959, value=5) node231 = Node(condition=1997, value=6) node232 = Node(condition=1959, value=7) node321 = Node(condition='D', value=9) node322 = Node(condition='AGDA', value=10) node323 = Node(condition='MQL4', value=11) nodemain.add_node(node1) nodemain.add_node(node2) nodemain.add_node(node3) node1.add_node(node11) node11.add_node(node111) node11.add_node(node112) node1.add_node(node12) node2.add_node(node21) node2.add_node(node22) node2.add_node(node23) node22.add_node(node221) node22.add_node(node222) node23.add_node(node231) node23.add_node(node232) node3.add_node(node31) node3.add_node(node32) node32.add_node(node321) node32.add_node(node322) node32.add_node(node323) return nodemain.run(a)" "def zero(items, left, middle, right): if items[0] == 'SVG': return left if items[0] == 'ELM': return middle if items[0] == 'IOKE': return right def four(items, left, right): if items[4] == 'GLSL': return left if items[4] == 'VUE': return right def three(items, left, middle, right): if items[3] == 1966: return left if items[3] == 1978: return middle if items[3] == 1986: return right def two(items, left, right): if items[2] == 1981: return left if items[2] == 1994: return right def one(items, left, middle, right): if items[1] == 'JSON': return left if items[1] == 'APL': return middle if items[1] == 'IO': return right def main(items): return two(items, four(items, zero(items, three(items, 0, 1, 2), 3, one(items, 4, 5, 6)), three(items, one(items, 7, 8, 9), 10, 11)), 12)" "def main(x): match x[1]: case 1964: match x[4]: case 'ROUGE': match x[2]: case 1995: match x[3]: case 'PAN': return 0 case 'TEX': return 1 case 'GENIE': return 2 case 1983: match x[0]: case 2001: return 3 case 2013: return 4 case 1998: return 5 case 1961: return 6 case 'ABNF': match x[0]: case 2001: return 7 case 2013: return 8 case 1998: return 9 case 'RUBY': return 10 case 1975: return 11" "def main(args): dict1 = {1996: 0, 1959: 1, 1981: 2} dict11 = {1996: 3, 1959: 4, 1981: 5} dict0 = {'BLADE': 6, 'MTML': 7} dict00 = {'BLADE': 8, 'MTML': 9} dict3 = {'E': dict1[args[1]], 'MQL4': dict11[args[1]], 'ORG': dict0[args[0]]} dict33 = {'E': dict00[args[0]], 'MQL4': 10, 'ORG': 11} dict2 = {'FISH': dict3[args[3]], 'VHDL': dict33[args[3]], 'IDRIS': 12} return dict2[args[2]]" "def zero(items, left, middle, right): if items[0] == 2010: return left if items[0] == 1971: return middle if items[0] == 1986: return right def four(items, left, right): if items[4] == 2008: return left if items[4] == 1970: return right def three(items, left, middle, right): if items[3] == 'VALA': return left if items[3] == 'TOML': return middle if items[3] == 'HTTP': return right def two(items, left, middle, right): if items[2] == 'XS': return left if items[2] == 'LFE': return middle if items[2] == 'PERL': return right def one(items, left, right): if items[1] == 1962: return left if items[1] == 2007: return right def main(items): return two(items, four(items, zero(items, 0, 1, 2), 3), 4, four(items, three(items, 5, 6, one(items, 7, 8)), 9))" "_dict = {1991: {1971: {1975: 0, 1976: {'GRACE': 1, 'ABNF': 2}}, 2019: {1975: {'GRACE': 3, 'ABNF': 4}, 1976: 5}, 2015: {'GRACE': {1975: 6, 1976: 7}, 'ABNF': 8}}, 2003: {1971: {1975: {'BLADE': 9, 'SAS': 10, 'D': 11}, 1976: 12}, 2019: 13, 2015: 14}} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def main(res): ans = {2: {1962: 10, 1985: {3: {'MINID': {0: {2011: 7, 1966: 8, 1977: 9}}, 'SQLPL': {0: {1977: {4: {'APL': 5, 'PIKE': 6}}, 1966: {1: {'RAGEL': 4, 'SAS': 3}}, 2011: 2}}, 'TXL': {4: {'PIKE': 1, 'APL': 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def choice(key, start): return {1980: start, 1976: start + 1}[key] def main(x): if x[4] == 1971: if x[3] == 'XBASE': return choice(x[0], 9) return {'SQLPL': 11, 'NINJA': 12}[x[3]] if x[3] == 'NINJA': return 8 if x[3] == 'XBASE': if x[1] == 'UNO': return choice(x[0], 1) return {'ASP': 0, 'DM': 3}[x[1]] if x[1] == 'ASP': return choice(x[0], 4) return {'UNO': 6, 'DM': 7}[x[1]]" "def zero(items, left, right): if items[0] == 'OCAML': return left if items[0] == 'LEX': return right def four(items, left, right): if items[4] == 'DM': return left if items[4] == 'CUDA': return right def three(items, left, middle, right): if items[3] == 'LEX': return left if items[3] == 'M4': return middle if items[3] == 'NESC': return right def two(items, left, middle, right): if items[2] == 'MUF': return left if items[2] == 'J': return middle if items[2] == 'HAXE': return right def one(items, left, middle, right): if items[1] == 2003: return left if items[1] == 2009: return middle if items[1] == 2013: return right def main(items): return three(items, one(items, zero(items, two(items, 0, 1, 2), 3), two(items, zero(items, 4, 5), four(items, 6, 7), zero(items, 8, 9)), 10), 11, 12)" "def zero(items, left, right): if items[0] == 1965: return left if items[0] == 2013: return right def four(items, left, middle, right): if items[4] == 'VHDL': return left if items[4] == 'RAML': return middle if items[4] == 'NINJA': return right def three(items, left, right): if items[3] == 2015: return left if items[3] == 1993: return right def two(items, left, right): if items[2] == 1959: return left if items[2] == 1972: return right def one(items, left, middle, right): if items[1] == 'BISON': return left if items[1] == 'RAML': return middle if items[1] == 'XBASE': return right def main(items): return zero(items, four(items, two(items, one(items, 0, 1, 2), 3), one(items, 4, 5, three(items, 6, 7)), one(items, two(items, 8, 9), 10, 11)), 12)" "def main(x): match x[1]: case 2011: match x[2]: case 'GOLO': return 2 case 'LIMBO': return 3 case 'PHP': match x[0]: case 'ECL': return 0 case 'COBOL': return 1 case 2002: return 4 case 2009: match x[3]: case 1960: return 8 case 2011: return 9 case 1963: match x[2]: case 'PHP': return 5 case 'GOLO': return 6 case 'LIMBO': return 7" "def main(x): dict1 = {1973: 4, 1957: 5, 2010: 6} dict2 = {2006: 7, 1966: 8, 1983: 9} dict3 = {2006: 0, 1966: 1, 1983: 2} if x[2] == 1974: if x[3] == 'NU': return dict3.get(x[4]) elif x[3] == 'RDOC': return 3 elif x[3] == 'ALLOY': if x[0] == 'HAML': return dict1.get(x[1]) elif x[0] == 'REXX': return dict2.get(x[4]) elif x[0] == 'PONY': return 10 return 11" "def main(res): ans = {0: {'BRO': {1: {2008: 7, 1976: {2: {'CSV': 9, 'OPAL': 8, 'FORTH': 10}}, 1960: 11}}, 'XOJO': {1: {1960: {3: {1990: 6, 1974: 5, 1978: 4}}, 1976: 3, 2008: {3: {1990: 2, 1974: 1, 1978: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero_top(x): if x[0] == 1968: return 0 if x[0] == 1977: return 1 if x[0] == 1971: return 2 def zero_mid(x): if x[0] == 1968: return 4 if x[0] == 1977: return 5 if x[0] == 1971: return 6 def zero_bot(x): if x[0] == 1968: return one(x) if x[0] == 1977: return 10 if x[0] == 1971: return 11 def four(x): if x[4] == 1995: return zero_bot(x) if x[4] == 1998: return 12 if x[4] == 1996: return three(x) def three(x): if x[3] == 1979: return zero_top(x) if x[3] == 1974: return 3 if x[3] == 1981: return zero_mid(x) def two(x): if x[2] == 1968: return 13 if x[2] == 2016: return four(x) def one(x): if x[1] == 'VOLT': return 7 if x[1] == 'ABNF': return 8 if x[1] == 'VCL': return 9 def main(x): return two(x)" "def choicex0(cond, x): if cond == 'CLIPS': return x elif cond == 'SELF': return x + 1 return x + 2 def choicex1(cond, x): if cond == 'MUF': return x elif cond == 'X10': return x + 1 return x + 2 def main(x): if x[3] == 1988: if x[2] == 2001: return choicex0(x[0], 0) elif x[2] == 1973: return choicex0(x[0], 4) return 3 elif x[3] == 1996: return choicex1(x[1], 7) return 10" "def one(items, left, middle, right): if items[1] == 1991: return left if items[1] == 2015: return middle if items[1] == 1990: return right def three(items, left, middle, right): if items[3] == 1960: return left if items[3] == 1991: return middle if items[3] == 1978: return right def two(items, left, right): if items[2] == 1958: return left if items[2] == 1976: return right def main(items): return two(items, three(items, one(items, 0, 1, 2), one(items, 3, 4, 5), one(items, 6, 7, 8)), 9)" "def choice(condition, x): if condition == 'ANTLR': return x return x + 1 def main(x): if x[0] == 'J': if x[1] == 'TCSH': return choice(x[2], 0) elif x[1] == 'ANTLR': return choice(x[2], 2) else: return choice(x[2], 4) elif x[0] == 'VOLT': return choice(x[2], 6) elif x[1] == 'TCSH': return choice(x[2], 8) elif x[1] == 'ANTLR': return 10 else: return 11" "def main(tree): level4 = [2011, 1999, 1982] level3 = ['SQL', 'TERRA'] level1 = ['SLIM', 'E'] level0 = ['PUG', 'HY', 'OPA'] index4 = level4.index(tree[4]) index3 = level3.index(tree[3]) index1 = level1.index(tree[1]) index0 = level0.index(tree[0]) if tree[3] == 'SQL' and tree[4] == 2011 and (tree[0] != 'OPA'): return index0 * 2 + index1 elif tree[3] == 'TERRA' and tree[4] == 2011: return index1 * 3 + index0 + 5 elif tree[4] == 1999: return 11 elif tree[4] == 1982: return 12 elif tree[0] == 'OPA' and tree[3] == 'SQL': return index0 + index1 + 1" "mass = ['4:1997-0:2009-3:2008', '4:1997-0:2009-3:1975', '4:1997-0:2007', '4:2011-0:2009-3:2008', '4:2011-0:2009-3:1975-1:1977', '4:2011-0:2009-3:1975-1:1961', '4:2011-0:2007-3:2008-2:LSL', '4:2011-0:2007-3:2008-2:NSIS', '4:2011-0:2007-3:1975', '4:2004'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def zero(items, left, middle, right): if items[0] == 1959: return left if items[0] == 1965: return middle if items[0] == 1982: return right def three(items, left, middle, right): if items[3] == 'TOML': return left if items[3] == 'HAXE': return middle if items[3] == 'EQ': return right def two(items, left, middle, right): if items[2] == 'CMAKE': return left if items[2] == 'OX': return middle if items[2] == 'IDRIS': return right def one(items, left, right): if items[1] == 'PAN': return left if items[1] == 'NU': return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), one(items, 3, 4), one(items, 5, 6)), 7, one(items, 8, three(items, 9, 10, 11)))" "def main(p): b = 0 match p[3]: case 1983: match p[0]: case 1964: b = 9 case 1969: match p[1]: case 1983: b = 8 case 1994: match p[2]: case 2006: b = 7 case 2020: b = 6 case _: return b case _: return b case _: return b case 1968: match p[1]: case 1983: match p[0]: case 1964: b = 5 case 1969: match p[4]: case 'JSON': b = 3 case 'ROFF': b = 4 case _: return b case _: return b case 1994: match p[2]: case 2006: b = 2 case 2020: match p[0]: case 1964: b = 1 case 1969: b = 0 case _: return b case _: return b case _: return b case _: return b return b" "def main(x): if x[0] == 1958: if x[1] == 'MQL5': return ['ALLOY', 'XOJO', 'ROFF'].index(x[2]) elif x[1] == 'SHELL': return ['ALLOY', 'XOJO', 'ROFF'].index(x[2]) + 3 else: return 6 elif x[0] == 2017: return 7 else: return ['MQL5', 'SHELL', 'LEX'].index(x[1]) + 8" "def main(p): b = 0 match p[2]: case 'EDN': b = 11 case 'FREGE': match p[4]: case 1985: match p[1]: case 'IO': b = 10 case 'LATTE': match p[3]: case 2015: b = 9 case 1965: b = 8 case 2004: b = 7 case _: return b case 'PIKE': b = 6 case _: return b case 2009: match p[3]: case 2015: match p[0]: case 2017: b = 5 case 2004: b = 4 case _: return b case 1965: match p[1]: case 'IO': b = 3 case 'LATTE': b = 2 case 'PIKE': b = 1 case _: return b case 2014: b = 0 case _: return b case _: return b case _: return b return b" "def main(p): b = 0 match p[0]: case 'RDOC': b = 12 case 'SASS': b = 11 case 'YAML': match p[4]: case 'IDL': b = 10 case 'VUE': b = 9 case 'ATS': match p[3]: case 1995: match p[1]: case 1972: b = 8 case 1964: b = 7 case 1958: b = 6 case _: return b case 1983: match p[2]: case 'RHTML': b = 5 case 'FISH': b = 4 case 'TEX': b = 3 case _: return b case 2002: match p[2]: case 'RHTML': b = 2 case 'FISH': b = 1 case 'TEX': b = 0 case _: return b case _: return b case _: return b case _: return b return b" "def zero(items, left, right): if items[0] == 'MQL5': return left if items[0] == 'ABNF': return right def four(items, left, middle, right): if items[4] == 'XSLT': return left if items[4] == 'QML': return middle if items[4] == 'HY': return right def two(items, left, middle, right): if items[2] == 1967: return left if items[2] == 1970: return middle if items[2] == 1957: return right def three(items, left, right): if items[3] == 1971: return left if items[3] == 2007: return right def one(items, left, right): if items[1] == 1968: return left if items[1] == 2012: return right def main(items): if items[1] == 1968: return zero(items, two(items, four(items, 0, 1, 2), 3, three(items, 4, 5)), 6) elif items[1] == 2012: return two(items, 7, 8, 9)" "def zero(items, top, bottom): if items[0] == 1957: return top if items[0] == 2006: return bottom def one(items, top, bottom): if items[1] == 1962: return top if items[1] == 2006: return bottom def two(items, top, bottom): if items[2] == 1962: return top if items[2] == 1989: return bottom def three(items, top, bottom): if items[3] == 'OX': return top if items[3] == 'SAGE': return bottom def four(items, top, middle, bottom): if items[4] == 'VUE': return top if items[4] == 'PUG': return middle if items[4] == 'SLIM': return bottom def main(items): return three(items, zero(items, four(items, one(items, 0, 1), two(items, 2, 3), 4), 5), four(items, 6, 7, zero(items, 8, one(items, 9, 10))))" "def choicex0(cond, x): if cond == 'BISON': return x return x + 1 def choicex3(cond, x): if cond == 'POD': return x elif cond == 'SCAML': return x + 1 return x + 2 def main(x): if x[4] == 1979: if x[1] == 1992: if x[2] == 1994: return choicex3(x[3], 1) elif x[2] == 1974: return choicex0(x[0], 4) return 0 elif x[1] == 1960: if x[2] == 1994: return choicex0(x[0], 7) elif x[2] == 1974: return 9 return 6 return 10" "def zero(items, left, right): if items[0] == 'JULIA': return left if items[0] == 'HTML': return right def one(items, left, right): if items[1] == 2016: return left if items[1] == 1975: return right def two(items, left, middle, right): if items[2] == 1989: return left if items[2] == 1961: return middle if items[2] == 1984: return right def three(items, left, right): if items[3] == 'XS': return left if items[3] == 'QMAKE': return right def four(items, left, right): if items[4] == 1986: return left if items[4] == 2001: return right def main(items): return three(items, two(items, zero(items, one(items, 0, 1), 2), four(items, one(items, 3, 4), zero(items, 5, 6)), four(items, 7, 8)), 9)" "def four(items, left, middle, right): if items[4] == 'TEA': return left if items[4] == 'COQ': return middle if items[4] == 'ASN.1': return right def zero(items, left, middle, right): if items[0] == 'ATS': return left if items[0] == 'XBASE': return middle if items[0] == 'TOML': return right def two(items, left, middle, right): if items[2] == 1976: return left if items[2] == 1996: return middle if items[2] == 2002: return right def three(items, left, right): if items[3] == 1996: return left if items[3] == 1980: return 9 def one(items, left, right): if items[1] == 1961: return left if items[1] == 1992: return 10 def main(items): return one(items, three(items, two(items, four(items, 0, 1, 2), four(items, 3, 4, 5), zero(items, 6, 7, 8)), 9), 10)" "def main(x): v = {'SASS': 0, 'SHEN': 1, 'HACK': 2} if x[0] == 'TXL': if x[2] == 'TWIG': return v[x[1]] if x[2] == 'EQ': return 3 if x[0] == 'COQ': return 4 if x[0] == 'SELF': if x[3] == 1994: return 5 if x[3] == 2013: return v[x[1]] + 6 if x[3] == 2002: return v[x[1]] + 9" "def two(items, left, right): if items[2] == 'DM': return left if items[2] == 'E': return right def three(items, left, midle, right): if items[3] == 'GDB': return left if items[3] == 'ECL': return midle if items[3] == 'ASP': return right def one(items, left, midle, right): if items[1] == 'STAN': return left if items[1] == 'INI': return midle if items[1] == 'HYPHY': return right def zero(items, left, midle, right): if items[0] == 1970: return left if items[0] == 1963: return midle if items[0] == 1978: return right def main(items): return zero(items, three(items, two(items, 0, 1), 2, two(items, 3, 4)), one(items, 5, two(items, 6, 7), two(items, 8, 9)), 10)" "def main(res): ans = {1: {2018: 10, 1977: {0: {'BRO': {2: {'DYLAN': 6, 'IO': 7, 'GN': 8}}, 'PAWN': 9}}, 1958: {0: {'BRO': {3: {'OX': 2, 'GAP': 1, 'TCL': 0}}, 'PAWN': {2: {'GN': 5, 'IO': 4, 'DYLAN': 3}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(tree_list): match tree_list[3]: case 1990: return 12 case 1998: return 11 match tree_list[0]: case 'PIC': return 2 case 'CMAKE': match tree_list[4]: case 1959: return 0 case 1976: return 1 case 'XML': match tree_list[2]: case 1963: match tree_list[1]: case 'ADA': return 3 case 'YANG': return 4 case 'ASP': return 5 case 1977: match tree_list[1]: case 'ADA': return 6 case 'YANG': return 7 case 'ASP': return 8 case 1994: match tree_list[4]: case 1959: return 9 case 1976: return 10" "def main(x): match x[0]: case 'ROFF': match x[1]: case 'AWK': match x[2]: case 'XTEND': return 0 case 'LEX': return 1 case 'MESON': return 2 case 'VCL': match x[2]: case 'XTEND': return 3 case 'LEX': return 4 case 'MESON': return 5 case 'NSIS': match x[1]: case 'AWK': return 6 case 'VCL': return 7 case 'C': match x[1]: case 'AWK': match x[3]: case 1994: return 8 case 1993: return 9 case 'VCL': return 10" "def choicex1(cond, x): if cond == 'RAML': return x elif cond == 'VCL': return x + 1 return x + 2 def choicex3(cond, x): if cond == 'OX': return x return x + 1 def main(x): if x[4] == 'EBNF': if x[2] == 2004: if x[0] == 2017: return choicex1(x[1], 0) elif x[0] == 2002: return choicex3(x[3], 3) return 5 elif x[2] == 2018: return 6 return 7 elif x[4] == 'COQ': return 8 return 9" "def three(items, left, right): if items[3] == 'VALA': return left if items[3] == 'LSL': return right def four(items, left, right): if items[4] == 1985: return left if items[4] == 1983: return right def zero(items, left, right): if items[0] == 'CLICK': return left if items[0] == 'CUDA': return right def two(items, left, right): if items[2] == 1972: return left if items[2] == 2006: return right def one(items, left, middle, right): if items[1] == 2018: return left if items[1] == 2012: return middle if items[1] == 1965: return right def main(items): return four(items, one(items, two(items, 0, three(items, 1, 2)), two(items, zero(items, 3, 4), 5), two(items, three(items, 6, 7), three(items, 8, 9))), 10)" "def zero(items, left, right): if items[0] == 1961: return left if items[0] == 1999: return right def one(items, left, right): if items[1] == 1959: return left if items[1] == 1964: return right def two(items, left, middle, right): if items[2] == 'DM': return left if items[2] == 'PIC': return middle if items[2] == 'XS': return right def three(items, left, middle, right): if items[3] == 2017: return left if items[3] == 2020: return middle if items[3] == 2019: return right def four(items, left, middle, right): if items[4] == 'MTML': return left if items[4] == 'OCAML': return middle if items[4] == 'NESC': return right def main(items): return three(items, two(items, one(items, 0, 1), zero(items, four(items, 2, 3, 4), one(items, 5, 6)), 7), two(items, 8, 9, 10), 11)" "def main(x): match x[0]: case 'COBOL': match x[3]: case 'ASP': match x[2]: case 2013: return 0 case 1960: match x[4]: case 2013: return 1 case 1964: return 2 case 1958: match x[1]: case 1990: return 3 case 1988: return 4 case 1996: return 5 case 'NGINX': return 6 case 'MTML': return 7 case 'EDN': return 8 case 'LEAN': return 9" "def one(items, left, middle, right): if items[1] == 'SQF': return left if items[1] == 'UNO': return middle if items[1] == 'PAN': return right def three(items, left, right): if items[3] == 'INI': return left if items[3] == 'EC': return right def zero(items, left, middle, right): if items[0] == 1958: return left if items[0] == 1966: return middle if items[0] == 2018: return right def two(items, left, right): if items[2] == 2009: return left if items[2] == 1964: return right def main(items): return one(items, three(items, zero(items, 0, 1, 2), two(items, 3, 4)), three(items, zero(items, 5, 6, 7), zero(items, 8, 9, 10)), 11)" "map = {'i': 1, 1975: {'i': 0, 'APEX': {'i': 4, 'VHDL': {'i': 3, 2005: 0, 1968: 1, 1979: 2}, 'PUG': 3, 'VCL': {'i': 3, 2005: 4, 1968: 5, 1979: 6}}, 'SVG': {'i': 4, 'VHDL': 7, 'PUG': 8, 'VCL': {'i': 2, 'STON': 9, 'GOSU': 10, 'KICAD': 11}}}, 1967: 12} def main(arr): current = map[arr[1]] while type(current) != int: current = current[arr[current['i']]] return current" "def zero(items, left, mid, right): if items[0] == 1957: return left if items[0] == 1985: return mid if items[0] == 2020: return right def four(items, left, right): if items[4] == 'EC': return left if items[4] == 'LATTE': return right def three(items, left, mid, right): if items[3] == 1976: return left if items[3] == 1997: return mid if items[3] == 1983: return right def two(items, left, mid, right): if items[2] == 'HAML': return left elif items[2] == 'RDOC': return mid elif items[2] == 'XC': return right def one(items, left, right): if items[1] == 1982: return left if items[1] == 2002: return right def main(items): return two(items, one(items, zero(items, three(items, 0, 1, 2), four(items, 3, 4), four(items, 5, 6)), 7), 8, four(items, one(items, zero(items, 9, 10, 11), 12), 13))" "def choicex3(cond, x): if cond == 2001: return x return x + 1 def main(x): if x[2] == 'LFE': if x[4] == 'BOO': if x[0] == 1968: return choicex3(x[3], 0) elif x[0] == 2009: return choicex3(x[3], 2) return choicex3(x[3], 4) elif x[4] == 'DIFF': if x[0] == 1989: return choicex3(x[3], 9) elif x[0] == 2009: return 8 return 7 return 6 elif x[2] == 'MTML': return 11 return 12" "def zero(items, left, middle, right): if items[0] == 'URWEB': return left if items[0] == 'HAML': return middle if items[0] == 'SCALA': return right def one(items, left, right): if items[1] == 'MQL4': return left if items[1] == 'NGINX': return right def two(items, left, right): if items[2] == 'RUST': return left if items[2] == 'PIKE': return right def three(items, left, middle, right): if items[3] == 1974: return left if items[3] == 2015: return middle if items[3] == 1959: return right def main(items): return three(items, zero(items, two(items, 0, 1), 2, one(items, 3, 4)), zero(items, two(items, 5, 6), two(items, 7, 8), two(items, 9, 10)), 11)" "def tree(n): if n[3] == 1980: return tree_0_up(n) elif n[3] == 1967: return tree_0_down(n) def tree_0_down(n): if n[0] == 2019: return 6 elif n[0] == 1962: return 10 elif n[0] == 1981: return tree_down_down(n) def tree_down_down(n): if n[1] == 2018: return 7 elif n[1] == 1994: return 8 elif n[1] == 1966: return 9 def tree_0_up(n): if n[0] == 2019: return tree_up_up(n) elif n[0] == 1962: return tree_up_down(n) elif n[0] == 1981: return 3 def tree_up_up(n): if n[1] == 2018: return 0 elif n[1] == 1994: return 1 elif n[1] == 1966: return 2 def tree_up_down(n): if n[2] == 'NL': return 4 elif n[2] == 'SQLPL': return 5 def main(n): return tree(n)" "def main(x): if x[2] == 'COBOL': return 10 elif x[4] == 2008: if x[0] == 'TCSH': a = 3 else: a = 0 if x[3] == 'FISH': return 0 + a elif x[3] == 'XS': return 1 + a else: return 2 + a elif x[3] == 'FISH': return 6 elif x[3] == 'PUG': return 9 else: if x[0] == 'TCSH': return 8 return 7" "def zero(items, left, right): if items[0] == 'GOSU': return left if items[0] == 'HACK': return right def four(items, left, middle, right): if items[4] == 1993: return left if items[4] == 1991: return middle if items[4] == 1981: return right def three(items, left, middle, right): if items[3] == 'TLA': return left if items[3] == 'ROFF': return middle if items[3] == 'MQL5': return right def two(items, left, right): if items[2] == 1992: return left if items[2] == 1985: return right def one(items, left, middle, right): if items[1] == 'RUST': return left if items[1] == 'GDB': return middle if items[1] == 'ELM': return right def main(items): return one(items, three(items, four(items, 0, two(items, 1, 2), zero(items, 3, 4)), 5, 6), 7, two(items, 8, three(items, four(items, 9, 10, 11), 12, 13)))" "def main(x): dict2 = {'NSIS': 0, 'NINJA': 1} dict3 = {'DM': 2, 'RHTML': 3} dict4 = {'SASS': 5, 'RUST': 6} dict44 = {'SASS': 7, 'RUST': 8} dict33 = {'DM': 9, 'RHTML': 10} dict4_up = {'SASS': dict2[x[2]], 'RUST': dict3[x[3]]} dict3_up = {'DM': 4, 'RHTML': dict4[x[4]]} dict2_up = {'NSIS': dict44[x[4]], 'NINJA': dict33[x[3]]} dict1 = {1998: dict4_up[x[4]], 1988: dict3_up[x[3]], 1999: dict2_up[x[2]]} dict0 = {1969: dict1[x[1]], 1962: 11, 2013: 12} return dict0[x[0]]" "def zero(items, left, middle, right): if items[0] == 1964: return left if items[0] == 1969: return middle if items[0] == 1976: return right def four(items, left, right): if items[4] == 2008: return left if items[4] == 2004: return right def three(items, left, right): if items[3] == 'XOJO': return left if items[3] == 'FORTH': return right def two(items, left, right): if items[2] == 1975: return left if items[2] == 1987: return right def one(items, left, middle, right): if items[1] == 1962: return left if items[1] == 1994: return middle if items[1] == 1991: return right def main(items): return four(items, zero(items, two(items, three(items, 0, 1), 2), one(items, three(items, 3, 4), 5, three(items, 6, 7)), 8), zero(items, three(items, one(items, 9, 10, 11), 12), 13, 14))" "def main(x): path = {1962: {1973: {1987: 0, 2016: {'YAML': 1, 'E': 2, 'CSS': 3}, 1974: 4}, 1966: {1965: 5, 1993: 6}, 1972: 7}, 1982: {1987: {1965: 8, 1993: {'YAML': 9, 'E': 10, 'CSS': 11}}, 2016: 12, 1974: 13}, 2013: 14} path = path[x[3]] if isinstance(path, int): return path if x[3] == 1962: path = path[x[4]] if isinstance(path, int): return path if x[3] == 1982 or x[4] == 1973: path = path[x[2]] if isinstance(path, int): return path if x[4] == 1966 or x[2] == 1987: path = path[x[1]] if isinstance(path, int): return path path = path[x[0]] return path" "def zero(items, left, middle, right): if items[0] == 'GLSL': return left if items[0] == 'NIT': return middle if items[0] == 'YANG': return right def one(items, left, right): if items[1] == 'COQ': return left if items[1] == 'XC': return right def two(items, left, right): if items[2] == 'C++': return left if items[2] == 'C': return right def three(items, left, middle, right): if items[3] == 'NIX': return left if items[3] == 'OZ': return middle if items[3] == 'XC': return right def main(items): return three(items, two(items, one(items, 0, 1), 2), one(items, two(items, 3, 4), 5), zero(items, two(items, 6, 7), 8, one(items, 9, 10)))" "def one(items, left, right): if items[1] == 1997: return left if items[1] == 2003: return right def three(items, left, middle, right): if items[3] == 1991: return left if items[3] == 1997: return middle if items[3] == 1970: return right def zero(items, left, right): if items[0] == 1995: return left if items[0] == 2008: return right def two(items, left, middle, right): if items[2] == 1986: return left if items[2] == 1967: return middle if items[2] == 1984: return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), one(items, 3, 4)), 5, three(items, one(items, 6, 7), one(items, 8, 9), 10))" "s = [{'STAN', 1990, 1993}, {'STAN', 1990, 1970}, {'STAN', 1975, 1989}, {'STAN', 1975, 1959}, {'STAN', 1975, 1985}, {'STAN', 2003}, {'CSV', 1993, 1989}, {'CSV', 1993, 1959}, {'CSV', 1993, 1985}, {'CSV', 1970, 1989}, {'CSV', 1970, 1959}, {'CSV', 1970, 1985}, {'BLADE'}] def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "def x3(items, left, middle, right): if items[3] == 2017: return left if items[3] == 1998: return middle if items[3] == 1958: return right def x2(items, left, right): if items[2] == 1978: return left if items[2] == 1981: return right def x1(items, left, middle, right): if items[1] == 'TWIG': return left if items[1] == 'NGINX': return middle if items[1] == 'ABAP': return right def x0(items, left, right): if items[0] == 'DYLAN': return left if items[0] == 'OX': return right def main(items): return x1(items, x2(items, x3(items, 0, 1, 2), 3), 4, x2(items, x3(items, 5, 6, 7), x0(items, 8, 9)))" "tree = {'ATS': {'XBASE': {2016: {2006: 1, 1968: 2, 1958: 3}, 1988: 0}, 'VUE': 4}, 'HACK': {1993: 5, 1961: {'XBASE': 6, 'VUE': 7}, 1989: {2006: {1988: 8, 2016: 9}, 1968: 10, 1958: 11}}, 'SCAML': 12} def main(path): state1 = tree[path[3]] if path[3] == 'ATS': state2 = state1[path[0]] if path[0] == 'XBASE' and path[4] == 1988: return state2[path[4]] elif path[0] == 'VUE': return state1[path[0]] return state2[path[4]][path[2]] elif path[3] == 'HACK': state2 = state1[path[1]] if path[1] == 1993: return state2 elif path[1] == 1961: return state2[path[0]] elif path[1] == 1989 and path[2] == 2006: return state2[path[2]][path[4]] return state2[path[2]] return state1" "import math def main(x): match x[3]: case 2009: match x[1]: case 'PLSQL': match x[0]: case 1982: return 0 case 1974: return 1 case 1975: return 2 case 'XOJO': match x[2]: case 'PLSQL': return 3 case 'LATTE': return 4 case 'ROUGE': return 5 case 2008: match x[0]: case 1982: match x[1]: case 'PLSQL': return 6 case 'XOJO': return 7 case 1974: match x[2]: case 'PLSQL': return 8 case 'LATTE': return 9 case 'ROUGE': return 10 case 1975: return 11" "def main(res): ans = {4: {2000: {2: {'CSON': 13, 'PLSQL': 12, 'JULIA': {3: {'VUE': 11, 'ABNF': 10, 'SCSS': {1: {1963: 9, 1989: 8}}}}}}, 1987: {0: {2002: 7, 1978: {2: {'CSON': {3: {'VUE': 6, 'ABNF': 5, 'SCSS': 4}}, 'PLSQL': {1: {1963: 3, 1989: 2}}, 'JULIA': {1: {1963: 1, 1989: 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(res): ans = {3: {'AMPL': {0: {1990: {2: {'VALA': {1: {2001: 5, 2008: 4, 2017: 3}}, 'APL': {4: {1988: 7, 1972: 6}}}}, 1979: {4: {1988: 2, 1972: {2: {'APL': 1, 'VALA': 0}}}}}}, 'ASN.1': {0: {1990: 12, 1979: {4: {1972: 8, 1988: {1: {2001: 11, 2008: 10, 2017: 9}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def choicex1(cond, x): if cond == 'BLADE': return x return x + 1 def choicex3(cond, x): if cond == 'RED': return x return x + 1 def choicex4(cond, x): if cond == 1989: return x return x + 1 def main(x): if x[2] == 'PIC': if x[0] == 2009: if x[1] == 'BLADE': return choicex4(x[4], 0) return choicex4(x[4], 2) return 4 elif x[2] == 'TEX': if x[4] == 1989: if x[0] == 1975: return choicex3(x[3], 6) return 5 elif x[4] == 1975: if x[0] == 2009: return choicex1(x[1], 8) return 10 return 10" "def zero(items, left, middle, right): if items[0] == 2015: return left if items[0] == 1959: return middle if items[0] == 1988: return right def three(items, left, right): if items[3] == 'SELF': return left if items[3] == 'SHELL': return right def two(items, left, middle, right): if items[2] == 2005: return left if items[2] == 2008: return middle if items[2] == 1979: return right def one(items, left, right): if items[1] == 'C++': return left if items[1] == 'ROUGE': return right def main(items): a = (three(items, two(items, zero(items, 0, 1, 2), 3, one(items, 4, 5)), one(items, 6, two(items, 7, 8, 9))),) return a[0]" "def main(res): ans = {0: {'PIKE': {2: {1996: 5, 2015: {3: {1973: 6, 2009: 7, 2003: 8}}, 1985: 9}}, 'SQF': {3: {2003: 4, 2009: 3, 1973: {2: {1985: 2, 2015: 1, 1996: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): if x[0] == 1983: return lvl1(x) else: return lvl2(x) def lvl1(x): if x[4] == 'P4': return lvl11(x) else: return 2 def lvl11(x): if x[1] == 1960: return 0 else: return 1 def lvl2(x): if x[4] == 'P4': return lvl21(x) else: return lvl22(x) def lvl21(x): if x[1] == 1960: return lvl211(x) else: return 6 def lvl211(x): if x[2] == 'OCAML': return 3 elif x[2] == 'KIT': return 4 elif x[2] == 'MUF': return 5 def lvl22(x): if x[3] == 'SHELL': return 7 elif x[3] == 'XC': return lvl222(x) elif x[3] == 'CLEAN': return 10 def lvl222(x): if x[1] == 1960: return 8 elif x[3] == 1958: return 9" "def zero(items, left, right): if items[0] == 1962: return left if items[0] == 2010: return right def four(items, left, middle, right): if items[4] == 2006: return left if items[4] == 1975: return middle if items[4] == 1960: return right def three(items, left, right): if items[3] == 'PERL': return left if items[3] == 'AMPL': return right def two(items, left, middle, right): if items[2] == 'CSS': return left if items[2] == 'KICAD': return middle if items[2] == 'COQ': return right def one(items, left, right): if items[1] == 1976: return left if items[1] == 1980: return right def main(items): return zero(items, four(items, two(items, three(items, 0, 1), three(items, 2, 3), 4), three(items, two(items, 5, 6, 7), 8), one(items, three(items, 9, 10), 11)), 12)" "def main(x): if x[0] == 'NSIS': return three(x) else: if x[2] == 1984: if x[1] == 2019: return 0 else: return 1 if x[2] == 1968: return 2 else: return 3 def three(x): if x[3] == 'XPROC': if x[2] == 1984: return 5 if x[2] == 1968: return 6 else: return 7 if x[3] == 'KIT': if x[2] == 1984: return 8 if x[2] == 1968: return 9 else: return 10 else: return 4" "s = {2016: {2005: {'ALLOY': 0, 'XBASE': 1}, 2017: 2, 1994: {'GLYPH': {'ALLOY': 3, 'XBASE': 4, 'RHTML': 5}, 'IOKE': {'RHTML': 7}, 'OX': 6}}, 1984: {'GLYPH': {'RHTML': 7}, 'IOKE': 8, 'OX': {2005: 9, 2017: 10, 1994: 11}}, 1959: 12} def main(path): s1 = s[path[0]] if isinstance(s1, int): return s1 if path[0] == 2016: s1 = s1[path[4]] if isinstance(s1, int): return s1 if path[4] == 2005: return s1[path[3]] else: s1 = s1[path[2]] if isinstance(s1, int): return s1 if path[2] == 'IOKE': return 5 else: return s1[path[3]] else: s1 = s1[path[2]] if isinstance(s1, int): return s1 if path[2] == 'GLYPH': return 7 else: return s1[path[4]]" "def main(data: tuple): match data[0]: case 'XOJO': return a1(data) case 'REBOL': return 11 def a1(data: tuple): match data[3]: case 'MIRAH': return b1(data) case 'COQ': return b2(data) def b1(data: tuple): match data[4]: case 'WISP': return c1(data) case 'EC': return c2(data) case 'C++': return 5 def b2(data: tuple): match data[4]: case 'WISP': return c3(data) case 'EC': return c4(data) case 'C++': return 10 def c1(data: tuple): match data[1]: case 1965: return 0 case 1982: return 1 def c2(data: tuple): match data[2]: case 1975: return 2 case 1964: return 3 case 1991: return 4 def c3(data: tuple): match data[1]: case 1965: return 6 case 1982: return 7 def c4(data: tuple): match data[1]: case 1965: return 8 case 1982: return 9" "def main(res): ans = {0: {1991: 11, 2018: {4: {1971: {2: {'R': 10, 'MUPAD': 7, 'PUG': {3: {'SAS': 8, 'STAN': 9}}}}, 1980: 6, 2020: {2: {'R': 5, 'PUG': {3: {'SAS': 3, 'STAN': 4}}, 'MUPAD': {1: {'C++': 2, 'OPA': 1, 'REXX': 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero(items, left, right): if items[0] == 1965: return left if items[0] == 1971: return right def two(items, left, right): if items[2] == 'J': return left if items[2] == 'MUPAD': return right def one(items, left, middle, right): if items[1] == 2003: return left if items[1] == 1998: return middle if items[1] == 1966: return right def three(items, left, middle, right): if items[3] == 'HY': return left if items[3] == 'RAML': return middle if items[3] == 'CSON': return right def main(items): return three(items, one(items, two(items, 0, 1), two(items, 2, 3), two(items, 4, 5)), 6, one(items, zero(items, 7, 8), two(items, 9, 10), 11))" "def f(x): match x[2]: case 1976: match x[0]: case 'JSON': match x[1]: case 'APEX': return 0 case 'ARC': return 1 case 'GN': return 2 case 'ECL': match x[1]: case 'APEX': return 3 case 'ARC': return 4 case 'GN': return 5 case 'NIX': return 6 case 2013: match x[0]: case 'JSON': match x[1]: case 'APEX': return 7 case 'ARC': return 8 case 'GN': return 9 case 'ECL': return 10 case 'NIX': return 11 case 2005: return 12 def main(*args): return f(*args)" "def LEFTfirst(x): if x[2] == 1996: return LEFTsecondleft(x) if x[2] == 1994: return 3 else: return LEFTsecondright(x) def LEFTsecondleft(x): if x[0] == 'VHDL': return 0 else: return LEFTthirdleft(x) def LEFTsecondright(x): if x[3] == 'FISH': return 6 else: return LEFTthirdright(x) def LEFTthirdright(x): if x[4] == 'PHP': return 4 else: return 5 def LEFTthirdleft(x): if x[4] == 'PHP': return 1 else: return 2 def RIGHTfirst(x): if x[2] == 1996: return 8 if x[2] == 1994: return RIGHTsecond(x) else: return 12 def RIGHTsecond(x): if x[4] == 'RED': return 11 else: return RIGHTthird(x) def RIGHTthird(x): if x[0] == 'VHDL': return 9 else: return 10 def f(x): if x[1] == 'POD': return LEFTfirst(x) if x[1] == 'UNO': return 7 else: return RIGHTfirst(x) def main(x): return f(x)" "s = {1961: {1995: {2008: {1985: 0, 1999: 1, 2018: 2}, 2010: 3, 1975: {1957: 4, 2016: 5, 1972: 6}}, 2013: {1957: 7, 2016: {2008: 8, 2010: 9, 1975: 10}, 1972: 11}, 1963: 12}, 2020: 13, 1968: 14} def main(path): s1 = s[path[3]] if path[3] == 1961: s2 = s1[path[4]] if path[4] == 1995: s3 = s2[path[0]] if path[0] == 2008: s4 = s3[path[2]] return s4 elif path[0] == 2010: return 3 elif path[0] == 1975: s4 = s3[path[1]] return s4 elif path[4] == 2013: s3 = s2[path[1]] if path[1] == 2016: s4 = s3[path[0]] return s4 else: return s3 else: return 12 else: return s1" "def f(x): match x[1]: case 'NIT': match x[3]: case 2010: match x[0]: case 1963: return 0 case 1997: return 1 case 1957: match x[2]: case 1962: return 2 case 1982: return 3 case 1971: return 4 case 'SASS': match x[2]: case 1962: match x[3]: case 2010: return 5 case 1957: return 6 case 1971: return 7 case 1982: match x[0]: case 1963: return 8 case 1997: return 9 def main(*args): return f(*args)" "def main(res): ans = {0: {2002: {2: {'OOC': 6, 'VHDL': 7, 'JSON': {1: {'LEAN': 9, 'RHTML': 8}}}}, 1963: {1: {'RHTML': {2: {'JSON': 2, 'VHDL': 1, 'OOC': 0}}, 'LEAN': {3: {1992: 5, 2002: 4, 1962: 3}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "tree = {'ASN.1': 10, 'VCL': {'GLYPH': {2006: {'LASSO': 9, 'OPA': 8, 'XTEND': 7}, 1969: 6}, 'NIX': {2006: 5, 1969: 4}, 'CLICK': {2006: {'LASSO': 3, 'OPA': 2, 'XTEND': 1}, 1969: 0}}} def main(x): res = 0 try: res = tree[x[4]] except TypeError or KeyError: return res try: res = res[x[2]] except TypeError or KeyError: return res try: res = res[x[3]] except TypeError or KeyError: return res try: res = res[x[1]] except TypeError or KeyError: return res return res" "def zero(items, left, right): if items[0] == 1985: return left if items[0] == 1979: return right def one(items, left, middle, right): if items[1] == 1989: return left if items[1] == 2001: return middle if items[1] == 2011: return right def two(items, left, right): if items[2] == 1994: return left if items[2] == 1960: return right def three(items, left, middle, right): if items[3] == 'MQL5': return left if items[3] == 'NIX': return middle if items[3] == 'RDOC': return right def four(items, left, middle, right): if items[4] == 'MQL5': return left if items[4] == 'GAP': return middle if items[4] == 'IDL': return right def main(items): return one(items, zero(items, four(items, two(items, 0, 1), 2, three(items, 3, 4, 5)), 6), 7, four(items, zero(items, 8, three(items, 9, 10, 11)), 12, 13))" "def main(x): ans = {'JSX': {2002: {'HTML': {'QMAKE': 0, 'XTEND': 1}, 'OPAL': 2, 'GOSU': 3}, 2013: {'QMAKE': 4, 'XTEND': 5}, 1977: 6}, 'LOGOS': {2002: {'HTML': {'QMAKE': 7, 'XTEND': 8}, 'OPAL': 9, 'GOSU': 10}, 2013: 11, 1977: 12}} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] break return i" "def main(res): ans = {3: {1982: {0: {'JAVA': 10, 'HTTP': 9}}, 2015: {2: {'GAMS': {0: {'HTTP': 7, 'JAVA': 8}}, 'ASN.1': {1: {'YAML': 4, 'GOLO': 5}}, 'LSL': 6}}, 1968: {0: {'JAVA': {1: {'GOLO': 3, 'YAML': 2}}, 'HTTP': {1: {'GOLO': 1, 'YAML': 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero(items, left, middle, right): if items[0] == 'MINID': return left if items[0] == 'IOKE': return middle if items[0] == 'FLUX': return right def four(items, left, right): if items[4] == 2016: return left if items[4] == 1957: return right def three(items, left, middle, right): if items[3] == 'AWK': return left if items[3] == 'ELM': return middle if items[3] == 'EJS': return right def one(items, left, right): if items[1] == 1984: return left if items[1] == 1992: return right def main(items): return one(items, three(items, four(items, zero(items, 0, 1, 2), zero(items, 3, 4, 5)), four(items, 6, zero(items, 7, 8, 9)), 10), 11)" "def zero(items, left, middle, right): if items[0] == 1968: return left if items[0] == 1981: return middle if items[0] == 1958: return right def one(items, left, middle, right): if items[1] == 1989: return left if items[1] == 2018: return middle if items[1] == 1999: return right def three(items, left, right): if items[3] == 1987: return left if items[3] == 1982: return right def four(items, left, right): if items[4] == 1958: return left if items[4] == 2007: return right def two(items, left, middle, right): if items[2] == 2010: return left if items[2] == 2007: return middle if items[2] == 2019: return right def main(items): return two(items, three(items, one(items, 0, zero(items, 1, 2, 3), zero(items, 4, 5, 6)), zero(items, 7, four(items, 8, 9), 10)), 11, 12)" "def zero(items, left, middle, right): if items[0] == 'LSL': return left if items[0] == 'ATS': return middle if items[0] == 'SAGE': return right def four(items, left, middle, right): if items[4] == 2012: return left if items[4] == 1983: return middle if items[4] == 2010: return right def three(items, left, middle, right): if items[3] == 'TLA': return left if items[3] == 'QMAKE': return middle if items[3] == 'YAML': return right def two(items, left, right): if items[2] == 1967: return left if items[2] == 1991: return right def one(items, left, middle, right): if items[1] == 'NESC': return left if items[1] == 'OZ': return middle if items[1] == 'HAML': return right def main(items): return two(items, three(items, one(items, zero(items, 0, 1, 2), four(items, 3, 4, 5), 6), 7, 8), zero(items, 9, 10, 11))" "def branch00(x): if x[0] == 'GLYPH': return 9 elif x[0] == 'STAN': return 10 elif x[0] == 'PERL6': return 11 def branch01(x): if x[0] == 'GLYPH': return 4 elif x[0] == 'STAN': return 5 elif x[0] == 'PERL6': return 6 def branch02(x): if x[0] == 'GLYPH': return 1 elif x[0] == 'STAN': return 2 elif x[0] == 'PERL6': return 3 def branch11(x): if x[3] == 'TLA': return 7 elif x[3] == 'CUDA': return 8 elif x[3] == 'REXX': return branch00(x) def branch12(x): if x[3] == 'TLA': return 0 elif x[3] == 'CUDA': return branch02(x) elif x[3] == 'REXX': return branch01(x) def branchmain(x): if x[2] == 'SWIFT': return branch12(x) elif x[2] == 'XSLT': return branch11(x) elif x[2] == 'PERL': return 12 def main(x): if x[1] == 'STATA': return branchmain(x) elif x[1] == 'DART': return 13 elif x[1] == 'MQL4': return 14" "def main(args): dict2 = {1987: 0, 2003: 1, 1994: 2} dict22 = {1987: 6, 2003: 7, 1994: 8} dict1 = {'FLUX': dict2[args[2]], 'ALLOY': 3, 'XSLT': 4} dict3 = {1991: dict22[args[2]], 1977: 9, 1986: 10} dict0 = {1982: dict1[args[1]], 2019: 5, 2003: dict3[args[3]]} return dict0[args[0]]" "def main(res): ans = {1: {'NSIS': {0: {1971: 10, 1970: {3: {'STATA': 9, 'XML': 8, 'XSLT': 7}}, 1959: {2: {'SCSS': 6, 'IOKE': 5}}}}, 'SAS': 4, 'TEA': {2: {'SCSS': 3, 'IOKE': {0: {1971: 2, 1970: 1, 1959: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): a = [2, {2017: [0, {'SCALA': [3, {1996: 0, 2019: 1, 1961: 2}], 'METAL': [3, {1996: 3, 2019: 4, 1961: 5}]}], 1963: [0, {'SCALA': [3, {1996: 6, 2019: 7, 1961: 8}], 'METAL': [1, {1985: 9, 1981: 10, 1959: 11}]}], 1973: 12}] while type(a) is not int: a = a[1][x[a[0]]] return a" "def main(x): def f1(c1, c2): if x[1] == 'MESON': return c1 elif x[1] == 'TWIG': return c2 def f3(c1, c2, c3): if x[3] == 'D': return c1 elif x[3] == 'GDB': return c2 elif x[3] == 'GAP': return c3 def f0(c1, c2, c3): if x[0] == 1992: return c1 elif x[0] == 1973: return c2 elif x[0] == 1970: return c3 if x[2] == 2015: return f1(f3(0, 1, 2), f0(3, 4, 5)) elif x[2] == 1984: return f0(f1(6, 7), 8, 9) elif x[2] == 1981: return 10" "def zero(items, left, middle, right): if items[0] == 1987: return left if items[0] == 1998: return middle if items[0] == 2011: return right def three(items, left, middle, right): if items[3] == 1992: return left if items[3] == 1976: return middle if items[3] == 1985: return right def two(items, left, middle, right): if items[2] == 1997: return left if items[2] == 2009: return middle if items[2] == 1970: return right def one(items, left, middle, right): if items[1] == 'PAN': return left if items[1] == 'RDOC': return middle if items[1] == 'NSIS': return right def main(items): return three(items, one(items, zero(items, 0, 1, 2), zero(items, 3, 4, 5), two(items, 6, 7, 8)), zero(items, 9, 10, 11), 12)" "def main(x): dict3_l = {'HAML': 0, 'MAX': 1} dict3_c = {'HAML': 2, 'MAX': 3} dict3_r = {1979: 5, 1987: 6, 1972: 7} dict2_l = {1979: dict3_l[x[2]], 1987: dict3_c[x[2]], 1972: 4} dict2_r = {'CSS': dict3_r[x[3]], 'VALA': 8} dict1 = {2020: dict2_l[x[3]], 1998: dict2_r[x[1]], 1973: 9} return dict1[x[0]]" "def third(x, right, middle, left): if x[3] == 1988: return right if x[3] == 1982: return middle if x[3] == 1975: return left def second(x, right, middle): if x[2] == 'LEAN': return right if x[2] == 'LFE': return middle def first(x, right, middle, left): if x[1] == 1992: return right if x[1] == 1988: return middle if x[1] == 1957: return left def zero(x, right, middle, left): if x[0] == 'ALLOY': return right if x[0] == 'CLICK': return middle if x[0] == 'FORTH': return left def main(x): return second(x, first(x, zero(x, 0, 1, 2), third(x, 3, 4, 5), third(x, 6, 7, 8)), third(x, zero(x, 9, 10, 11), 12, 13)) main(['FORTH', 1992, 'LFE', 1988])" "def right(x): if x[0] == 1974: return 8 elif x[0] == 2018: return rr(x) def rr(x): if x[4] == 2012: return rrl(x) elif x[4] == 2007: return 11 def rrl(x): if x[1] == 1963: return 9 elif x[1] == 1966: return 10 def left(x): if x[1] == 1963: return ll(x) elif x[1] == 1966: return lr(x) def lr(x): if x[2] == 1996: return 4 elif x[2] == 2001: return 5 elif x[2] == 1997: return lrr(x) def lrr(x): if x[0] == 1974: return 6 elif x[0] == 2018: return 7 def ll(x): if x[0] == 1974: return lll(x) elif x[0] == 2018: return 3 def lll(x): if x[2] == 1996: return 0 elif x[2] == 2001: return 1 elif x[2] == 1997: return 2 def main(x): if x[3] == 2017: return left(x) elif x[3] == 1990: return right(x)" "def zero(items, left, right): if items[0] == 'SCAML': return left if items[0] == 'SELF': return right def three(items, left, middle, right): if items[3] == 'PONY': return left if items[3] == 'NINJA': return middle if items[3] == 'DYLAN': return right def two(items, left, middle, right): if items[2] == 2002: return left if items[2] == 1967: return middle if items[2] == 1994: return right def one(items, left, middle, right): if items[1] == 'NESC': return left if items[1] == 'TXL': return middle if items[1] == 'FANCY': return right def main(items): return two(items, three(items, one(items, 0, 1, 2), 3, zero(items, 4, 5)), one(items, 6, zero(items, 7, 8), 9), 10)" "def lm(x): if x[3] == 2001: return 3 elif x[3] == 2007: return 4 def left(x): if x[1] == 1982: return ll(x) elif x[1] == 2017: return lm(x) elif x[1] == 2003: return lr(x) def lr(x): if x[2] == 'VUE': return 5 elif x[2] == 'NSIS': return 6 elif x[2] == 'PIC': return 7 def ll(x): if x[2] == 'VUE': return 0 elif x[2] == 'NSIS': return 1 elif x[2] == 'PIC': return 2 def main(x): if x[0] == 1988: return left(x) elif x[0] == 2006: return 8 elif x[0] == 2020: return 9" "def zero(items, left, right): if items[0] == 1998: return left if items[0] == 2006: return right def one(items, left, middle, right): if items[1] == 'PERL6': return left if items[1] == 'TXL': return middle if items[1] == 'NIM': return right def three(items, left, right): if items[3] == 2011: return left if items[3] == 1966: return right def two(items, left, middle, right): if items[2] == 1968: return left if items[2] == 1971: return middle if items[2] == 1957: return right def main(items): return zero(items, three(items, one(items, 0, 1, 2), one(items, 3, 4, 5)), one(items, two(items, 6, 7, 8), three(items, 9, 10), 11))" "def zero(items, left, middle, right): if items[0] == 'JSON5': return left if items[0] == 'CHUCK': return middle if items[0] == 'OPAL': return right def one(items, left, right): if items[1] == 'NGINX': return left if items[1] == 'PERL6': return right def two(items, left, right): if items[2] == 'DM': return left if items[2] == 'SAGE': return right def three(items, left, middle, right): if items[3] == 'MAKO': return left if items[3] == 'POD': return middle if items[3] == 'RAGEL': return right def four(items, left, right): if items[4] == 'PIKE': return left if items[4] == 'NIT': return right def main(items): return two(items, three(items, zero(items, four(items, 0, 1), one(items, 2, 3), four(items, 4, 5)), four(items, one(items, 6, 7), one(items, 8, 9)), 10), 11)" "def main(x): match x[1]: case 'D': match x[4]: case 1968: match x[2]: case 1994: match x[0]: case 'TERRA': return 0 case 'FISH': return 1 case 'EBNF': return 2 match x[1]: case 'D': match x[4]: case 1968: match x[2]: case 1978: return 6 case 1979: match x[0]: case 'TERRA': return 3 case 'FISH': return 4 case 'EBNF': return 5 match x[1]: case 'D': match x[4]: case 2000: match x[3]: case 'JSX': return 7 case 'NSIS': return 8 match x[1]: case 'TOML': match x[0]: case 'FISH': return 11 case 'EBNF': return 12 case 'TERRA': match x[3]: case 'JSX': return 9 case 'NSIS': return 10 match x[1]: case 'CIRRU': return 13" "def main(x): if x[1] == 'XOJO': if x[3] == 1978: return ['TXL', 'SELF'].index(x[0]) elif x[3] == 1973: return 2 if x[1] == 'VOLT': return [1971, 1981, 1957].index(x[2]) + 3 if x[1] == 'MQL5': if x[0] == 'TXL': return [1971, 1981, 1957].index(x[2]) + 6 elif x[0] == 'SELF': return [1978, 1973].index(x[3]) + 9" "_dict = {1997: {1999: {'SMT': 0, 'XC': 1}, 1981: 2, 2014: {'SMT': 3, 'XC': 4}}, 1978: {1971: {1999: {'SMT': 5, 'XC': 6}, 1981: {'SMT': 7, 'XC': 8}, 2014: 9}, 2020: 10, 1970: 11}, 1957: 12} def main(_list): return search(_list, _dict) def search(_list, _dict): for word in _list: if word in _dict: if isinstance(_dict[word], dict): return search(_list, _dict[word]) else: return _dict[word]" "def lm(x): if x[4] == 'KRL': return lml(x) elif x[4] == 'EDN': return lmm(x) elif x[4] == 'PUG': return 11 def lml(x): if x[2] == 2002: return 5 elif x[2] == 1966: return 6 elif x[2] == 2015: return 7 def lmm(x): if x[0] == 'SMT': return 8 elif x[0] == 'E': return 9 elif x[0] == 'OOC': return 10 def left(x): if x[1] == 'FREGE': return ll(x) elif x[1] == 'UNO': return lm(x) elif x[1] == 'SQF': return 12 def llm(x): if x[0] == 'SMT': return 1 elif x[0] == 'E': return 2 elif x[0] == 'OOC': return 3 def ll(x): if x[2] == 2002: return 0 elif x[2] == 1966: return llm(x) elif x[2] == 2015: return 4 def main(x): if x[3] == 1994: return left(x) elif x[3] == 2001: return 13 elif x[3] == 2020: return 14" "class Node: def __init__(self, data, link, next): self.data = data self.link = link self.next = next def find_next(self): for i in range(len(self.next)): if self.link[i] == self.data: return self.next[i] def main(x): n5_3 = Node(6, [], []) n5_2 = Node(5, [], []) n5_1 = Node(4, [], []) n4_3 = Node(3, [], []) n4_2 = Node(2, [], []) n4_1 = Node(1, [], []) n5 = Node(x[4], ['MIRAH', 'SELF', 'OOC'], [n5_1, n5_2, n5_3]) n4 = Node(x[4], ['MIRAH', 'SELF', 'OOC'], [n4_1, n4_2, n4_3]) n3_1 = Node(0, [], []) n3 = Node(x[0], [2003, 1972, 1993], [n3_1, n4, n5]) n2_2 = Node(8, [], []) n2_1 = Node(7, [], []) n_1 = Node(9, [], []) n2 = Node(x[1], ['ABAP', 'C++', 'EAGLE'], [n3, n2_1, n2_2]) n = Node(x[2], [1961, 2015], [n2, n_1]) while n: res = n n = n.find_next() return res.data" "def zero(items, left, middle, right): if items[0] == 1999: return left if items[0] == 1980: return middle if items[0] == 1993: return right def one(items, left, middle, right): if items[1] == 1968: return left if items[1] == 1978: return middle if items[1] == 1993: return right def two(items, left, right): if items[2] == 1993: return left if items[2] == 2019: return right def three(items, left, middle, right): if items[3] == 'LEAN': return left if items[3] == 'R': return middle if items[3] == 'PUG': return right def main(items): return two(items, three(items, zero(items, 0, 1, 2), 3, zero(items, 4, 5, 6)), three(items, 7, one(items, 8, 9, 10), 11))" "def zero(items, left, right): if items[0] == 'DART': return left if items[0] == 'SCALA': return right def four(items, left, right): if items[4] == 1974: return left if items[4] == 1978: return right def three(items, left, right): if items[3] == 'MQL4': return left if items[3] == 'IDL': return right def two(items, left, midle, right): if items[2] == 1980: return left if items[2] == 2008: return midle if items[2] == 1975: return right def one(items, left, middle, right): if items[1] == 2002: return left if items[1] == 1985: return middle if items[1] == 1984: return right def main(items): return two(items, zero(items, one(items, 0, 1, 2), 3), 4, one(items, three(items, 5, zero(items, 6, 7)), four(items, 8, 9), 10))" "def main(x): dict0 = {'GLSL': 2, 'RDOC': 3, 'TERRA': 4} dict00 = {'GLSL': 5, 'RDOC': 6, 'TERRA': 7} dict1 = {1978: 8, 2001: 9} dict2 = {'OPA': 0, 'ARC': 1, 'JFLEX': dict0[x[0]]} dict22 = {'OPA': dict00[x[0]], 'ARC': dict1[x[1]], 'JFLEX': 10} dict4 = {'MQL4': dict2[x[2]], 'BISON': dict22[x[2]]} dict3 = {1960: dict4[x[4]], 1969: 11} return dict3[x[3]]" "def four(items, left, right): if items[4] == 2019: return left if items[4] == 1994: return right def three(items, left, middle, right): if items[3] == 1992: return left if items[3] == 1996: return middle if items[3] == 2015: return right def two(items, left, middle, right): if items[2] == 1979: return left if items[2] == 1999: return middle if items[2] == 2017: return right def one(items, left, middle, right): if items[1] == 1969: return left if items[1] == 1983: return middle if items[1] == 1962: return right def zero(items, left, middle, right): if items[0] == 'CLEAN': return left if items[0] == 'XPROC': return middle if items[0] == 'BLADE': return right def main(items): return four(items, one(items, two(items, 0, zero(items, 1, 2, 3), three(items, 4, 5, 6)), 7, 8), 9)" "def main(x): match x[0]: case 'OCAML': return 9 case 'KIT': match x[1]: case 1983: return 8 case 1960: return 7 case 1984: match x[3]: case 'PLSQL': return 0 case 'SAGE': match x[2]: case 1985: return 1 case 1978: return 2 case 1979: return 3 case 'REBOL': match x[2]: case 1985: return 4 case 1978: return 5 case 1979: return 6" "def zero(items, left, right): if items[0] == 'EDN': return left if items[0] == 'ANTLR': return right def four(items, left, middle, right): if items[4] == 'TXL': return left if items[4] == 'HAML': return middle if items[4] == 'CLICK': return right def three(items, left, middle, right): if items[3] == 2009: return left if items[3] == 1958: return middle if items[3] == 2014: return right def two(items, left, middle, right): if items[2] == 'SAS': return left if items[2] == 'ASP': return middle if items[2] == 'XBASE': return right def one(items, left, middle, right): if items[1] == 1977: return left if items[1] == 2015: return middle if items[1] == 1993: return right def main(items): return three(items, four(items, two(items, 0, 1, 2), 3, zero(items, 4, 5)), zero(items, 6, one(items, two(items, 7, 8, 9), 10, 11)), 12)" "path = {1960: {'SCSS': {2017: 0, 1960: 1, 1957: 2}, 'LASSO': {'RHTML': 3, 'RAML': 4}, 'CSS': 5}, 2011: {'SCSS': 6, 'LASSO': 7, 'CSS': {2017: {'RHTML': 8, 'RAML': 9}, 1960: 10, 1957: 11}}} def main(x): result = path[x[3]][x[4]] if type(result) == int: return result if x[4] == 'SCSS': result = result[x[2]] elif x[4] == 'LASSO': result = result[x[1]] elif x[2] == 2017: result = result[x[2]][x[1]] else: result = result[x[2]] return result" "def main(lst): if lst[2] == 'CUDA': if lst[3] == 'R': if lst[1] == 1995: return 0 else: return 1 elif lst[1] == 1995: return 2 else: return 3 elif lst[2] == 'XML': if lst[3] == 'R': if lst[1] == 1995: return 4 else: return 5 else: return 6 elif lst[0] == 'FREGE': if lst[3] == 'R': return 7 else: return 8 else: return 9" "def zero(items, left, right): if items[0] == 'MUF': return left if items[0] == 'TERRA': return right def four(items, left, middle, right): if items[4] == 'RHTML': return left if items[4] == 'CLIPS': return middle if items[4] == 'SWIFT': return right def three(items, left, middle, right): if items[3] == 2003: return left if items[3] == 1989: return middle if items[3] == 1959: return right def two(items, left, middle, right): if items[2] == 'DYLAN': return left if items[2] == 'SQLPL': return middle if items[2] == 'FLUX': return right def one(items, left, middle, right): if items[1] == 'ASP': return left if items[1] == 'HY': return middle if items[1] == 'NIM': return right def main(items): return three(items, one(items, zero(items, four(items, 0, 1, 2), two(items, 3, 4, 5)), zero(items, 6, 7), two(items, zero(items, 8, 9), 10, 11)), 12, 13)" "def f1(x): if x[1] == 'RAML': return f3a(x) elif x[1] == 'OOC': return f4a(x) def f3a(x): if x[3] == 1987: return f4b(x) elif x[3] == 1992: return 3 elif x[3] == 1976: return 4 def f4a(x): if x[4] == 'SHELL': return 5 elif x[4] == 'ZIMPL': return f0a(x) def f4b(x): if x[4] == 'SHELL': return f0b(x) elif x[4] == 'ZIMPL': return 2 def f0a(x): if x[0] == 1980: return 6 elif x[0] == 1957: return f3b(x) def f0b(x): if x[0] == 1980: return 0 elif x[0] == 1957: return 1 def f3b(x): if x[3] == 1987: return 7 elif x[3] == 1992: return 8 elif x[3] == 1976: return 9 def main(x): return f1(x)" "def f4(x): if x[4] == 2002: if x[0] == 'MINID': return 8 elif x[0] == 'TCL': return 9 elif x[0] == 'QML': return 10 elif x[4] == 1995: return 11 def f3(x): if x[4] == 2002: if x[3] == 2006: return 4 elif x[3] == 1984: return 5 elif x[3] == 1994: return 6 elif x[4] == 1995: return 7 def f2(x): if x[4] == 1995: return 3 elif x[4] == 2002: if x[0] == 'MINID': return 0 elif x[0] == 'TCL': return 1 elif x[0] == 'QML': return 2 def f1(x): if x[2] == 'ASP': return f2(x) elif x[2] == 'PAN': return f3(x) elif x[2] == 'MIRAH': return f4(x) def main(x): if x[1] == 1997: return 12 elif x[1] == 1989: return 13 elif x[1] == 2004: return f1(x)" "def four(items, left, right): if items[4] == 2006: return left if items[4] == 2007: return right def three(items, left, middle, right): if items[3] == 1975: return left if items[3] == 1978: return middle if items[3] == 1990: return right def two(items, left, middle, right): if items[2] == 'CHUCK': return left if items[2] == 'GAMS': return middle if items[2] == 'X10': return right def one(items, left, right): if items[1] == 'AGDA': return left if items[1] == 'ROFF': return right def zero(items, left, right): if items[0] == 1982: return left if items[0] == 1963: return right def main(items): return zero(items, two(items, three(items, four(items, 0, 1), 2, 3), 4, one(items, 5, 6)), one(items, 7, three(items, 8, 9, 10)))" "def three(items, left, right): if items[3] == 2013: return left if items[3] == 1982: return right def one(items, left, right): if items[1] == 'ATS': return left if items[1] == 'MIRAH': return right def zero(items, left, middle, right): if items[0] == 2017: return left if items[0] == 2008: return middle if items[0] == 1968: return right def two(items, left, right): if items[2] == 1990: return left if items[2] == 1968: return right def four(items, left, middle, right): if items[4] == 'TEX': return left if items[4] == 'OPAL': return middle if items[4] == 'CUDA': return right def main(items): return four(items, two(items, one(items, 0, three(items, 1, 2)), zero(items, 3, 4, three(items, 5, 6))), zero(items, 7, one(items, 8, 9), 10), 11)" "def main(res): ans = {0: {'MQL5': {3: {1996: 7, 1977: {2: {'DM': 8, 'EDN': 9, 'NU': 10}}}}, 'NCL': {1: {2015: {3: {1996: 5, 1977: 6}}, 1969: {3: {1996: 3, 1977: 4}}, 2003: {2: {'NU': 2, 'EDN': 1, 'DM': 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "import math def main(x): match x[1]: case 1990: match x[0]: case 'IOKE': return 5 case 'OCAML': return 6 case 'SQL': match x[4]: case 1958: return 0 case 1969: return 1 case 1978: match x[2]: case 1993: return 2 case 1981: return 3 case 2003: return 4 case 2020: return 12 case 1982: match x[0]: case 'SQL': match x[2]: case 1993: return 7 case 1981: return 8 case 2003: return 9 case 'IOKE': return 10 case 'OCAML': return 11" "def choice1(condition, x): if condition == 1991: return x elif condition == 1966: return x + 1 return x + 2 def choice2(condition, x): if condition == 'EJS': return x elif condition == 'GLYPH': return x + 1 return x + 2 def main(x): if x[1] == 'IOKE': if x[0] == 2009: return choice1(x[3], 0) elif x[0] == 1983: return choice1(x[3], 3) else: return 6 elif x[1] == 'CSS': if x[3] == 1991: return 7 elif x[3] == 1966: return choice2(x[2], 8) else: return 11 else: return 12" "def main(x): if x[2] == 'GN': return G2(x) if x[2] == 'SVG': return 6 if x[2] == 'LEX': return G1(x) def G1(x): if x[3] == 'LEX': if x[0] == 2018: return 7 if x[0] == 2007: return 8 if x[3] == 'LLVM': if x[0] == 2018: return 9 if x[0] == 2007: return 10 if x[3] == 'BOO': return 11 def G2(x): if x[1] == 1992: if x[0] == 2018: return 0 if x[0] == 2007: return 1 if x[1] == 1969: return 2 if x[1] == 2009: if x[3] == 'LEX': return 3 if x[3] == 'LLVM': return 4 if x[3] == 'BOO': return 5" "def one(items, left, midle, right): if items[1] == 'BISON': return left if items[1] == 'STATA': return midle if items[1] == 'SVG': return right def zero(items, left, right): if items[0] == 'E': return left if items[0] == 'SAS': return right def two(items, left, midle, right): if items[2] == 1957: return left if items[2] == 1973: return midle if items[2] == 1992: return right def four(items, left, right): if items[4] == 'P4': return left if items[4] == 'PHP': return right def free(items, left, right): if items[3] == 'SLIM': return left if items[3] == 'GLSL': return right def main(items): return four(items, two(items, zero(items, 0, one(items, 1, 2, 3)), 4, one(items, free(items, 5, 6), free(items, 7, 8), 9)), 10)" "def zero(items, left, right): if items[0] == 'OX': return left if items[0] == 'PERL6': return right def three(items, left, midle, right): if items[3] == 1972: return left if items[3] == 1988: return midle if items[3] == 1996: return right def two(items, left, midle, right): if items[2] == 1972: return left if items[2] == 2008: return midle if items[2] == 2007: return right def one(items, left, right): if items[1] == 'HTML': return left if items[1] == 'TEX': return right def main(items): return three(items, two(items, one(items, 0, 1), zero(items, 2, 3), zero(items, 4, 5)), two(items, 6, zero(items, 7, 8), one(items, 9, 10)), 11)" "def main(x): if x[4] == 'SAGE': return x0(x) elif x[4] == 'VHDL': return x2(x) elif x[4] == 'TXL': return 10 def x0(x): if x[0] == 1965: return x1(x) elif x[0] == 1972: return 4 def x1(x): if x[1] == 1993: return x2d(x) if x[1] == 2011: return 2 if x[1] == 2006: return 3 def x2d(x): if x[2] == 1989: return 0 if x[2] == 1967: return 1 def x2(x): if x[2] == 1989: return x1d(x) if x[2] == 1967: return 9 def x1d(x): if x[1] == 1993: return x3d(x) if x[1] == 2011: return 7 if x[1] == 2006: return 8 def x3d(x): if x[3] == 1972: return 5 if x[2] == 1996: return 6" "def three(items, left, middle, right): if items[3] == 2004: return left if items[3] == 1975: return middle if items[3] == 1967: return right def two(items, left, middle, right): if items[2] == 'ELM': return left if items[2] == 'QML': return middle if items[2] == 'PHP': return 6 def zero(items, left, right): if items[0] == 'GN': return 7 if items[0] == 'M4': return right def one(items, left, middle, right): if items[1] == 'JSON5': return left if items[1] == 'NESC': return middle if items[1] == 'HAML': return 11 def main(items): return one(items, two(items, three(items, 0, 1, 2), three(items, 3, 4, 5), 6), zero(items, 7, three(items, 8, 9, 10)), 11)" "def main(res): ans = {1: {1972: 9, 1999: {3: {'URWEB': {0: {1964: 5, 2002: 4}}, 'SCSS': 6, 'MAKO': {0: {2002: 7, 1964: 8}}}}, 1987: {0: {1964: 3, 2002: {2: {2006: 2, 2010: 1, 2011: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def zero(arr, left, r): if arr[0] == 'AGDA': return left else: return r def one(arr, left, r): if arr[1] == 1959: return left else: return r def two(arr, left, c, r): if arr[2] == 'PUG': return left elif arr[2] == 'XBASE': return c else: return r def three(arr, left, r): if arr[3] == 2001: return left else: return r def four(arr, left, c, r): if arr[4] == 'GAP': return left elif arr[4] == 'FISH': return c else: return r def main(arr): return zero(arr, one(arr, 10, 9), two(arr, one(arr, 8, four(arr, 7, 6, 5)), 4, three(arr, 3, four(arr, 2, 1, 0))))" "def three(items, left, middle, right): if items[3] == 'JSON': return left if items[3] == 'ASN.1': return middle if items[3] == 'XPROC': return right def two(items, left, right): if items[2] == 1991: return left if items[2] == 2015: return right def one(items, left, middle, right): if items[1] == 2004: return left if items[1] == 1974: return middle if items[1] == 2012: return right def main(items): return two(items, one(items, three(items, 0, 1, 2), 3, 4), three(items, one(items, 5, 6, 7), one(items, 8, 9, 10), 11))" "def main(main): match main[0]: case 1973: match main[3]: case 'ECL': match main[2]: case 1990: return 0 case 1974: return 1 case 2018: return 2 case 'ORG': match main[2]: case 1990: return 3 case 1974: return 4 case 2018: return 5 case 1984: match main[2]: case 1990: match main[3]: case 'ECL': return 6 case 'ORG': return 7 case 1974: return 8 case 2018: match main[1]: case 2015: return 9 case 1989: return 10 case 1961: return 11" "def zero(items, left, middle, right): if items[0] == 2011: return left if items[0] == 1998: return middle if items[0] == 1984: return right def one(items, left, right): if items[1] == 1966: return left if items[1] == 2018: return right def two(items, left, middle, right): if items[2] == 'DIFF': return left if items[2] == 'SWIFT': return middle if items[2] == 'BRO': return right def three(items, left, middle, right): if items[3] == 'RUST': return left if items[3] == 'CSS': return middle if items[3] == 'LATTE': return right def four(items, left, middle, right): if items[4] == 2012: return left if items[4] == 1976: return middle if items[4] == 1983: return right def main(items): return three(items, one(items, zero(items, 0, four(items, 1, 2, 3), 4), 5), two(items, zero(items, one(items, 6, 7), one(items, 8, 9), 10), 11, 12), 13)" "def main(x): if x[4] == 1981: if x[2] == 'C': return {x[1] == 1983: 0, x[1] == 1986: [1977, 2012, 1969].index(x[3]) + 1}[True] elif x[2] == 'PIC': return {x[3] == 1977: 4, x[3] == 2012: [1983, 1986].index(x[1]) + 5, x[3] == 1969: 7}[True] elif x[2] == 'ROFF': return {x[0] == 'PUG': [1983, 1986].index(x[1]) + 8, x[0] == 'NSIS': 10}[True] elif x[4] == 2000: return 11 elif x[4] == 1965: return 12" "def main(res): ans = {0: {'ROFF': 10, 'XML': {2: {1999: {3: {'VOLT': 9, 'TERRA': 8, 'ELM': 7}}, 1997: {3: {'VOLT': 6, 'TERRA': 5, 'ELM': 4}}}}, 'MESON': {3: {'VOLT': 3, 'TERRA': 2, 'ELM': {2: {1999: 1, 1997: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def one(items, left, right): if items[1] == 'PLSQL': return left if items[1] == 'SVG': return right def two(items, left, middle, right): if items[2] == 2014: return left if items[2] == 1991: return middle if items[2] == 2009: return right def three(items, left, middle, right): if items[3] == 'ANTLR': return left if items[3] == 'PLSQL': return middle if items[3] == 'WISP': return right def four(items, left, right): if items[4] == 'ZIMPL': return left if items[4] == 'LIMBO': return right def main(items): return four(items, three(items, two(items, 0, 1, one(items, 2, 3)), one(items, 4, two(items, 5, 6, 7)), two(items, 8, one(items, 9, 10), 11)), 12)" "def zero(items, left, right): if items[0] == 1997: return left if items[0] == 1994: return right def one(items, left, middle, right): if items[1] == 2017: return left if items[1] == 2015: return middle if items[1] == 1964: return right def two(items, left, right): if items[2] == 'MUPAD': return left if items[2] == 'SQL': return right def three(items, left, middle, right): if items[3] == 'SQL': return left if items[3] == 'LATTE': return middle if items[3] == 'J': return right def main(items): return one(items, zero(items, two(items, 0, 1), two(items, 2, 3)), two(items, 4, 5), three(items, two(items, 6, 7), zero(items, 8, 9), 10))" "def zero(items, left, middle, right): if items[0] == 'BISON': return left if items[0] == 'EJS': return middle if items[0] == 'BOO': return right def four(items, left, right): if items[4] == 'QML': return left if items[4] == 'GO': return right def three(items, left, right): if items[3] == 2004: return left if items[3] == 1962: return right def two(items, left, right): if items[2] == 'NIX': return left if items[2] == 'MASK': return right def one(items, left, right): if items[1] == 1994: return left if items[1] == 1958: return right def main(items): return three(items, four(items, one(items, 0, 1), 2), two(items, one(items, 3, four(items, 4, 5)), zero(items, four(items, 6, 7), 8, one(items, 9, 10))))" "def one(items, left, right): if items[1] == 1970: return left if items[1] == 1958: return right def three(items, left, middle, right): if items[3] == 1999: return left if items[3] == 2019: return middle if items[3] == 1973: return right def two(items, left, middle, right): if items[2] == 2004: return left if items[2] == 1985: return middle if items[2] == 1996: return right def zero(items, left, right): if items[0] == 1962: return left if items[0] == 1968: return right def four(items, left, middle, right): if items[4] == 'TEXT': return left if items[4] == 'RED': return middle if items[4] == 'CHUCK': return right def main(items): return four(items, two(items, three(items, 0, 1, one(items, 2, 3)), one(items, three(items, 4, 5, 6), 7), 8), zero(items, 9, 10), 11)" "def main(x): match x[1]: case 1969: match x[2]: case 'HAXE': match x[3]: case 1988: return 0 case 2018: return 1 case 1986: return 2 case 'ABAP': match x[3]: case 1988: return 3 case 2018: return 4 case 1986: return 5 case 1994: match x[0]: case 2015: match x[3]: case 1988: return 6 case 2018: return 7 case 1986: return 8 case 1976: match x[3]: case 1988: return 9 case 2018: return 10 case 1986: return 11 case 1969: return 12 case 1962: return 13" "def zero(items, left, middle, right): if items[0] == 1968: return left if items[0] == 1988: return middle if items[0] == 1980: return right def four(items, left, right): if items[4] == 2016: return left if items[4] == 2003: return right def three(items, left, middle, right): if items[3] == 2018: return left if items[3] == 1961: return middle if items[3] == 2004: return right def two(items, left, middle, right): if items[2] == 2006: return left if items[2] == 2007: return middle if items[2] == 2008: return right def one(items, left, middle, right): if items[1] == 'GDB': return left if items[1] == 'YANG': return middle if items[1] == 'RED': return right def main(items): return two(items, zero(items, three(items, 0, 1, 2), 3, four(items, three(items, 4, 5, 6), one(items, 7, 8, 9))), 10, 11)" "def main(x): if x[4] == 'HTTP': return f2_1(x) if x[4] == 'ASN.1': return 5 if x[4] == 'LFE': return f2_2(x) def f2_1(x): if x[2] == 'FISH': return f0_1(x) if x[2] == 'M4': return 3 if x[2] == 'ORG': return 4 def f2_2(x): if x[2] == 'FISH': return 6 if x[2] == 'M4': return f1_2(x) if x[2] == 'ORG': return 10 def f0_1(x): if x[0] == 2002: return 0 if x[0] == 1993: return f1_1(x) def f1_1(x): if x[1] == 1966: return 1 if x[1] == 1971: return 2 def f1_2(x): if x[1] == 1966: return 7 if x[1] == 1971: return f0_2(x) def f0_2(x): if x[0] == 2002: return 8 if x[0] == 1993: return 9" "s = ({'VHDL', 'C', 1974}, {'VHDL', 'C', 1968}, {'VHDL', 'C', 1966}, {'VHDL', 'GLSL', 'LASSO'}, {'VHDL', 'GLSL', 'TWIG'}, {'VHDL', 'GLSL', 'GDB'}, {'VHDL', 'IOKE'}, {'BISON', 'C'}, {'BISON', 'GLSL'}, {'BISON', 'IOKE', 'LASSO'}, {'BISON', 'IOKE', 'TWIG'}, {'BISON', 'IOKE', 'GDB'}) def main(x): s1 = set(x) mx = [len(i & s1) for i in s] a = [i for (i, j) in enumerate(mx) if j == max(mx)] mn = [len(s[i]) for i in a] return a[mn.index(min(mn))]" "def main(res): ans = {2: {2000: 12, 2006: {0: {1983: {3: {2015: {1: {2019: 7, 2014: 6, 1990: 5}}, 1999: {1: {2019: 10, 2014: 9, 1990: 8}}, 1981: 11}}, 1986: {3: {1981: 4, 1999: {4: {1974: 3, 1987: 2, 1994: 1}}, 2015: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "import math import random import copy tree = {1989: {'IDRIS': {'CLEAN': {2020: 0, 1999: 1, 1997: 2}, 'NINJA': {'JSX': 3, 'FANCY': 4, 'PONY': 5}}, 'SLASH': 6}, 1976: 7, 2001: {'CLEAN': 8, 'NINJA': 9}} def run(tree, key, current): if tree.get(key[current], None) is not None: if type(tree[key[current]]) == int: return tree[key[current]] return run(tree[key[current]], key, current + 1) def main(path): z = math.factorial(len(set(path))) truepath = [] while len(truepath) != z: tr = copy.copy(path) random.shuffle(tr) if tr not in truepath: truepath.append(tr) for i in range(z): a = run(tree, truepath[i], 0) if a is not None: break return a" "s = {'MASK': {'RHTML': {'EQ': {1999: 0, 1970: 1}, 'VCL': 2, 'CMAKE': 3}, 'ARC': {2011: 4, 1969: {1999: 5, 1970: 6}}, 'PAWN': 7}, 'GAP': {2011: {'EQ': 8, 'VCL': 9, 'CMAKE': 10}, 1969: 11}} def main(path): s1 = s[path[3]] if path[3] == 'MASK': s2 = s1[path[4]] if path[4] == 'RHTML': if isinstance(s2[path[0]], int): return s2[path[0]] else: s3 = s2[path[0]] return s3[path[2]] elif path[4] == 'ARC': if isinstance(s2[path[1]], int): return s2[path[1]] else: s3 = s2[path[1]] return s3[path[2]] else: return s2 else: s2 = s1[path[1]] if path[1] == 2011: return s2[path[0]] else: return s2" "def main(x): match x[3]: case 1960: match x[4]: case 2010: return 5 case 1981: match x[1]: case 1980: return 0 case 1976: return 4 case 1971: match x[0]: case 1958: return 1 case 2009: return 2 case 1963: return 3 case 2013: match x[1]: case 1980: return 6 case 1976: return 10 case 1971: match x[2]: case 2012: return 7 case 1989: return 8 case 1965: return 9" "def main(f): return f0(f) def f0(f): if f[0] == 1991: return f03(f) elif f[0] == 2000: return f01(f) elif f[0] == 1961: return f1(f) def f1(f): if f[1] == 'HLSL': return 9 elif f[1] == 'FREGE': return 10 elif f[1] == 'SQL': return 11 def f01(f): if f[1] == 'HLSL': return f3(f) elif f[1] == 'FREGE': return 7 elif f[1] == 'SQL': return 8 def f03(f): if f[3] == 'SELF': return f02(f) elif f[3] == 'PIC': return 2 elif f[3] == 'CSS': return 3 def f02(f): if f[2] == 'EQ': return 0 elif f[2] == 'LOGOS': return 1 def f3(f): if f[3] == 'SELF': return 4 elif f[3] == 'PIC': return 5 elif f[3] == 'CSS': return 6" "def two(items, left, right): if items[2] == 2005: return left if items[2] == 1992: return right def zero(items, left, middle, right): if items[0] == 'MUPAD': return left if items[0] == 'RUBY': return middle if items[0] == 'NU': return right def one(items, left, right): if items[1] == 'KICAD': return left if items[1] == 'X10': return right def three(items, left, middle, right): if items[3] == 'CUDA': return left if items[3] == 'FLUX': return middle if items[3] == 'HAXE': return right def main(items): return three(items, one(items, two(items, 0, 1), 2), 3, zero(items, two(items, 4, 5), one(items, 6, 7), one(items, 8, 9)))" "import math mass = ['2:2018-3:1999-0:GLSL', '2:2018-3:1999-0:DART', '2:2018-3:1977', '2:1957-1:ALLOY-0:GLSL', '2:1957-1:ALLOY-0:DART', '2:1957-1:PONY', '2:1957-1:MINID', '2:1990-0:GLSL', '2:1990-0:DART-3:1999', '2:1990-0:DART-3:1977'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "def main(x): dict3 = {1986: 0, 2013: 1, 2020: 2} dict33 = {1986: 3, 2013: 4, 2020: 5} dict2 = {'COQ': 6, 'OPA': 7} dict333 = {1986: 8, 2013: 9, 2020: 10} dict0 = {'M': dict3[x[3]], 'FLUX': dict33[x[3]]} dict00 = {'M': dict2[x[2]], 'FLUX': dict333[x[3]]} dict1 = {'JFLEX': dict0[x[0]], 'TOML': dict00[x[0]]} return dict1[x[1]]" "import math def first(x, left, right): if x[1] == 'HTTP': return left if x[1] == 'PIC': return right def second(x, left, right): if x[2] == 1999: return left if x[2] == 2000: return right def third(x, left, right): if x[3] == 1965: return left if x[3] == 2013: return right def main(x): if x[0] == 2007: return first(x, second(x, 0, 1), second(x, 2, 3)) if x[0] == 1971: return third(x, second(x, 4, 5), first(x, 6, 7)) if x[0] == 1976: return third(x, 8, 9)" "def main(x): dict0 = {'PHP': 0, 'PERL': 1, 'GAMS': 2} dict00 = {'PHP': 3, 'PERL': 4, 'GAMS': 5} dict2 = {'GAMS': 6, 'IDRIS': 7, 'TEXT': 8} dict4 = {1969: dict0[x[0]], 1976: dict00[x[0]]} dict44 = {1969: dict2[x[2]], 1976: 9} dict3 = {1975: dict4[x[4]], 1991: dict44[x[4]], 1957: 10} dict1 = {2006: dict3[x[3]], 1979: 11} return dict1[x[1]]" "def one(items, left, right): if items[1] == 1991: return left if items[1] == 1977: return right def two(items, left, middle, right): if items[2] == 'KIT': return left if items[2] == 'FORTH': return middle if items[2] == 'TXL': return right def three(items, left, middle, right): if items[3] == 1990: return left if items[3] == 2006: return middle if items[3] == 2005: return right def zero(items, left, right): if items[0] == 'COQ': return left if items[0] == 'ASP': return right def four(items, left, right): if items[4] == 'CSV': return left if items[4] == 'POD': return right def main(items): return four(items, zero(items, three(items, 0, 1, 2), three(items, one(items, 3, 4), two(items, 5, 6, 7), two(items, 8, 9, 10))), 11)" "def main(x): dict3 = {1958: 1, 1974: 2, 1976: 3} dict4 = {'SELF': 6, 'PHP': 7, 'SMALI': 8} dict1 = {1992: 0, 1960: dict3[x[3]]} dict11 = {1992: 4, 1960: 5} dict3_up = {1958: dict4[x[4]], 1974: 9, 1976: 10} dict0 = {'GDB': dict1[x[1]], 'GLSL': dict11[x[1]], 'PAWN': dict3_up[x[3]]} dict2 = {'EDN': dict0[x[0]], 'PUG': 11, 'LOGOS': 12} return dict2[x[2]]" "def main(res): ans = {1: {'GN': {2: {2020: 9, 1967: 8}}, 'PIC': {4: {2000: 7, 1979: {0: {'PONY': {3: {1969: 6, 1994: 5, 1991: 4}}, 'CIRRU': {2: {2020: 3, 1967: 2}}, 'CSS': {2: {2020: 1, 1967: 0}}}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def left(x): if x[2] == 'SQLPL': return ll(x) elif x[2] == 'ZIMPL': return lr(x) def ll(x): if x[0] == 'CLEAN': return lll(x) elif x[0] == 'YAML': return llm(x) elif x[0] == 'JSON': return llr(x) def lll(x): if x[1] == 'NESC': return 0 elif x[1] == 'YANG': return 1 elif x[1] == 'EDN': return 2 def llm(x): if x[3] == 2013: return 3 elif x[3] == 1957: return 4 elif x[3] == 1959: return 5 def llr(x): if x[3] == 2013: return 6 elif x[3] == 1957: return 7 elif x[3] == 1959: return 8 def lr(x): if x[1] == 'NESC': return 9 elif x[1] == 'YANG': return 10 elif x[1] == 'EDN': return 11 def main(x): if x[4] == 1975: return left(x) elif x[4] == 2017: return 12 elif x[4] == 1981: return 13" "import math mass = ['4:XOJO-2:2019-1:1968-3:2004', '4:XOJO-2:2019-1:1968-3:1967', '4:XOJO-2:2019-1:1968-3:1977', '4:XOJO-2:2019-1:2018-3:2004', '4:XOJO-2:2019-1:2018-3:1967', '4:XOJO-2:2019-1:2018-3:1977', '4:XOJO-2:1967-1:1968', '4:XOJO-2:1967-1:2018-0:PHP', '4:XOJO-2:1967-1:2018-0:SELF', '4:XOJO-2:1967-1:2018-0:VHDL', '4:HTTP', '4:XS'] def main(x): res = 0 for i in mass: massIndex = i.split('-') isAllow = True for k in massIndex: massIndexData = k.split(':') if str(x[int(massIndexData[0])]) != massIndexData[1]: isAllow = False if isAllow: return res res += 1" "s = ({2020, 1973, 'MINID'}, {2020, 1973, 'ASP', 'TWIG'}, {2020, 1973, 'ASP', 'PLSQL'}, {2020, 1973, 'TCL'}, {2020, 1994}, {2020, 1959, 'MINID'}, {2020, 1959, 'ASP'}, {2020, 1959, 'TCL'}, {1987, 'TWIG'}, {1987, 'PLSQL'}, {1977}) def main(r): s1 = set(r) return [i for i in range(len(s)) if not len(s[i] - s1)][0]" "def zero(items, left, middle, right): if items[0] == 1989: return left if items[0] == 2007: return middle if items[0] == 2020: return right def one(items, left, middle, right): if items[1] == 'ZIMPL': return left if items[1] == 'ROFF': return middle if items[1] == 'RAGEL': return right def two(items, left, right): if items[2] == 1981: return left if items[2] == 1971: return right def three(items, left, right): if items[3] == 1977: return left if items[3] == 1961: return right def four(items, left, middle, right): if items[4] == 'RUBY': return left if items[4] == 'EDN': return middle if items[4] == 'ECL': return right def main(items): return zero(items, two(items, three(items, 0, one(items, 1, 2, 3)), one(items, four(items, 4, 5, 6), 7, 8)), three(items, four(items, 9, 10, 11), 12), 13)" "def ri(x): if x[3] == 'PHP': return 6 elif x[3] == 'XS': return 7 elif x[3] == 'SAS': return [1971, 1994, 2002].index(x[0]) + 8 def main(x): if x[4] == 2008: if x[1] == 'SAS': return 5 elif x[1] == 'MAX': if x[3] == 'PHP': return 0 elif x[3] == 'SAS': return 4 elif x[3] == 'XS': return [1971, 1994, 2002].index(x[0]) + 1 elif x[4] == 1973: return ri(x) elif x[4] == 2020: return 11" "def main(x): if x[3] == 'RED': return 13 elif x[3] == 'EDN': return 12 elif x[3] == 'GAMS': return A1(x) def A1(x): if x[1] == 2018: return A3(x) elif x[1] == 2002: return A2(x) def A2(x): if x[0] == 'VHDL': return 11 elif x[0] == 'ROUGE': return 10 elif x[0] == 'PIC': return A4(x) def A3(x): if x[2] == 2008: return A6(x) elif x[2] == 1995: return A5(x) elif x[2] == 1964: return A7(x) def A4(x): if x[4] == 'BISON': return 8 elif x[4] == 'SLASH': return 9 def A5(x): if x[4] == 'BISON': return 6 elif x[4] == 'SLASH': return 7 def A6(x): if x[0] == 'VHDL': return 5 elif x[0] == 'ROUGE': return 4 elif x[0] == 'PIC': return 3 def A7(x): if x[0] == 'VHDL': return 2 elif x[0] == 'ROUGE': return 1 elif x[0] == 'PIC': return 0" "def main(x): dict1 = {1971: 0, 2016: 1, 1992: 2} dict2 = {1971: 3, 2016: 4, 1992: 5} dict3 = {1971: 6, 2016: 7, 1992: 8} if x[0] == 2020: if x[2] == 'LFE': return dict1.get(x[1]) elif x[2] == 'EDN': return dict2.get(x[1]) elif x[0] == 2000: return dict3.get(x[1]) elif x[0] == 1984: if x[3] == 'IDL': return 9 elif x[3] == 'SQLPL': return 10" "def four(items, left, right): if items[4] == 1970: return left if items[4] == 2016: return right def three(items, left, right): if items[3] == 'LASSO': return left if items[3] == 'QMAKE': return right def one(items, left, right): if items[1] == 'RUBY': return left if items[1] == 'EJS': return right def zero(items, left, right): if items[0] == 'NU': return left if items[0] == 'HTML': return right def two(items, left, middle, right): if items[2] == 'REBOL': return left if items[2] == 'OPAL': return middle if items[2] == 'COOL': return right def main(items): return two(items, one(items, three(items, 0, four(items, 1, 2)), four(items, three(items, 3, 4), 5)), zero(items, three(items, 6, one(items, 7, 8)), four(items, 9, 10)), 11)" "def main(x): list1 = {'WISP': 0, 'YAML': 1, 'SVG': 2} list2 = {1997: 0, 2020: 1, 1974: 2} list3 = {'WISP': 6, 'SVG': 10} list4 = {'TOML': 11, 'SQL': 12} if x[4] == 'YAML': if x[0] == 1997: if x[3] == 'MQL4': return list1[x[2]] else: return 3 if x[0] == 2020: return 4 else: return 5 if x[4] == 'TOML': if x[1] == 'JAVA': if x[2] == 'YAML': return list2[x[0]] return list3[x[2]] return list4[x[1]] else: return 13" "def zero(items, left, right): if items[0] == 'ABAP': return left if items[0] == 'NINJA': return right def four(items, left, right): if items[4] == 1998: return left if items[4] == 1964: return right def three(items, left, right): if items[3] == 'UNO': return left if items[3] == 'POD': return right def two(items, left, middle, right): if items[2] == 1979: return left if items[2] == 1970: return middle if items[2] == 1992: return right def one(items, left, right): if items[1] == 2000: return left if items[1] == 1970: return right def main(items): return two(items, three(items, one(items, four(items, 0, 1), four(items, 2, 3)), four(items, zero(items, 4, 5), zero(items, 6, 7))), four(items, zero(items, one(items, 8, 9), 10), 11), 12)" "def two(items, left, middle, right): if items[2] == 'CMAKE': return left if items[2] == 'TERRA': return middle if items[2] == 'SAGE': return right def three(items, left, right): if items[3] == 2006: return left if items[3] == 1978: return right def one(items, left, middle, right): if items[1] == 'ZIMPL': return left if items[1] == 'ANTLR': return middle if items[1] == 'ATS': return right def zero(items, left, right): if items[0] == 'ZIMPL': return left if items[0] == 'CSON': return right def four(items, left, middle, right): if items[4] == 'TOML': return left if items[4] == 'MAKO': return middle if items[4] == 'VALA': return right def main(items): return three(items, zero(items, four(items, 0, 1, 2), 3), four(items, zero(items, 4, two(items, 5, 6, 7)), one(items, 8, zero(items, 9, 10), 11), 12))" "def zero(items, left, right): if items[0] == 1972: return left if items[0] == 1982: return right def one(items, left, middle, right): if items[1] == 2005: return left if items[1] == 1961: return middle if items[1] == 1958: return right def two(items, left, middle, right): if items[2] == 1963: return left if items[2] == 1988: return middle if items[2] == 1995: return right def three(items, left, right): if items[3] == 'HLSL': return left if items[3] == 'CLIPS': return right def four(items, left, right): if items[4] == 'COBOL': return left if items[4] == 'CLICK': return right def main(items): return three(items, four(items, one(items, zero(items, 0, 1), 2, 3), 4), one(items, 5, four(items, two(items, 6, 7, 8), 9), 10))" "def x0(Items): if Items[0] == 'R': return 0 if Items[0] == 'NESC': return 1 if Items[0] == 'DYLAN': return 2 def x0a(Items): if Items[0] == 'R': return 3 if Items[0] == 'NESC': return 4 if Items[0] == 'DYLAN': return 5 def x0b(Items): if Items[0] == 'R': return x1(Items) if Items[0] == 'NESC': return 10 if Items[0] == 'DYLAN': return 11 def x1(Items): if Items[1] == 'XBASE': return 7 if Items[1] == 'CIRRU': return 8 if Items[1] == 'WISP': return 9 def x1a(Items): if Items[1] == 'XBASE': return x0(Items) if Items[1] == 'CIRRU': return x0a(Items) if Items[1] == 'WISP': return 6 def x2(Items): if Items[2] == 2008: return x1a(Items) if Items[2] == 1963: return x0b(Items) def main(items): return x2(items)" "def choicex3(cond, x): if cond == 1985: return x return x + 1 def choicex4(cond, x): if cond == 1991: return x return x + 1 def main(x): if x[0] == 'TWIG': if x[1] == 'E': if x[4] == 2020: return choicex3(x[3], 1) return 0 elif x[1] == 'DART': if x[2] == 1990: return choicex4(x[4], 3) elif x[2] == 1967: return choicex4(x[4], 5) return choicex4(x[4], 7) return 9 elif x[0] == 'GOLO': return 10 return 11" "def f(x): match x[0]: case 'GENIE': return 8 case 'MTML': return 9 case 'GLYPH': match x[3]: case 1992: match x[1]: case 'RDOC': return 0 case 'SMALI': return 1 case 'BLADE': return 2 pass case 2015: match x[2]: case 'UNO': return 3 case 'CMAKE': return 4 case 1973: match x[1]: case 'RDOC': return 5 case 'SMALI': return 6 case 'BLADE': return 7 def main(*args): return f(*args)" "def zero(items, left, middle, right): if items[0] == 2017: return left if items[0] == 1995: return middle if items[0] == 1979: return right def three(items, left, right): if items[3] == 'HACK': return left if items[3] == 'STAN': return right def two(items, left, middle, right): if items[2] == 'GAMS': return left if items[2] == 'ABNF': return middle if items[2] == 'CIRRU': return right def one(items, left, right): if items[1] == 1988: return left if items[1] == 2004: return right def main(items): return three(items, two(items, one(items, 0, 1), 2, zero(items, 3, 4, 5)), two(items, 6, zero(items, 7, 8, 9), 10))" "def main(mass): matrix = [[0, 'SVG', 1961, 0, 2004], [0, 'STON', 1961, 'M4', 2004], [0, 'STON', 1961, 'VHDL', 2004], [0, 'STON', 1961, 'TEX', 2004], [0, 0, 1961, 0, 1989], [0, 'SVG', 1961, 'M4', 1983], [0, 'STON', 1961, 'M4', 1983], ['NIT', 0, 1961, 'VHDL', 1983], ['LIMBO', 0, 1961, 'VHDL', 1983], [0, 0, 1961, 'TEX', 1983], [0, 0, 1981, 0, 0]] for i in range(0, 12): a = 0 for j in range(0, 5): if mass[j] == matrix[i][j] or matrix[i][j] == 0: a = a + 1 if a == 5: return i" "def main(x): ans = {2014: {'SAS': {2016: 0, 1959: 1, 2007: 2}, 'IDRIS': {2016: 3, 1959: 4, 2007: 5}, 'RAML': {2016: 6, 1959: 7, 2007: 8}}, 2009: {'SAS': 9, 'IDRIS': 10, 'RAML': 11}} i = ans while type(i) != int: for j in range(len(x)): if x[j] in i.keys(): i = i[x[j]] x[j] = None break return i" "def first(s): if 1982 in s: return 0 elif 1965 in s: return 1 elif 2003 in s: return 2 def second(s): if 'GO' in s: return 3 if 'QML' in s: return 4 def third(s): if 1987 in s: return 6 elif 1982 in s: return 7 def fourth(s): if 1987 in s: return 8 elif 1982 in s: return 9 def sec_first(s): if 1987 in s: return first(s) elif 1982 in s: return second(s) def sec_sec(s): if 2003 in s: return fourth(s) elif 1965 in s: return third(s) elif 1982 in s: return 5 def third_first(s): if 'COQ' in s: return sec_first(s) elif 'EDN' in s: return sec_sec(s) def main(s): if 'DART' in s: return third_first(s) elif 'IOKE' in s: return 10" "def main(x): match x[0]: case 'BLADE': return 9 case 'YACC': match x[2]: case 'HYPHY': match x[4]: case 1965: return 0 case 2009: return 1 case 'SWIFT': match x[3]: case 1971: match x[4]: case 1965: return 3 case 2009: return 4 case 1994: return 5 case 1978: match x[1]: case 1970: return 6 case 1957: return 7 case 2001: return 8 case 'E': return 2" "def main(x): if x[2] == 'YACC': return x4(x) else: return 10 def x4(x): if x[4] == 'JSX': return xd1(x) elif x[4] == 'AGDA': return x0(x) else: return xu3(x) def xd1(x): if x[1] == 'YANG': return 8 else: return 9 def x0(x): if x[0] == 'LESS': return xd3(x) elif x[0] == 'TEXT': return xm1(x) else: return xu1(x) def xd3(x): if x[3] == 'SMT': return 6 else: return 7 def xm1(x): if x[1] == 'YANG': return 4 else: return 5 def xu1(x): if x[1] == 'YANG': return 2 else: return 3 def xu3(x): if x[3] == 'SMT': return 0 else: return 1" "def zero(items, left, middle, right): if items[0] == 'TLA': return left if items[0] == 'CSON': return middle if items[0] == 'R': return right def four(items, left, middle, right): if items[4] == 1990: return left if items[4] == 2000: return middle if items[4] == 2012: return right def three(items, left, middle, right): if items[3] == 'GO': return left if items[3] == 'APEX': return middle if items[3] == 'LATTE': return right def two(items, left, middle, right): if items[2] == 2013: return left if items[2] == 2011: return middle if items[2] == 1967: return right def one(items, left, middle, right): if items[1] == 'MIRAH': return left if items[1] == 'ROFF': return middle if items[1] == 'OZ': return right def main(items): return three(items, four(items, two(items, zero(items, 0, 1, 2), one(items, 3, 4, 5), 6), 7, two(items, 8, 9, 10)), 11, 12)" "def main(x): x1a = {1969: 0, 2008: 1} x3a = {'NL': 2, 'HYPHY': 3} x1b = {1969: 4, 2008: 5} x0a = {'POD': x1a[x[1]], 'OX': x3a[x[3]], 'SELF': x1b[x[1]]} x3b = {'NL': 6, 'HYPHY': 7} x0b = {'POD': x3b[x[3]], 'OX': 8, 'SELF': 9} x2 = {2002: x0a[x[0]], 1990: x0b[x[0]]} return x2[x[2]]" "def zero(items, left, right): if items[0] == 'MUPAD': return left if items[0] == 'JSX': return right def four(items, left, middle, right): if items[4] == 1999: return left if items[4] == 2017: return middle if items[4] == 1989: return right def three(items, left, middle, right): if items[3] == 'STON': return left if items[3] == 'NINJA': return middle if items[3] == 'XBASE': return right def two(items, left, right): if items[2] == 'INI': return left if items[2] == 'CSV': return right def one(items, left, middle, right): if items[1] == 1997: return left if items[1] == 2003: return middle if items[1] == 1974: return right def main(items): return one(items, two(items, three(items, 0, 1, 2), three(items, 3, 4, 5)), three(items, zero(items, 6, 7), 8, 9), 10)" "from typing import List tree = {'HLSL': {'ARC': {'1978': {'R': 0, 'EC': 1}, '2010': {'R': 2, 'EC': 3}}, 'FREGE': {'1978': {'R': 4, 'EC': 5}, '2010': 6}, 'TOML': {'1989': 7, '1991': {'R': 8, 'EC': 9}, '1998': 10}}, 'SASS': 11} def main(arr: List) -> int: global tree step = tree while True: for item in arr[::-1]: key = str(item) if key in step.keys(): step = step[key] if isinstance(step, int): return step" "def zero(items, left, middle, right): if items[0] == 1968: return left if items[0] == 1966: return middle if items[0] == 1971: return right def three(items, left, middle, right): if items[3] == 1997: return left if items[3] == 1989: return middle if items[3] == 1998: return right def two(items, left, middle, right): if items[2] == 'SCALA': return left if items[2] == 'TEXT': return middle if items[2] == 'MESON': return right def one(items, left, middle, right): if items[1] == 'DART': return left if items[1] == 'ABNF': return middle if items[1] == 'NCL': return right def main(items): return two(items, zero(items, one(items, 0, 1, 2), three(items, 3, 4, 5), three(items, 6, 7, 8)), 9, 10)" "def main(x): def dva(x): if x[4] == 1964: return tri(x) elif x[4] == 1967: return 9 elif x[4] == 1988: return 10 def tri(x): if x[2] == 2020: return chatire(x) elif x[2] == 1960: return 7 elif x[2] == 1970: return 8 def chatire(x): if x[0] == 1977: if x[3] == 'GOLO': return 0 elif x[3] == 'LIMBO': return 1 elif x[3] == 'MESON': return 2 elif x[0] == 1974: return 3 elif x[0] == 2013: if x[3] == 'GOLO': return 4 elif x[3] == 'LIMBO': return 5 elif x[3] == 'MESON': return 6 if x[4] == 1964: return dva(x) elif x[4] == 1967: return 9 elif x[4] == 1988: return 10" "def three(items, left, right): if items[3] == 'STATA': return left if items[3] == 'ROFF': return right def one(items, left, right): if items[1] == 2020: return left if items[1] == 2014: return right def two(items, left, middle, right): if items[2] == 1958: return left if items[2] == 1998: return middle if items[2] == 1982: return right def zero(items, left, middle, right): if items[0] == 'VUE': return left if items[0] == 'J': return middle if items[0] == 'JFLEX': return right def main(items): return zero(items, two(items, three(items, 0, 1), one(items, 2, 3), one(items, 4, 5)), one(items, 6, two(items, 7, 8, 9)), 10)" "def main(x): dict2 = {2001: 0, 1973: 1} dict3 = {'PAWN': 2, 'ANTLR': 3, 'CMAKE': 4} dict1 = {2011: 8, 1998: 9, 1997: 10} dict1_up = {2011: dict2[x[2]], 1998: dict3[x[3]], 1997: 5} dict3_up = {'PAWN': 6, 'ANTLR': 7, 'CMAKE': dict1[x[1]]} dict0 = {'FISH': dict1_up[x[1]], 'E': dict3_up[x[3]], 'HTML': 11} return dict0[x[0]]" "def main(args): d1 = {'PONY': 0, 'METAL': 1, 'OZ': 2} dic0 = {'OZ': 3, 'YAML': 4, 'SELF': 5} d00 = {'OZ': 6, 'YAML': 7, 'SELF': 8} dict3 = {'NGINX': 9, 'TLA': 10, 'ADA': 11} dict33 = {'NGINX': d1[args[1]], 'TLA': dic0[args[0]], 'ADA': d00[args[0]]} dict000 = {'OZ': dict3[args[3]], 'YAML': 12, 'SELF': 13} dict2 = {'YAML': dict33[args[3]], 'HTML': dict000[args[0]]} return dict2[args[2]]" "def main(x): d = {'XS': {'KRL': {1975: 0, 1990: 1, 1992: {1957: 2, 1984: 3}}, 'PIC': 4}, 'FREGE': {1975: 5, 1990: {'KRL': 6, 'PIC': {2011: 7, 2018: 8}}, 1992: 9}, 'CLEAN': 10} if type(d[x[1]]) == int: return d[x[1]] if x[1] == 'FREGE': if type(d[x[1]][x[0]]) == int: return d[x[1]][x[0]] elif x[0] == 1990: if x[2] == 'PIC': return d[x[1]][x[0]][x[2]][x[3]] else: return d[x[1]][x[0]][x[2]] elif x[1] == 'XS': if type(d[x[1]][x[2]]) == int: return d[x[1]][x[2]] elif x[2] == 'KRL': if x[0] == 1992: return d[x[1]][x[2]][x[0]][x[4]] else: return d[x[1]][x[2]][x[0]]" "def zero(items, left, right): if items[0] == 'IDRIS': return left if items[0] == 'RUBY': return right def four(items, left, middle, right): if items[4] == 2007: return left if items[4] == 2000: return middle if items[4] == 1988: return right def three(items, left, middle, right): if items[3] == 2000: return left if items[3] == 2014: return middle if items[3] == 1969: return right def two(items, left, middle, right): if items[2] == 'YACC': return left if items[2] == 'HLSL': return middle if items[2] == 'LATTE': return right def one(items, left, middle, right): if items[1] == 'MTML': return left if items[1] == 'NCL': return middle if items[1] == 'GAMS': return right def main(items): return three(items, zero(items, four(items, 0, two(items, 1, 2, 3), two(items, 4, 5, 6)), 7), two(items, 8, one(items, 9, 10, 11), 12), 13)" "def main(tree): level4 = [1977, 1984, 2019] level3 = ['ASN.1', 'HAXE', 'IDL'] level2 = ['HAXE', 'PERL6'] level1 = [1969, 2008] level0 = [1962, 2002] index4 = level4.index(tree[4]) index3 = level3.index(tree[3]) index2 = level2.index(tree[2]) index1 = level1.index(tree[1]) index0 = level0.index(tree[0]) if tree[1] == 2008: return 11 elif tree[0] == 1962: return index2 * 3 + index4 elif tree[0] == 2002 and tree[3] == 'ASN.1': return 6 elif tree[0] == 2002 and tree[3] == 'HAXE': return 6 + index3 + index2 elif tree[0] == 2002 and tree[3] == 'IDL': return 9 + index2" "def main(x): dict1 = {1994: 0, 1993: 1} dict2 = {1994: 2, 1993: 3} dict3 = {2020: 4, 2001: 5} dict4 = {2020: 8, 2001: 9} if x[2] == 'SCAML': if x[1] == 1971: if x[4] == 2020: return dict1.get(x[3]) else: return dict2.get(x[3]) elif x[3] == 1994: return dict3.get(x[4]) else: return 6 elif x[2] == 'NIT': if x[0] == 1993: return 7 elif x[3] == 1994: return dict4.get(x[4]) else: return 10" "def main(x): x0 = {'IO': 0, 'ALLOY': 1, 'HTTP': 2} x0_1 = {'IO': 3, 'ALLOY': 4, 'HTTP': 5} x0_2 = {'IO': 7, 'ALLOY': 8, 'HTTP': 9} x3 = {1973: x0[x[0]], 1962: x0_1[x[0]], 2020: 6} x2 = {1970: x0_2[x[0]], 1960: 10, 1965: 11} x1 = {'CSON': x3[x[3]], 'TERRA': x2[x[2]]} return x1[x[1]]" "def four(items, left, middle, right): if items[4] == 'HAXE': return left if items[4] == 'CLIPS': return middle if items[4] == 'INI': return right def three(items, left, middle, right): if items[3] == 1968: return left if items[3] == 2006: return middle if items[3] == 1973: return right def two(items, left, middle, right): if items[2] == 1989: return left if items[2] == 1993: return middle if items[2] == 1995: return right def one(items, left, middle, right): if items[1] == 1969: return left if items[1] == 2019: return middle if items[1] == 2008: return right def main(items): return two(items, one(items, four(items, three(items, 0, 1, 2), three(items, 3, 4, 5), 6), three(items, 7, 8, 9), 10), 11, 12)" "def main(x): dict1 = {1961: 0, 1974: 1, 2019: 2} dict2 = {1960: 4, 1973: 5} dict3 = {1964: 6, 1986: 7, 1979: 8} dict4 = {1961: 9, 1974: 10, 2019: 11} if x[3] == 'VUE': if x[1] == 1964: return dict1.get(x[2]) elif x[1] == 1986: return 3 elif x[1] == 1979: return dict2.get(x[0]) elif x[3] == 'CHUCK': if x[0] == 1960: return dict3.get(x[1]) elif x[0] == 1973: return dict4.get(x[2])" "def zero(items, left, right): if items[0] == 'TCSH': return left if items[0] == 'NINJA': return right def one(items, left, middle, right): if items[1] == 'OCAML': return left if items[1] == 'MAX': return middle if items[1] == 'RUST': return right def two(items, left, middle, right): if items[2] == 'ROFF': return left if items[2] == 'KIT': return middle if items[2] == 'TEX': return right def tree(items, left, middle, right): if items[3] == 2002: return left if items[3] == 2019: return middle if items[3] == 1963: return right def main(items): return tree(items, zero(items, two(items, 0, 1, 2), 3), two(items, 4, zero(items, 5, 6), 7), zero(items, 8, one(items, 9, 10, 11)))" "def zero(items, left, right): if items[0] == 1984: return left if items[0] == 2008: return right def one(items, left, middle, right): if items[1] == 'EAGLE': return left if items[1] == 'DYLAN': return middle if items[1] == 'REXX': return right def two(items, left, right): if items[2] == 1995: return left if items[2] == 1997: return right def three(items, left, middle, right): if items[3] == 1985: return left if items[3] == 1984: return middle if items[3] == 1976: return right def four(items, left, right): if items[4] == 1984: return left if items[4] == 1975: return right def main(items): return three(items, four(items, one(items, 0, two(items, 1, 2), two(items, 3, 4)), 5), two(items, zero(items, 6, one(items, 7, 8, 9)), 10), 11)" "def main(res): ans = {1: {1978: 10, 1968: {3: {1982: {0: {1964: 6, 2001: 5, 1980: 4}}, 2011: {2: {2018: 9, 1958: 8, 1973: 7}}}}, 2008: {3: {2011: 3, 1982: {0: {1964: 2, 2001: 1, 1980: 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def main(x): dict1 = {'FANCY': 0, 'GN': 1} dict2 = {'PHP': 2, 'STAN': 3} dict3 = {'PHP': 5, 'STAN': 6} dict4 = {'PHP': 8, 'STAN': 9} if x[1] == 1997: if x[0] == 2012: return dict1.get(x[2]) elif x[0] == 2010: return dict2.get(x[3]) else: return 4 elif x[1] == 1977: if x[0] == 2012: return dict3.get(x[3]) elif x[0] == 2010: return 7 else: return dict4.get(x[3]) else: return 10" "def main(x): dict2 = {'TCSH': 0, 'MASK': 1} dict1 = {'SELF': 5, 'COBOL': 6, 'REXX': 7} dict11 = {'SELF': 8, 'COBOL': 9, 'REXX': 10} dict3 = {2000: dict2[x[2]], 1964: 2, 2017: 3} dict2_up = {'TCSH': dict1[x[1]], 'MASK': dict11[x[1]]} dict4 = {'STATA': dict3[x[3]], 'TERRA': 4, 'VOLT': dict2_up[x[2]]} dict0 = {'CMAKE': dict4[x[4]], 'NINJA': 11, 'IDRIS': 12} return dict0[x[0]]" "def zero(items, left, middle, right): if items[0] == 'P4': return left if items[0] == 'YACC': return middle if items[0] == 'MUF': return right def three(items, left, middle, right): if items[3] == 1963: return left if items[3] == 2017: return middle if items[3] == 2007: return right def two(items, left, right): if items[2] == 2012: return left if items[2] == 1972: return right def one(items, left, right): if items[1] == 'ATS': return left if items[1] == 'CMAKE': return right def main(items): return two(items, one(items, zero(items, 0, 1, 2), three(items, 3, 4, 5)), three(items, one(items, 6, 7), 8, 9))" "def zero(items, left, middle, right): if items[0] == 'TXL': return left if items[0] == 'XPROC': return middle if items[0] == 'EQ': return right def four(items, left, middle, right): if items[4] == 'ORG': return left if items[4] == 'GO': return middle if items[4] == 'NIX': return right def three(items, left, middle, right): if items[3] == 1984: return left if items[3] == 2007: return middle if items[3] == 1968: return right def two(items, left, middle, right): if items[2] == 1980: return left if items[2] == 1994: return middle if items[2] == 1968: return right def one(items, left, middle, right): if items[1] == 'FLUX': return left if items[1] == 'CSS': return middle if items[1] == 'FISH': return right def main(items): return three(items, four(items, one(items, zero(items, 0, 1, 2), two(items, 3, 4, 5), zero(items, 6, 7, 8)), 9, 10), 11, 12)" "def zero(items, left, right): if items[0] == 'HACK': return left if items[0] == 'NIT': return right def four(items, left, right): if items[4] == 'STAN': return left if items[4] == 'TOML': return right def three(items, left, middle, right): if items[3] == 1966: return left if items[3] == 1974: return middle if items[3] == 1988: return right def two(items, left, right): if items[2] == 2007: return left if items[2] == 2018: return right def one(items, left, middle, right): if items[1] == 2005: return left if items[1] == 1983: return middle if items[1] == 2017: return right def main(items): a = two(items, 3, 4) b = two(items, 5, 6) return zero(items, four(items, one(items, three(items, 0, 1, 2), a, b), one(items, two(items, 7, 8), 9, 10)), 11)" "def main(res): ans = {1: {'PAN': {0: {1962: 9, 1982: 10}}, 'XPROC': {2: {'LEAN': 8, 'GO': 7, 'HAXE': {0: {1962: 5, 1982: 6}}}}, 'CSS': {0: {1982: {3: {'FISH': 3, 'DART': 4}}, 1962: {2: {'LEAN': 2, 'GO': 1, 'HAXE': 0}}}}}} while isinstance(ans, dict): Ind = int(*ans) ans = ans[Ind] Key = res[Ind] ans = ans[Key] return ans" "def three(items, left, middle, right): if items[3] == 'OCAML': return left if items[3] == 'RAGEL': return middle if items[3] == 'ALLOY': return right def two(items, left, right): if items[2] == 'OZ': return right if items[2] == 'XOJO': return left def one(items, left, right): if items[1] == 'SCALA': return left if items[1] == 'SQL': return right def zero(items, left, middle, right): if items[0] == 'JSON5': return left if items[0] == 'TEX': return middle if items[0] == 'XBASE': return right def main(items): return one(items, two(items, three(items, 0, 1, 2), three(items, 3, 4, 5)), two(items, zero(items, 6, 7, 8), 9))" "def main(x): match x[4]: case 'GLYPH': match x[2]: case 2017: match x[0]: case 2012: return 0 case 1989: match x[1]: case 2011: return 1 case 1982: return 2 case 2009: match x[3]: case 'ALLOY': return 3 case 'LIMBO': return 4 case 'TOML': return 5 case 2010: match x[0]: case 2012: return 6 case 1989: return 7 case 2009: match x[3]: case 'ALLOY': return 8 case 'LIMBO': return 9 case 'TOML': return 10 case 'VOLT': return 11 case 'VCL': return 12" "def main(x): if x[0] == 'MESON': return f1(x) return 11 def f1(x): if x[1] == 1981: return f2(x) if x[1] == 1995: return 9 return 10 def f2(x): if x[2] == 2015: if x[3] == 'HTTP': return 0 if x[3] == 'EQ': return 1 return 2 elif x[2] == 2004: if x[3] == 'HTTP': return 3 if x[3] == 'EQ': return 4 return 5 else: if x[3] == 'HTTP': return 6 if x[3] == 'EQ': return 7 return 8" "def f_3(a, b): if a == 'LESS': return f_2(b) elif a == 'JFLEX': return f_2(b) + 2 elif a == 'CIRRU': return 11 def f_2(b): if b == 1990: return 7 if b == 1962: return 8 def f_1(a): if a == 'LESS': return 0 if a == 'JFLEX': return 1 if a == 'CIRRU': return 2 def f_0(a): if a == 1987: return 3 if a == 1988: return 4 if a == 1991: return 5 def main(x): if x[1] == 'ALLOY': return 6 elif x[1] == 'SQF': return f_3(x[3], x[2]) elif (x[1] == 'SHEN') & (x[2] == 1990): return f_1(x[3]) elif (x[1] == 'SHEN') & (x[2] == 1962): return f_0(x[0])" "def choicex3(cond, x): if cond == 2013: return x return x + 1 def choicex4(cond, x): if cond == 'CSS': return x elif cond == 'IOKE': return x + 1 return x + 2 def scam(x): if x[0] == 1980: if x[1] == 2002: return choicex4(x[4], 6) elif x[1] == 1960: return 9 return 10 elif x[0] == 1997: return 11 return 12 def main(x): if x[2] == 1958: if x[4] == 'CSS': if x[0] == 1980: return choicex3(x[3], 0) elif x[0] == 1997: return 2 return 3 elif x[4] == 'IOKE': return 4 return 5 elif x[2] == 1971: return scam(x) return 13" "def css(x): if x[3] == 1985: if x[1] == 1990: return 0 else: return 1 elif x[3] == 1960: if x[1] == 1990: return 2 else: return 3 elif x[1] == 1990: return 4 else: return 5 def main(x): if x[2] == 'SHELL': if x[0] == 1964: if x[3] == 1985: return 6 elif x[3] == 1960: return 7 else: return 8 elif x[1] == 1990: return 9 else: return 10 else: return css(x)" "def main(x): match x[1]: case 2004: match x[4]: case 1999: match x[3]: case 'XPROC': return 0 case 'OPA': match x[2]: case 'RUST': return 1 case 'EQ': return 2 case 1978: return 3 case 2002: match x[0]: case 'ASN.1': return 4 case 'R': return 5 case 'GDB': match x[2]: case 'RUST': return 6 case 'EQ': return 7 case 1983: return 8 case 1964: return 9" "def main(x): match x[4]: case 'DIFF': match x[0]: case 1961: match x[2]: case 2006: match x[1]: case 'ARC': return 0 case 'NINJA': return 1 case 'BLADE': return 2 case 1971: match x[1]: case 'ARC': return 3 case 'NINJA': return 4 case 'BLADE': return 5 case 1963: match x[1]: case 'ARC': return 6 case 'NINJA': return 7 case 'BLADE': return 8 case 2005: match x[1]: case 'ARC': match x[3]: case 1983: return 9 case 1962: return 10 case 'NINJA': return 11 case 'BLADE': return 12 case 'ALLOY': return 13 case 'D': return 14" "def zero(items, left, middle, right): if items[0] == 'TOML': return left if items[0] == 'SCSS': return middle if items[0] == 'HY': return right def three(items, left, middle, right): if items[3] == 1975: return left if items[3] == 2016: return middle if items[3] == 2008: return right def one(items, left, middle, right): if items[1] == 1972: return left if items[1] == 2012: return middle if items[1] == 2006: return right def main(items): return zero(items, three(items, one(items, 0, 1, 2), one(items, 3, 4, 5), one(items, 6, 7, 8)), 9, 10)" "tree = {'MAKO': {'2004': {'1998': {'GLSL': 0, 'PLSQL': 1, 'GN': 2}, '1993': 3}, '1977': 4}, 'RED': {'1967': 5, '1975': 6, '1972': {'1998': 7, '1993': {'GLSL': 8, 'PLSQL': 9, 'GN': 10}}}, 'HYPHY': 11} def main(lists): global tree val = tree while True: for i in lists[::-1]: key = str(i) if key in val.keys(): val = val[key] if isinstance(val, int): return val" "def main(x): dict3 = {1994: 2, 2017: 3, 1969: 4} dict33 = {1994: 5, 2017: 6, 1969: 7} dict2 = {'UNO': 0, 'ADA': 1} dict4 = {1994: dict3[x[3]], 2019: dict33[x[3]]} dict1 = {'GO': dict2[x[2]], 'XPROC': dict4[x[4]], 'RED': 8} dict2_up = {'UNO': 9, 'ADA': 10} dict0 = {'SASS': dict1[x[1]], 'ZIMPL': dict2_up[x[2]], 'XTEND': 11} return dict0[x[0]]"