problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p03109 | u831328139 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['import sys\n \nv = []\nfor line in sys.stdin:\n v.append([i for i in line.split()])\n \nm = 0\nfor a, b in v[1:]:\n a = float(a)\n if b == "JPY":\n m += a\n else:\n m += 380000.0 * a\nprint(m)', 'import sys\n\nv = ""\nfor line in sys.stdin:\n v = [int(i) for i in line.split("/")]\n\nif v[0] < 2019:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s008031038', 's665888089', 's305931663'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [191, 209, 209] |
p03109 | u835353642 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["s = input()\nprint('Heisei' if S <= '2019/04/30' else 'TBD')", "s = input()\nprint('Heisei' if s <= '2019/04/30' else 'TBD')"] | ['Runtime Error', 'Accepted'] | ['s456687490', 's248828500'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 59] |
p03109 | u838187806 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["def solver():\n\ta = input().rstrip('\\n').split('/')\n\tprint(a)\n\tif int(a[0]) >= 2019:\n\t\tif int(a[1]) >= 4:\n\t\t\tif int(a[2]) >= 30:\n\t\t\t\tprint('TBD')\n\t\t\telse: print('Heisei')\n\t\telse: print('Heisei')\n\telse: print('Heisei')\n\nsolver()", "def solver():\n\ta = input().rstrip('\\n').split('/')\n\ti... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s103397721', 's154609384', 's155281784', 's824167138', 's726951159'] | [2940.0, 2940.0, 2940.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [226, 216, 186, 168, 343] |
p03109 | u838869282 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['y,m,d=map(int, input().split(\'/\'))\nif y>2019:\n\tprint("TBD")\nelif m>4:\n\tprint("TBD")\nelif y>30:\n\tprint("TBD")\nelse:\n\tprint("Heisei")', 'y,m,d=map(int, input().split(\'/\'))\nif y>2019:\n\tprint("TBD")\nelif m>4:\n\tprint("TBD")\nelif d>30:\n\tprint("TBD")\nelse:\n\tprint("Heisei")'] | ['Wrong Answer', 'Accepted'] | ['s263658297', 's558102859'] | [2940.0, 2940.0] | [17.0, 17.0] | [131, 131] |
p03109 | u841994910 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a = input().split()\nif int(a[6]) < 4:\n print("Heise")\nelif int(a[6]) == 4 and int(a[8]) < 3:\n print("Heisei")\nelse:\n print("TBD")', 'a = input().split()\nif a[6] < 4:\n print("Heisei")\nelif a[6] == 4 and a[8] < 3:\n print("Heisei")\nelse:\n print("TBD")', 'a = input().split("/")\nif int(a[1]) < 4:\n pri... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s093328471', 's430819022', 's640656520', 's896869797', 's528596539'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 17.0, 17.0] | [132, 118, 138, 137, 139] |
p03109 | u843318346 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["s = input()\nif s <= '2019/04/30':\n print('Heisei')\nprint('TBD')", "s = input()\nif s <= '2019/04/30':\n print('Heisei')\nelse:\n print('TBD')\n"] | ['Wrong Answer', 'Accepted'] | ['s731249345', 's497658225'] | [2940.0, 2940.0] | [17.0, 17.0] | [64, 73] |
p03109 | u845620905 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input().split(\'/\')\nif(int(s[0]) >= 2020):\n print("TBD")\nelif(int(s[0]) == 2019):\n s[1] = s[1].replace("0", "")\n s[1] = int(s[1])\n if(s[2][0] == "0"):\n s[2] = s[2].replace("0", "")\n s[2] = int(s[2])\n else:\n s[2] = int(s[2])\n if(s[1] > 4):\n print("TBD")\n elif(s[1] == 4):\n if(s... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s668360905', 's958881920', 's880992383'] | [3064.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0] | [416, 469, 72] |
p03109 | u847033024 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["a = input()\nif a[6] > 4:\n print('TBD')\nelif a[6] < 3:\n print('heisei')\nelse:\n if a[8] < 2:\n print('heisei')\n else:\n if a[9] > 0:\n print('heisei')\n else:\n print('TBD')\n ", "a = input()\nif int(a[5]) == 1:\n print('TBD')\nelse:\n if int(a[6]) > 4:\n print('TBD')\n else:\n pr... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s321868109', 's889971362', 's980056147', 's103656254'] | [9040.0, 9160.0, 9040.0, 8904.0] | [23.0, 25.0, 25.0, 25.0] | [191, 116, 273, 71] |
p03109 | u848647227 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a = input()\nif a[5] == "1":\n print("TBD")\nelif int(a[6]) >= 5:\n print("TBD")\nelse:\n print("heisei")', 'a = input()\nif a[5] == "1":\n print("TBD")\nelif int(a[6]) >= 5:\n print("TBD")\nelse:\n print("Heisei")'] | ['Wrong Answer', 'Accepted'] | ['s816896456', 's277656317'] | [2940.0, 2940.0] | [17.0, 18.0] | [102, 102] |
p03109 | u850028278 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['import datetime\ny,m,d = map(int,input().split("/"))\nif datetime.date(2019,4,30) < datetime.date(y,m,d):\n print("TBD")\nelse:\n print("Heisei")\nprint(datetime.date(y,m,d))', 'import datetime\ny,m,d = map(int,input().split("/"))\nif datetime.date(2019,4,30) < datetime.date(y,m,d):\n print("TBD")\nelse:\n ... | ['Wrong Answer', 'Accepted'] | ['s565263558', 's985753271'] | [3312.0, 3316.0] | [19.0, 21.0] | [174, 147] |
p03109 | u852113235 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\nt = \'2019/04/30\'\nif s <= t:\n print("YES")\nelse:\n print("NO")', 's = input()\nt = \'2019/04/30\'\nif s <= t:\n print("Heisei")\nelse:\n print("TBD")'] | ['Wrong Answer', 'Accepted'] | ['s678569957', 's113598337'] | [2940.0, 2940.0] | [16.0, 17.0] | [78, 82] |
p03109 | u860726004 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a', "S = list(map(int, input().split('/')))\nX = [2019, 4, 30]\n\nprint('Heisei') if all([S[i] <= X[i] for i in range(3)]) else print('TBD')\n\n"] | ['Runtime Error', 'Accepted'] | ['s110611122', 's816525565'] | [2940.0, 2940.0] | [18.0, 17.0] | [1, 134] |
p03109 | u865413330 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['def main():\n n = int(input())\n total = 0\n\n for line in range(0, n):\n total += calc(total)\n\n print(total)\n\ndef calc(total):\n x, u = map(str, input().split())\n\n if u == "JPY":\n total += int(x)\n return total\n\n if u == "BTC":\n total += float(x) * 380000\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s193527604', 's815793470', 's746451923'] | [3060.0, 2940.0, 4568.0] | [18.0, 17.0, 35.0] | [360, 305, 212] |
p03109 | u865801295 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["S = input().split('/')\n\nprint(S)\n\nif int(S[0]) > 2019:\n print('TBD')\nelif S[0] == '2019' and S[1] > '05':\n print('TBD')\nelse:\n print('Heisei')", "S = input().split('/')\n\nprint(S)\n\nif int(S[0]) > 2019:\n print('TBD')\nelif S[0] == '2019' and S[1] > '05':\n print('TBD')\nelse:\n print('He... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s168751443', 's373420608', 's831569615'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [151, 151, 83] |
p03109 | u866769581 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a,b,c = map(int,input().split("/"))\nif a >=2019 && b >= 5:\n print(\'TBD\')\nelse:\n print(\'Heisei\')', 'a,b,c = map(int,input().split("/"))\nif a >=2019 and b >= 5:\n print(\'TBD\')\nelse:\n print(\'Heisei\')\n'] | ['Runtime Error', 'Accepted'] | ['s572533573', 's906420236'] | [2940.0, 2940.0] | [17.0, 18.0] | [101, 103] |
p03109 | u868040597 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['#!/usr/bin/python\nimport datetime\n\ndef main():\n S = str(input())\n tdatetime = datetime.datetime.strptime(S, \'%Y/%m/%d\')\n\n if tdatetime.month <= 4:\n print(\'HEISEI\')\n else:\n print(\'TBD\')\n\nif __name__ == "__main__":\n main()', '#!/usr/bin/python\nimport datetime\n\ndef main... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s326846160', 's673229963', 's726258628'] | [4328.0, 4336.0, 4456.0] | [33.0, 32.0, 36.0] | [249, 247, 249] |
p03109 | u874276081 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['date = input().split("/")\n sum = int(date[0]) * 365 + int(date[1]) * 30 + int(date[2])\n\n if 737085 < sum:\n print("TBD")\n else:\n print("Heisei")', 'date = input().split("/")\nsum = int(date[0]) * 365 + int(date[1]) * 30 + int(date[2])\n\nif 737085 < sum:\n print("TBD")\nelse:\n print... | ['Runtime Error', 'Accepted'] | ['s571996884', 's129291083'] | [2940.0, 2940.0] | [17.0, 17.0] | [166, 146] |
p03109 | u877543650 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\nif int(s[:4]) > 2019:\n print("Heisei")\nelif int(s[5:7]) >= 5:\n print("Heisei")\nelse:\n print("TBD")', 's = input()\nif int(s[:4]) > 2019:\n print("TBD")\nelif int(s[5:7]) >= 5:\n print("TBD")\nelse:\n print("Heisei")'] | ['Wrong Answer', 'Accepted'] | ['s803787080', 's754260641'] | [2940.0, 3060.0] | [17.0, 17.0] | [113, 110] |
p03109 | u879870653 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['print("2019/04/30" if input() <= "2019/04/30" else "TBD")', 'print("Heisei" if input() <= "2019/04/30" else "TBD")'] | ['Wrong Answer', 'Accepted'] | ['s554206720', 's064061460'] | [2940.0, 2940.0] | [18.0, 18.0] | [57, 53] |
p03109 | u880891635 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["import datetime\n\nx = input()\n\ny = datetime.date(2019, 4, 30)\nx_date = datetime.date(x.replace('/', ','))\n\nif x_date <= y\n print('Heisei')\nelse\n print('TBD')\n", "import datetime\n\nx = input()\nx_date = datetime.datetime.strptime(x, '%Y/%m/%d')\n\ny = datetime.datetime(2019, 4, 30, 0, 0, 0)\n\nif x_da... | ['Runtime Error', 'Accepted'] | ['s853520687', 's957112008'] | [2940.0, 4312.0] | [16.0, 29.0] | [163, 186] |
p03109 | u882370611 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["s=input()\nif s[5] == '1':\n print('TBD')\nelse:\n if s[6] > 4:\n print('TBD')\n else:\n print('Heisei')", 'S = list(input())\na = int(S[5]+S[6])\n\nif a <= 4:\n ans = "Heisei"\nelse:\n ans = "TBD"\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s013970525', 's508639644'] | [3060.0, 2940.0] | [18.0, 17.0] | [106, 101] |
p03109 | u883203948 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['import datetime\nd1 = input().split("/")\n\ny = int(d1[0])\nm = int(d1[1])\nd = int(d1[2])\n\ndd = datetime.date(y,m,d)\nd2 = datetime.date(2019,4,30)\n\nif dd =< d2:\n print("Heisei")\nelse:\n print("TBD")', 'import datetime\nd1 = input().split("/")\n\ny = int(d1[0])\nm = int(d1[1])\nd = int(d1[2])\n\ndd = datetim... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s459897818', 's594881225', 's773693280'] | [2940.0, 3316.0, 3312.0] | [17.0, 20.0, 19.0] | [195, 194, 195] |
p03109 | u889914341 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['print("Heisei" if input() <= 2019/04/30 else "TBD")', 'print("Heisei" if input() <= "2019/04/30" else "TBD")'] | ['Runtime Error', 'Accepted'] | ['s594929855', 's839003618'] | [2940.0, 2940.0] | [17.0, 17.0] | [51, 53] |
p03109 | u894694822 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a, b, c=map(int, input().split(/))\nif a>=2020:\n print("TBD")\nelif a==2019 and b>=5:\n print("TBD")\nelse:\n print("Heisei")', 'a, b, c=map(int, input().split("/"))\nif a>=2020:\n print("TBD")\nelif a==2019 and b>=5:\n print("TBD")\nelse:\n print("Heisei")\n'] | ['Runtime Error', 'Accepted'] | ['s219554679', 's445253045'] | [2940.0, 2940.0] | [17.0, 17.0] | [123, 126] |
p03109 | u897329068 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['from datetime import datetime\n\nS = input()\n\nnowDate = datetime.strptime(S, \'%Y/%m/%d\')\nlastDate =datetime.strptime(\'2019/04/30\', \'%Y/%m/%d\')\n\nif lastDate < nowTime:\n\tprint("TBD")\nelse:\n\tprint("Heisei")', 'from datetime import datetime\n\nS = input()\n\nnowDate = datetime.strptime(S, \'%Y/%m/%d\')\nl... | ['Runtime Error', 'Accepted'] | ['s699984920', 's170570614'] | [4592.0, 4720.0] | [34.0, 39.0] | [201, 201] |
p03109 | u901122076 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["S = input()\n\ny, m, d = map(int, S.split('/'))\n\nprint(y)\nprint(m)\n\nif y == 2019 and m <= 4:\n print('Heisei')\nelse:\n print('TBD')\n", "S = input()\n\ny, m, d = map(int, S.split('/'))\n\nif y == 2019 and m <= 4:\n print('Heisei')\nelse:\n print('TBD')\n"] | ['Wrong Answer', 'Accepted'] | ['s736895691', 's350630143'] | [2940.0, 2940.0] | [17.0, 17.0] | [134, 115] |
p03109 | u905510147 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a, b, c = input().split("/")\n\nx = b+c\nx = int(x)\nprint(x)\nif x > 430:\n print("TBD")\nelse:\n print("Heisei")\n', 'a, b, c = input().split("/")\n\nx = b+c\nx = int(x)\nif x > 430:\n print("TBD")\nelse:\n print("Heisei")\n'] | ['Wrong Answer', 'Accepted'] | ['s960200421', 's590596070'] | [3060.0, 2940.0] | [19.0, 17.0] | [113, 104] |
p03109 | u910158862 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['import datetime\ntarget = datetime.datetime(2019,4,30)\ny,m,d = map(int,input().split("/"))\nindata = datetime.datetime(y,m,d)\nif indata <= target:\n print("Heisai")\nelse:\n print("TBD")\n', 'import datetime\ntarget = datetime.datetime(2019,4,30)\ny,m,d = map(int,input().split("/"))\nindata = datetime.datetime(y,... | ['Wrong Answer', 'Accepted'] | ['s062213652', 's274111471'] | [3316.0, 3312.0] | [19.0, 18.0] | [184, 184] |
p03109 | u912318491 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["import datetime;\ndef main():\n s=input()\n y,m,d=s.split('/')\n y=int(y)\n m=int(m)\n d=int(d)\n\n d1= datetime.date(y,m,d)\n Heisei=datetime.date(2019,4,30)\n\n if(Heisei>=d1):\n print('Heisei')\n else:\n print('TBD')", "import datetime;\n\ns=input()\ny,m,d=s.split('/')\ny=i... | ['Wrong Answer', 'Accepted'] | ['s535094046', 's939569010'] | [3440.0, 3312.0] | [24.0, 19.0] | [246, 191] |
p03109 | u918935103 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\nday = (s.split("/"))\nif day[1] == "4":\n print("Heisei")\nelse:\n print("TBD")', 's = input()\nd = s.split("/")\nif day[1] > 4:\n print("TBD")\nelse:\n print("Heisei")', 's = input()\nday = (s.split("/"))\nif day[1] == "4":\n print("Heisei")\nelse:\n print("Reiwa")', 's = input()\nday = (s.split("/"))\n... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s071599525', 's078572447', 's235503968', 's910731450', 's699045093'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 18.0, 17.0] | [87, 80, 89, 93, 90] |
p03109 | u919633157 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["y,m,d=input().split('/')\nprint('TBD' if int(m+d)>=430 else 'Heisei')", "y,m,d=input().split('/')\nprint('TBD' if int(m+d)>430 else 'Heisei')"] | ['Wrong Answer', 'Accepted'] | ['s887727010', 's409671971'] | [3060.0, 2940.0] | [20.0, 17.0] | [68, 67] |
p03109 | u923341003 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['S = input()\nS = S.split("/")\nS = [int(s) for s in S]\nif S[0] < 2019 and S[1] < 4 and S[2] < 30:\n print("Heisei")\nelse:\n print("TBD")', 'S = input()\nS = S.split("/")\nS = [int(s) for s in S]\nif S[0] < 2019 and S[1] < 4 and S[1] < 30:\n print("Heisei")\nelse:\n print("TBD")', 'S = input()\nS = S.spl... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s095516134', 's737701164', 's763482799', 's888108396', 's329295233'] | [2940.0, 2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [138, 138, 223, 182, 140] |
p03109 | u924308178 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['# coding: utf-8\ns = input()\ns if s <=\'2019/04/30\' else print("TBD")', '# coding: utf-8\ns = input()\nif s <=\'2019/04/30\':\n print("Heisei")\nelse:\n print("TBD")'] | ['Wrong Answer', 'Accepted'] | ['s835260590', 's302797477'] | [2940.0, 2940.0] | [18.0, 17.0] | [67, 91] |
p03109 | u924828749 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = [int(x) for x in input().split("/")]\n\nif s[1] < 4:\n print("Heisei")\nelif s[1] == 4 and s[2] < 30:\n print("Heisei")\nelse:\n print("TBD")', 's = [int(x) for x in input().split("/")]\n \nif s[1] < 4:\n print("Heisei")\nelif s[1] == 4 and s[2] <= 30:\n print("Heisei")\nelse:\n print("TBD")'] | ['Wrong Answer', 'Accepted'] | ['s433150716', 's660917078'] | [9120.0, 9100.0] | [25.0, 23.0] | [141, 143] |
p03109 | u927282564 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["yy,mm,dd =map(int,input().split('/'))\n\nif yy>2019:\n print('TBD')\nelse:\n if mm>4:\n print('TBD')\n else:\n if mm==1 or mm==3:\n if dd>31:\n print('TBD')\n else:\n print('Heisei')\n if mm==2:\n if d>29:\n print('TBD')\n else:\n print('Heisei')\n if mm=... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s653512491', 's789035812', 's834226571', 's726923404'] | [3060.0, 2940.0, 2940.0, 2940.0] | [19.0, 18.0, 17.0, 18.0] | [378, 449, 450, 380] |
p03109 | u927764913 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['dt = [for int(i) in input().split("/")]\nif dt[0] >= 2019 and dt[1] >= 5:\n print("TBD")\nelse :\n print("Heisei")', 'dt = [int(i) for i in input().split("/")]\n\nif dt[0] >= 2019 and dt[1] >= 5:\n print("TBD")\nelse :\n print("Heisei")'] | ['Runtime Error', 'Accepted'] | ['s565405899', 's248145862'] | [2940.0, 2940.0] | [17.0, 17.0] | [116, 119] |
p03109 | u931118906 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s=input()\nprint(s)\nif "2019/04/30">=s:\n print(\'Heisei\')\nelse:\n print(\'TBD\')\n', 's=input()\nif "2019/04/30">=s:\n print(\'Heisei\')\nelse:\n print(\'TBD\')\n'] | ['Wrong Answer', 'Accepted'] | ['s716186815', 's973039707'] | [2940.0, 2940.0] | [17.0, 19.0] | [82, 73] |
p03109 | u933129390 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\nif int(s[:4])<2019 and int(s[5:7])<4:\n print("Heisei")\nelse:\n print("TBD")\n', 's = input()\nif int(s[:4])<=2019 and int(s[5:7])<=4:\n print("Heisei")\nelse:\n print("TBD")\n'] | ['Wrong Answer', 'Accepted'] | ['s930427022', 's348236320'] | [2940.0, 2940.0] | [18.0, 17.0] | [93, 95] |
p03109 | u936985471 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s=input()\nprint("Heisei" if int(s[5:7])<5) else "TBD")', 's=input()\nprint("Heisei" if int(s[5:7])<5 else "TBD")'] | ['Runtime Error', 'Accepted'] | ['s296397278', 's460850744'] | [2940.0, 2940.0] | [17.0, 17.0] | [54, 53] |
p03109 | u940061594 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['\nS = input()\nif S[6:8] == "01" or S[6:8] == "02" or S[6:8] == "03" or S[6:8] == "04":\n print("Heisei")\nelse:\n print("TBD")', '\nS = input()\nif S[5:7] == "01" or S[5:7] == "02" or S[5:7] == "03" or S[5:7] == "04":\n print("Heisei")\nelse:\n print("TBD")'] | ['Wrong Answer', 'Accepted'] | ['s794492985', 's863074341'] | [2940.0, 2940.0] | [19.0, 17.0] | [138, 138] |
p03109 | u940279019 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['_,m,_ = map(int,input().split("/"))\nprint("TBD" if m > 4 else "HEISEI")', 'S = input()\nprint("HEISEI" if S <= 2019/4/30 else "TBD")', 'S = input()\nprint("HEISEI" if(S <= 2019/4/30) else "TBD")', '_,m,_ = map(int,input().split("/"))\nprint("TBD" if m > 4 else "Heisei")'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s292948827', 's390067643', 's523763127', 's943005931'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 20.0] | [71, 56, 57, 71] |
p03109 | u941284420 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['y,m,d=int(input().split("/"))\nif y<=2018:\n ans="Heisei"\nelse:\n if m<=4:\n ans="Heisei"\n else:\n ans="TBD"\nprint(ans)', 'y,m,d=str(input().split("/"))\nif y<=2018:\n ans="Heisei"\nelse:\n if m<=4:\n ans="Heisei"\n else:\n ans="TBD"\nprint(ans)', 'y,m,d=str(input().split("/")\nif y<=2018:\n ans... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s112045317', 's186408900', 's599154871', 's582141888'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [123, 123, 123, 127] |
p03109 | u945761460 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['y, m, d=map(int, input().split("/"))\nif 2020<y:\n print("Heisei")\nelse:\n if y<2019:\n print("TBD")\n \n else: #y==2019\n if 5<m:\n print("Heisei")\n else:\n if m<=4:\n print("TBD")', 'y, m, d=map(int, input().split("/"))\nif 2020<y:\n print("TBD")\nelse:\n if y<2... | ['Wrong Answer', 'Accepted'] | ['s392402913', 's527051714'] | [9172.0, 9056.0] | [28.0, 26.0] | [221, 222] |
p03109 | u951492009 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | [' = input()\n\n\n# a_y = int(A[0]) * 1000\n# b_y = int(A[1]) *100\n# c_y = int(A[2])*10\n# d_y = int(A[3])\n\n\n\nif int(A[5])!=0:\n mm = (int(A[5])*10) + (int(A[6]))\nelse:\n mm = int(A[6])\n\nif int(A[8])!=0:\n dd = (int(A[8])*10) + (int(A[9]))\nelse:\n dd = int(A[9])\n \n\n\n# print("TBD")\n# eli... | ['Runtime Error', 'Accepted'] | ['s589604404', 's286461928'] | [2940.0, 3060.0] | [17.0, 17.0] | [504, 505] |
p03109 | u952656646 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['import dateutil\nS = dateutil.parser.parse(input())\nbase = dateutil.parser.parse(\'2019/04/30\')\nif S<=base:\n print("Heisei")\nelse:\n print("TBD")', 'import datetime\nS = input()\ndt = datetime.date(*list(map(int, S.split(\'/\'))))\nbase = datetime.date(2019, 4, 30)\nif dt<=base:\n print("Heisei")\nelse:... | ['Runtime Error', 'Accepted'] | ['s887190396', 's238796682'] | [2940.0, 3312.0] | [17.0, 19.0] | [148, 167] |
p03109 | u953379577 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\nif s[5] == 1:\n print("TBD")\nelse:\n if s[6]>4:\n print("Heisei")\n else:\n print("TBD")', 's = input()\nif int(s[5]) == 1:\n print("TBD")\nelse:\n if int(s[6])>4:\n print("Heisei")\n else:\n print("TBD")', 's = input()\nif int(s[5]) == 1:\n print("TBD")\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s028287196', 's031465964', 's252348841'] | [9096.0, 9168.0, 9012.0] | [20.0, 24.0, 25.0] | [118, 128, 128] |
p03109 | u956547804 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["import re\ns=input()\nh=re.fullmatch(r'2019/(\\d+)/(\\d+)',s)\nif h.groups(1)=='04'or h.groups(1)=='03'or h.groups(1)=='02'or h.groups(1)=='01':\n print('Heosei')\nelse:\n print('TBD')", "import re\ns=input()\na=re.search('([0-9]{4})/([0-9]{2})/([0-9]{2})',s)\nif int(str(a.group(2)))<=4:\n print('Heosei')\ne... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s110974862', 's515166489', 's535454528', 's225307572'] | [3188.0, 3188.0, 3188.0, 3188.0] | [22.0, 22.0, 21.0, 19.0] | [182, 140, 158, 140] |
p03109 | u957872856 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a, b, c = input.split("/")\nprint("Heisei" if b in ["01","02","03","04"] else "TBD")\n', 'a, b, c = input.split("/")\nprint("Heisei" if "Heisei" in ["01","02","03","04"] else "TBD")\n', 'a = input().split("/")\nprint(a)', 'a, b, c = input().split("/")\nprint("Heisei" if b in ["01","02","03","04"] else "TBD")\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s164443787', 's184117508', 's778454018', 's304902910'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0, 18.0] | [84, 91, 31, 86] |
p03109 | u959651981 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input\nprint("TBD") if int(s[5:7]) =>5 else print("Heisei")', "s=input()\n\nif int(s[5:7]) <= 4:\n print('Heisei')\nelse:\n print('TBD')\n"] | ['Runtime Error', 'Accepted'] | ['s364803167', 's295695408'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 75] |
p03109 | u960171798 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['N = int(input())\nans = 0\n\nfor i in range(N):\n a,b = map(str, input().split())\n if b =="JPY":\n ans += int(a)\n else:\n ans += int(a)*380000\nprint(ans)\n', 'y,m,d = map(int, input().split("/"))\nif m >= 5 :\n print("TBD")\nelse:\n print("Heisei")'] | ['Runtime Error', 'Accepted'] | ['s222643038', 's172436578'] | [2940.0, 2940.0] | [17.0, 17.0] | [157, 88] |
p03109 | u962942039 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['date = list(map(int, input().split("/")))\nif date[0] >= 2019:\n\tif date[1] >= 5:\n\t\tprint("Heisei")\nelse:\n\tprint("TBD")\n', 'date = list(map(int, input().split("/")))\nif date[0] >= 2019:\n\tif date[1] >= 5:\n\t\tprint("TBD")\nelse:\n\tprint("Heisei")\n', 'date = list(map(int, input().split("/")))\nif date[0] ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s172143662', 's237653985', 's450481687', 's465524200', 's898314739', 's657430642'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [118, 118, 151, 116, 110, 117] |
p03109 | u965602776 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['import bisect\nI = lambda n: [int(input()) for _ in range(n)]\ndef f(S, x):\n p = bisect.bisect_left(S, x)\n return min([S[p-1], S[p]], key = lambda s: abs(x-s))\ng = lambda x, s, t: abs(x-s)+abs(s-t)\nINF = 10**18\na, b, q = map(int, input().split())\nS, T, X = [-INF]+I(a)+[INF], [-INF]+I(b)+[INF], I(q)\nfor x... | ['Runtime Error', 'Accepted'] | ['s265390890', 's584311163'] | [3064.0, 2940.0] | [19.0, 19.0] | [394, 72] |
p03109 | u966000628 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['lis = list(input().split("/"))\nif lis[1] <= 4:\n print("Heisei")\nelse:\n print("TBD")', 'lis = list(map(int,input().split("/")))\nif lis[1] <= 4:\n print("Heisei")\nelse:\n print("TBD")'] | ['Runtime Error', 'Accepted'] | ['s411328824', 's833026037'] | [2940.0, 2940.0] | [20.0, 20.0] | [85, 94] |
p03109 | u969190727 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['S=input()\nY=S[0:4]\nM=S[5:7]\nD=S[7:9]\nYMD=int(Y+M+D)\nif YMD<=20190430:\n print("Heisei")\nelse:\n print("TBD")', 'S=input()\nY=S[0:4]\nM=S[5:7]\nD=S[8:10]\nYMD=int(Y+M+D)\nif YMD<=20190430:\n print("Heisei")\nelse:\n print("TBD")'] | ['Runtime Error', 'Accepted'] | ['s647441539', 's311976126'] | [3060.0, 2940.0] | [19.0, 17.0] | [108, 109] |
p03109 | u969848070 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["a = input()\nd = 'Heisei'\nif int(a[0:4]) ==2019:\n if int(a[5:7]) == 4:\n if int(a[8:10]) == 30:\n break\n elif int(a[8:10]) <30:\n d = 'TBD'\n else:\n break\n elif int(a[5:7]) <=3:\n d = 'TBD'\n else:\n break\nelif int(a[0:4]) <= 2018:\n d = 'TBD'\nelse:\n break\nprint(d)", "a = i... | ['Runtime Error', 'Accepted'] | ['s782417842', 's437724353'] | [2940.0, 3060.0] | [17.0, 17.0] | [291, 203] |
p03109 | u971091945 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\n\nif int(s[6])<4:\n ans = "TBD"\nelif int(s[6]) == 4:\n if int(s[8])<3:\n ans = "Heisei"\n else:\n ans = "TBD"\nelse:\n ans = "Heisei"\n\nprint(ans)', 's = input()\n\nif int(s[6])<4:\n ans = "Heisei"\nelif int(s[6]) == 4:\n if int(s[8])<3:\n ans = "Heisei"\n else... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s901976210', 's985165727', 's971561551'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [175, 175, 101] |
p03109 | u972658925 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['Y, M, D = list(map(int, input().split("/")))\ns = \'\'.join([Y,M,D])\n\nif s>20190430:\n print("TBD")\nelse:\n print("Heisei")', 's = input()\nss = s.split(\'/\')\nsss = \'\'.join(ss)\n\nif sss>20190430:\n print("TBD")\nelse:\n print("Heisei")', 'Y, M, D = list(map(int, input().split("/")))\ns = \'\'.join... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s347873745', 's627971045', 's676809194', 's720425415', 's751124167', 's756000976', 's758445351', 's185829164'] | [2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 18.0, 17.0, 18.0, 17.0, 17.0] | [124, 108, 130, 89, 94, 124, 108, 123] |
p03109 | u972892985 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['s = input()\nif s[5::6] <= 04 and s[8::9] <= 30:\n print("Heisei")\nelse:\n print("TBD")', 's = input()\nif s[0::3] <= "2019" and s[5::6] <= "04" and s[8::9] <= "30":\n print("Heisei")\nelse:\n print("TBD")', 's = input()\nif s[5::6] >= "04" and s[8::9] >= "30":\n print("Heisei")\nelse:\n print("TBD")', 's = in... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s190039259', 's197337348', 's255667428', 's280607712', 's416284180', 's708174455'] | [2940.0, 3060.0, 2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0, 19.0, 19.0, 17.0] | [86, 112, 90, 74, 68, 72] |
p03109 | u975884051 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["S = str(input())\n\nlistS = S.split('/')\n\nif int(listS[0]) < 2019:\n print('Heisei')\nelif int(listS[0]) == 2019:\n print('a')\n if int(listS[1]) < 5:\n print('Heisei')\n else:\n print('TBD')\nelse:\n print('TBD')", "S = str(input())\n\nlistS = S.split('/')\n\nif int(listS[0]) < 2019:\n... | ['Wrong Answer', 'Accepted'] | ['s360665332', 's079891648'] | [3060.0, 3060.0] | [17.0, 17.0] | [231, 216] |
p03109 | u979060189 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["N = int(input())\nM = [[i for i in input().split()] for i in range(N)]\nC = 0\n\nfor i in range(N):\n if M[i][1] == 'JPY':\n C += int(M[i][0])\n elif M[i][1] == 'BTC':\n C += float(M[i][0])*380000\n\nprint(C)", "y, m ,d = map(int, input().split('/'))\n\nA = None\n\nif y > 2019 :\n A = 'TBD'\nel... | ['Runtime Error', 'Accepted'] | ['s830990321', 's728406822'] | [3060.0, 2940.0] | [17.0, 18.0] | [218, 169] |
p03109 | u980492406 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ["S = input()\nif int(s[5]) == 0 and int(s[6]) <= 4 :\n print('Heisei')\nelse :\n print('TBD')", "s = input()\nif int(s[5]) == 0 and int(s[6]) <= 4 :\n print('Heisei')\nelse :\n print('TBD')"] | ['Runtime Error', 'Accepted'] | ['s383034151', 's530194378'] | [2940.0, 2940.0] | [17.0, 17.0] | [94, 94] |
p03109 | u989348352 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a, b, c = [int(i) for i in input().split("/")]\nif a >= 2019:\n if b >= 4:\n if c >=30:\n print("TBD")\n else:\n print("Heisei")\n else:\n print("Heisei")\nelse:\n print("Heisei")\n', 'a, b, c = [int(i) for i in input().split("/")]\nif a == 2019 and b > 4:\n prin... | ['Wrong Answer', 'Accepted'] | ['s861201827', 's175987962'] | [2940.0, 2940.0] | [17.0, 17.0] | [222, 113] |
p03109 | u991974907 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['S = input()\n\nA = S.split(\'/\')\n\nif int(A[0]) <= 2019 and int(A[1]) <= 4:\n print("heisei")\nelse:\n print("TBD")\n ', 'S = input()\n\nA = S.split(\'/\')\n\nif int(A[0]) == 2019 and int(A[1]) <= 4:\n print("heisei")\nelif int(A[0]) < 2019:\n print("heisei")\nelse:\n print("TBD")\n \n', 'S = input()\n\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s451368957', 's839044565', 's149550438'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [115, 157, 157] |
p03109 | u993412772 | 2,000 | 1,048,576 | You are given a string S as input. This represents a valid date in the year 2019 in the `yyyy/mm/dd` format. (For example, April 30, 2019 is represented as `2019/04/30`.) Write a program that prints `Heisei` if the date represented by S is not later than April 30, 2019, and prints `TBD` otherwise. | ['a = list(map(int,input().split("/"))\n\nif a[0]>= 2019:\n print("Heisei")\nelse:\n print("TBD")\n\n', 'a = list(map(int,input().split("/"))\n\nif a[0]>= 2019\n print("Heisei")\nelse:\n print("TBD")\n', 'a = list(map(int,input().split())\n\ndel a[4]\ndel a[7]\n\nb =sum(a)\nq = 19\nif q <=a:\n print("He... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s406059643', 's704822814', 's901952782', 's907652324', 's102645182'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [98, 97, 124, 123, 159] |
p03111 | u011634450 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N, A, B, C = map(int, input().split())\nl = [int(input()) for i in range(N)]\nINF = 10 ** 9\ndef dfs(cur, a, b, c):\n\tif cur == N:\n\treturn abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF\n\tret0 = dfs(cur + 1, a, b, c)\n\tret1 = dfs(cur + 1, a + l[cur], b, c) + 10\n\tret2 = dfs(cur + 1, a, b... | ['Runtime Error', 'Accepted'] | ['s937889014', 's170200342'] | [2940.0, 3064.0] | [17.0, 73.0] | [426, 427] |
p03111 | u013408661 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['n,a,b,c=map(int,input().split())\nlength=[]\nfor i in range(n):\n k=int(input())\n length.append(k)\nlength=sorted(length)\nx=[0,1,2,3]\nans=[]\nif len(length)==3:\n for p in x:\n for q in x:\n for r in x:\n value=0\n a_length=0\n b_length=0\n c_length=0\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s288091805', 's634115781', 's941760523', 's797040617'] | [4888.0, 3064.0, 3064.0, 5928.0] | [300.0, 17.0, 17.0, 449.0] | [7682, 1224, 812, 7808] |
p03111 | u013629972 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['# g = [1000, 800, 100]\n#takes = [300, 333, 400, 444, 500, 555, 600, 666]\n#g = [100, 90, 80]\n#takes = [100, 100, 90,90,90,80,80,80]\n\n\nN,A,B,C = [int(input()) for i in range(0,4)]\ng=[A, B, C]\ntakes =[]\nfor i in range(N):\n takes.append(int(input())\ncombis = []\nfor i in range(4):\n\xa0 \xa0 for j in range(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s041312162', 's316445646', 's333995826', 's692434194'] | [2940.0, 2940.0, 2940.0, 12788.0] | [18.0, 17.0, 18.0, 746.0] | [1506, 1270, 1498, 1133] |
p03111 | u028217518 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['read = input\nread = Read(False, """\n\n\n8 1000 800 100\n300\n333\n400\n444\n500\n555\n600\n666\n\n""").read\ntmp = read()\ntmp = list(map(int, tmp.split(\' \')))\nN,A,B,C = tmp\nopt = list(map(int, map(lambda x: read(), range(N))))\ndef dfs(n,a,b,c):\n ret = 10**7\n if(n == N):\n if(min(a,b,c) == 0):\n... | ['Runtime Error', 'Accepted'] | ['s530063194', 's906945384'] | [3064.0, 3064.0] | [17.0, 82.0] | [617, 639] |
p03111 | u030626972 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['def main():\n minmp = 10000000\n def dfs(depth, pt):\n\n if depth==n:\n mp_tmp = 0\n all_used = True\n for k in range(3):\n if pt.count(k) == 0:\n all_used = False\n break\n\n sum_tmp = 0\n ... | ['Runtime Error', 'Accepted'] | ['s141272320', 's336195633'] | [3064.0, 3064.0] | [18.0, 382.0] | [1043, 1060] |
p03111 | u037221289 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ["N, A, B, C = map(int, input().split(' '))\nL = [int(input()) for i in range(N)]\n\nMAX = 10 ** 9\n\ndef dfs(cur, a, b, c):\n if cur == N:\n return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else MAX\n ret0 = dfs(cur + 1, a, b, c)\n ret1 = dfs(cur + 1, a + L[cur], b, c) + 10\n ret2 = dfs(cur ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s192511202', 's990717544', 's499264298'] | [3924.0, 3064.0, 3064.0] | [120.0, 18.0, 72.0] | [487, 487, 458] |
p03111 | u047023156 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['import sys\nfrom collections import deque\ninput = sys.stdin.readline\n\nN, A, B, C = map(int, input().split())\nl = [int(input()) for i in range(N)]\nINF = 10**9\n\ndef dfs(cur, a, b, c):\n if cur == N:\n if min(a, b, c) > 0:\n return abs(a-A) + abs(b-B) + abs(c-C) - 30\u3000\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s347355519', 's011275806'] | [2940.0, 3316.0] | [17.0, 79.0] | [601, 599] |
p03111 | u052499405 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N, A, B, C = [int(item) for item in input().split()]\n\ntake = [int(input()) for i in range(N)]\n\ndef dfs(n, a, b, c):\n if n == N:\n return abs(a - A) + abs(b - B) + abs(c - C) if min(a, b, c) > 0 else 10**9\n ret0 = dfs(n+1, a+take[n], b, c)\n ret1 = dfs(n+1, a, b+take[n], c)\n ret2 = dfs(n+1, a, b, c+take[... | ['Wrong Answer', 'Accepted'] | ['s567969021', 's712843746'] | [3064.0, 3064.0] | [66.0, 72.0] | [410, 430] |
p03111 | u055941944 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['n,a,b,c=map(int,input().split())\nl=[]\nfor i in range(n):\n l.append(int(input()))\n\ndef solve(w,x,y,z):\n if w==n:\n if min(x,y,z)>0:\n return abs(x-a)+abs(y-b)+abs(z-c)-30\n else:\n return 10e4\n can0=solve(w+1,x,y,z)\n can1=solve(w+1,x+l[w],y,z)+10\n ... | ['Wrong Answer', 'Accepted'] | ['s890639037', 's860767568'] | [3064.0, 3188.0] | [18.0, 79.0] | [437, 417] |
p03111 | u065079240 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['\nN, len_A, len_B, len_C = map(int, input().split())\nl = [int(input()) for i in range(N)]\nprint(l)\nans = 10 ** 9\npattern = 4 ** N\nA = [0] * pattern\nB = [0] * pattern\nC = [0] * pattern\ncost = [0] * pattern\nfor ite in range(pattern):\n ite_2 = 0\n ite_2 += ite\n A[ite], B[ite], C[ite] = [], [], []\n ... | ['Wrong Answer', 'Accepted'] | ['s911011951', 's461034514'] | [27508.0, 27492.0] | [484.0, 476.0] | [1126, 1096] |
p03111 | u070449185 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N,A,B,C = map(int,input().split())\nl = [int(input()) for i in range(N)]\nINF = 10**9\n\ndef dfs(cur,a,b,c):\n if(cur == N):\n return abs(a-A) + abs(b-B) + abs(c-C) - 30 if min(a,b,c)>0 else INF\n ret0 = dfs(cur+1, a, b, c)\n re1 = dfs(cur + 1, a + l[cur], b, c) + 10\n ret2 = dfs(cur + 1, a, b+l[cu... | ['Runtime Error', 'Accepted'] | ['s194398423', 's448574944'] | [3188.0, 3064.0] | [19.0, 72.0] | [413, 374] |
p03111 | u077291787 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['# @hitstales \nn, *goals = list(map(int, input().split()))\nbamboos = list(map(int, [input().rstrip() for _ in range(n)]))\n\n\ndef get_best(li, goal):\n bam_mp_lis = {0: (-10, tuple())}\n li = sorted(li)\n for i, v in enumerate(li):\n tmp = bam_mp_lis.copy()\n for bam, (mp, lis) in tmp.items()... | ['Wrong Answer', 'Accepted'] | ['s965714139', 's150958078'] | [3064.0, 3064.0] | [31.0, 75.0] | [1141, 701] |
p03111 | u081823802 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['#coding:utf-8\nimport sys\n\nBAMB_NUM = 0\nBAMB_A = 0\nBAMB_B = 0\nBAMB_C = 0\nBAMB_LIST = []\n\ndef calcMP(idx, lenA, lenB, lenC):\n """\n calculate MP.\n """\n # when classified all bamboos\n if (idx == BAMB_NUM):\n # exists a zero length bamboo\n if (lenA <= 0 or lenB <= 0 or lenC <= 0... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s473277814', 's556045125', 's392746648'] | [3064.0, 2940.0, 3064.0] | [73.0, 17.0, 70.0] | [1197, 1131, 1039] |
p03111 | u087917227 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N,A,B,C = map(int, input().split())\nl = [int(i) for i in input()]\nINF = 10**9\ndef dfs(cur,a,b,c):\n if cur == N:\n return abs(a-A) + abs(b-B) + abs(c-C) - 30 if min(a,b,c) > 0 else INF\n ret0 = dfs(cur+1,a,b,c)\n ret1 = dfs(cur+1,a+l[cur],b,c) + 10\n ret2 = dfs(cur + 1, a, b + l[cur], c) + 10\n ... | ['Runtime Error', 'Accepted'] | ['s259086382', 's212550608'] | [3064.0, 3064.0] | [19.0, 74.0] | [413, 420] |
p03111 | u095426154 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['def nsin(X,y):\n if(int(X/y)):\n return nsin(int(X/y),y)+str(X%y)\n return str(X%y)\n\ncost=10000\nfor i in range(3**n):\n g=list(nsin(i,3).zfill(5))\n if len(set(g))!=3:\n continue\n la=[]\n lb=[]\n lc=[]\n for j in range(n): \n if g[j]=="0":\n la.append... | ['Runtime Error', 'Accepted'] | ['s497992368', 's008195747'] | [3192.0, 3064.0] | [18.0, 693.0] | [1395, 776] |
p03111 | u116038906 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['\n# TLE ac \n\n\nimport heapq\nfrom itertools import combinations\nimport sys\ninput = sys.stdin.readline \nN,A,B,C = (int(i) for i in input().split())\nl =[0]*N\nfor i in range(N):\n l[i] = int(input())\n\n\nmp=[]\nfor na in range(1,N-1):\n for ja in combinations(l,na):\n\n l_b =list(set(l) -set(ja))... | ['Wrong Answer', 'Accepted'] | ['s094851477', 's076698804'] | [11552.0, 11124.0] | [98.0, 96.0] | [1006, 1177] |
p03111 | u123756661 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['def ns(X, n):\n if (int(X/n)):\n return ns(int(X/n), n)+str(X%n)\n return str(X%n)\n\nn,a,b,c=map(int,input().split())\nt=[a,b,c]\nl=[]\nans=-1\nfor i in range(n):\n l.append(int(input()))\n\nfor i in range(4**n):\n tmp=ns(i,4)\n tmp="0"*(n-len(tmp))+tmp\n h=[0]*3\n p=0\n for j in range... | ['Wrong Answer', 'Accepted'] | ['s855328394', 's922641810'] | [3684.0, 3064.0] | [725.0, 666.0] | [690, 722] |
p03111 | u129836004 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N, A, B, C = map(int, input().split())\nl = [int(input()) for i in range(n)]\ninf = 10 ** 9\n\ndef dfs(cur, a, b, c):\n if cur == N:\n return abs(a-A)+abs(b-B)+abs(c-C) - 30 if min(a, b, c) >0 else inf\n ret0 = dfs(cur+1, a,b,c)\n ret1 = dfs(cur+1, a+l[cur], b, c) + 10\n ret2 = dfs(cur+1, a, b+l[cu... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s130183592', 's220185579', 's358994322'] | [3064.0, 3064.0, 3064.0] | [17.0, 18.0, 70.0] | [422, 463, 422] |
p03111 | u163320134 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['import collections\nfrom copy import deepcopy\n\nn,a,b,c=map(int,input().split())\narr=[int(input()) for _ in range(n)]\nl=collections.deque()\nl.append([[],[],[]])\ncnt=0\n\nwhile 1:\n if cnt==8:\n break\n base=l.popleft()\n if len(base[0])==0 and len(base[1])==0 and len(base[2])==0:\n l.append([[arr[cnt]],... | ['Runtime Error', 'Accepted'] | ['s980386134', 's734980436'] | [32244.0, 32244.0] | [1132.0, 1113.0] | [954, 955] |
p03111 | u177756077 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N,A,B,C=map(int,input().split())\nl=[]\nfor _ in range(N):\n l.append(int(input()))\n\ndef dfs(counter,a,b,c):\n if a==A and b==B and c==C:\n return counter\n ret1=dfs(counter+1,a+l[counter],b,c)+10\n ret2=dfs(counter+1,a,b+l[counter],c)+10\n ret3=dfs(counter+1,a,b,c+l[counter])+10\n ret4... | ['Runtime Error', 'Accepted'] | ['s195742856', 's116465170'] | [3064.0, 3064.0] | [18.0, 60.0] | [467, 764] |
p03111 | u181115044 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N, A, B, C = map(int, input().split())\nL = [int(input()) for i in range(N)]\n\nINF = 10 ** 9\n\ndef dfs(cur, a, b, c):\n if cur == N:\n return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF\n ret0 = dfs(cur + 1, a, b, c)\n ret1 = dfs(cur + 1, a + l[cur], b, c) + 10\n ret2 = dfs(cur + 1... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s280993828', 's767128076', 's561951838'] | [3064.0, 2940.0, 3064.0] | [18.0, 17.0, 71.0] | [438, 1671, 438] |
p03111 | u183509493 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['n,a,b,c=map(int,input().split())\nl = [int(input()) for _ in range(n)]\nans = 100000000\nfor i in range(4**n):\n x,y,z=0,0,0\n s,t,u=0,0,0\n for j in range(n):\n t = i % 4\n if t == 0:\n x += l[j]\n s += 1\n elif t == 1:\n y += l[j]\n t += 1\n elif t == 2:\n z += l[j]\n u ... | ['Wrong Answer', 'Accepted'] | ['s139646751', 's867007030'] | [3064.0, 3064.0] | [226.0, 324.0] | [464, 476] |
p03111 | u185354171 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N,A,B,C = map(int,input().split())\nl = [int(input()) for i in range(N)]\ninf = 10**9\ndef dfs(cur,a,b,c):\n if cur == N:\n return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else inf\n ret0 = dfs(cur+1,a,b,c)\n ret1 = dfs(cur+1,a+l(cur),b,c)\n ret2 = dfs(cur+1,a,b+l(cur),c)\n ... | ['Runtime Error', 'Accepted'] | ['s921393146', 's760043379'] | [3064.0, 3064.0] | [18.0, 75.0] | [401, 416] |
p03111 | u187205913 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N,A,B,C = map(int,input().split())\nl = [int(input()) for i in range(n)]\nINF = 10**9\ndef dfs(cur,a,b,c):\n if cur==N:\n return abs(a-A)+abs(b-B)+abs(c-C)-30 if min(a,b,c)>0 else INF\n ret0 = dfs(cur+1,a,b,c)\n ret2 = dfs(cur+1,a+l[cur],b,c)+10\n ret3 = dfs(cur+1,a,b+l[cur],c)+10\n ret4 = dfs(c... | ['Runtime Error', 'Accepted'] | ['s612593612', 's872816528'] | [3064.0, 3064.0] | [18.0, 70.0] | [386, 389] |
p03111 | u190406011 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['from itertools import combinations\nN, A, B, C = [int(i) for i in input().split()]\nl_ls = list()\nfor i in range(N):\n l_ls.append(int(input()))\ndis_ls = [(i,[i]) for i in l_ls]\nfor i in range(2,7):\n dis_ls += [(sum(i),i) for i in combinations(l_ls, i)]\n_sum = 0\nfor target in [C, B, A]:\n min = 1e9\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s356036658', 's735755994', 's252990495'] | [3064.0, 3064.0, 3192.0] | [18.0, 18.0, 303.0] | [572, 733, 585] |
p03111 | u191829404 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0\n# abcde\ts=input()\ts=\'abcde\'\n# abcde\ts=list(input())\ts=[\'a\', \'b\', \'c\', \'d\', \'e\']\n\n# 1 2\t| x,y = map(int,input().split()) |\tx=1,y=2\n\n\n\n\n# INPUT\n# 3\n# hoge\n# foo\n# bar\n# ANSWER\n# n=int(input())\n\n\n\nfrom collections import defa... | ['Wrong Answer', 'Accepted'] | ['s098493910', 's938068752'] | [12236.0, 12440.0] | [150.0, 208.0] | [1920, 1253] |
p03111 | u193264896 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['import itertools\nN,A,B,C = map(int,input().split())\nL = [int(input()) for _ in range(N)]\n \nINF = 10 ** 18\nanswer = INF\nfor pattern in itertools.product(range(4), repeat = N):\n x = [0] * 4\n MP = 0\n for take, length in zip(pattern, L):\n if take == 3:\n continue\n if x[take] != 0:\n MP += 10... | ['Runtime Error', 'Accepted'] | ['s703800216', 's920620563'] | [3064.0, 3064.0] | [17.0, 273.0] | [489, 490] |
p03111 | u194894739 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['from collections import deque\n\nN, A, B, C = map(int, input().split())\nL = [int(input()) for _ in range(N)]\nminMP = 10**5\n\np = deque()\np.append([-1] * len(L))\nwhile p:\n stats = p.pop()\n stats = list(stats)\n a, b, c = 0, 0, 0\n MP = 0\n cntA = 0; cntB = 0; cntC = 0\n for i in range(N):\n ... | ['Runtime Error', 'Accepted'] | ['s186134898', 's815957584'] | [5492.0, 3064.0] | [586.0, 70.0] | [883, 508] |
p03111 | u196697332 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N, A, B, C = map(int, input().split())\n\nlength = [0] * N\n\nfor i in range(N):\n length[i] = int(input())\n\ninf = 10 ** 9\n\ndef dfs(pos, a, b, c):\n if pos == N:\n if min(a, b, c) > 0:\n \n return abs(a - A) + abs(b - B) + abs(c - C) - 30\n else:\n return inf\n... | ['Wrong Answer', 'Accepted'] | ['s353393722', 's515476248'] | [3064.0, 3064.0] | [73.0, 70.0] | [611, 618] |
p03111 | u197955752 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['n, *abc = [int(x) for x in input().split()]\nl = [int(input()) for i in range(n)]\nA = 0; B = 1; C = 2;\n\nminmp = 10 ** 9\nfor k in range(2 ** (2 * n)):\n mat = [[], [], [], []] \n \n \n \n \n \n for i in range(1, n):\n mat[k & (0b11)].append(l[i])\n k >>= 2\n\n if len(mat[0]) ... | ['Wrong Answer', 'Accepted'] | ['s925482076', 's016499767'] | [3064.0, 3064.0] | [344.0, 374.0] | [815, 812] |
p03111 | u210543511 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N, A, B, C = map(int, input().split())\nl = [int(input()) for i in range(N)]\nINF = 10**9\n\ndef dfs(cur, a, b, c):\n if cur == N:\n return abs(A-a) + abs(B-b) + abs(C-c) -30 if min(a, b, c) > 0 else INF\n ret0 = dfs(cur + 1, a, b, c )\n ret1 = dfs(cur + 1, a + l[cur], b, c ... | ['Wrong Answer', 'Accepted'] | ['s372845837', 's987745080'] | [3064.0, 3064.0] | [68.0, 75.0] | [495, 503] |
p03111 | u214434454 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['n,A,B,C = map(int,input().split(()))\nl = [int(input()) for i in range(n)]\ninf = 10 ** 9\n\ndef dfs(i,a,b,c):\n if i == n:\n if min(a,b,c) > 0:\n return abs(a-A) + abs(b-B) + abs(c-C) - 30\n else:\n return inf\n ret0 = dfs(i+1, a, b, c)\n ret1 = dfs(i+1, a + l[i], b, c) +... | ['Runtime Error', 'Accepted'] | ['s042095306', 's288669170'] | [3064.0, 3064.0] | [19.0, 76.0] | [453, 451] |
p03111 | u223133214 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ["def Base_10_to_n(X, n):\n if (int(X/n)):\n return Base_10_to_n(int(X/n), n)+str(X%n)\n return str(X%n)\n\nn,a,b,c=map(int,input().split())\nL=[]\nfor _ in range(n):\n L.append(int(input()))\nprint(L)\nat,bt,ct=[],[],[]\nans_list=[]\nans=999999999\nfor i in range(4**len(L)-1):\n i_4_list=list(Base_1... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s108285898', 's575632213', 's737890178'] | [3064.0, 3188.0, 3064.0] | [624.0, 629.0, 74.0] | [791, 748, 423] |
p03111 | u223904637 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['n,a,b,c=map(int,input().split())\nl=[]\nfor i in range(n):\n l.append(int(input()))\nop=[[0],[1],[2]]\nfor i in range(n-1):\n tmp=[]\n for j in op:\n tmp.append(j+[0])\n tmp.append(j+[1])\n tmp.append(j+[2])\n op=tmp\nans=1000000000\nfor i in op:\n ta=0\n tb=0\n tc=0\n for... | ['Wrong Answer', 'Accepted'] | ['s489023372', 's669519178'] | [4212.0, 15092.0] | [43.0, 320.0] | [562, 754] |
p03111 | u225642513 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['N,A,B,C = map(int, input().split())\nl = [int(input()) for _ in range(N)]\nINF = 10**9\n\ndef dfs(cur, a, b, c):\n if cur == N:\n return abs(a-A)+abs(b-B)+abs(c-C) > 0 else INF\n ret0 = dfs(cur+1, a, b, c)\n ret1 = dfs(cur+1,a+l[cur],b,c) +10\n ret2 = dfs(cur+1,a,b+l[cur],c)+10\n ret3 = dfs(cur+... | ['Runtime Error', 'Accepted'] | ['s871296901', 's029695211'] | [2940.0, 3188.0] | [17.0, 73.0] | [382, 399] |
p03111 | u232852711 | 2,000 | 1,048,576 | You have N bamboos. The lengths (in centimeters) of these are l_1, l_2, ..., l_N, respectively. Your objective is to use some of these bamboos (possibly all) to obtain three bamboos of length A, B, C. For that, you can use the following three kinds of magics any number: * Extension Magic: Consumes 1 _MP_ (magic poi... | ['inf = 10**9\nn, a, b, c = map(int, input().split())\nl = [int(input()) for _ in range(n)]\n\ndef dfs(i, a_cur, b_cur, c_cur):\n if i == n:\n return abs(a_cur-a) + abs(b_cur-b) + abs(c_cur-c) - 30 if min(a_cur, b_cur, c_cur) > 0 else inf\n ans0 = dfs(i+1, a+l[i], b, c) + 10\n ans1 = dfs(i+1, a, b+l[i],... | ['Wrong Answer', 'Accepted'] | ['s118192283', 's228817862'] | [3064.0, 3064.0] | [82.0, 75.0] | [449, 497] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.