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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03424 | u839873388 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['S = list(input().split())\nc = "kara"\nif S == "Y":\n\tc = "Four"\nelse :\n\tc = "Three"\n\t\nprint(c)', 'n = int(input())\nS = list(input().split())\nc = "kara"\nfor i in range(n):\n\tif S[i] == "Y":\n\t\tc = "Four"\n\telse :\n\t\tc = "Three"\n\t\nprint(c)', 'n = int(input())\nS = list(input().split())\nc = "Three"\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s176389082', 's548394155', 's020004580'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [92, 135, 113] |
p03424 | u842118372 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n=input()\ns={str(x) for x in input().split()}\nprint(len(s))', 'n=input()\ns={str(x) for x in input().split()}\nif len(s) == 4:\n print("Four")\nelse:\n print("Three")'] | ['Wrong Answer', 'Accepted'] | ['s981261545', 's093501130'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 104] |
p03424 | u845427284 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n = int(input())\ns = list(map(int, input().split()))\nprint("Four" if "Y" in s else "Three")', 'n = int(input())\ns = list(input().split())\nprint("Four" if "Y" in s else "Three")'] | ['Runtime Error', 'Accepted'] | ['s086269831', 's927736375'] | [2940.0, 2940.0] | [17.0, 20.0] | [91, 81] |
p03424 | u856555908 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['x = input().split(" ")\nt = True\nfor i in x:\n if i == \'Y\':\n t = False\n\nif t:\n print("Three")\nelse:\n print("Four")', 'x = input().split(" ")\nt = True\nfor i in x:\n if i == \'Y\':\n t = False\n continue\n\nif t:\n print("Three")\nelse:\n print("Four")', 'y = input()\nx... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s424480473', 's898974839', 's274540697'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 19.0] | [128, 145, 157] |
p03424 | u870286225 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["# -*- coding: utf-8 -*-\n\nN = input()\n\nS = raw_input().split()\n\nif 'Y' in S:\n\tprint('Four')\nelse:\n\tprint('Three')", '# -*- coding: utf-8 -*-\n\nN = input()\n\nS = raw_input().split()\n\nif "Y" in S:\n\tprint(\'Four\')\nelse:\n\tprint(\'Three\')', '# -*- coding: utf-8 -*-\n\nN = input()\n\nS = input().split(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s921820664', 's925061858', 's122204821'] | [2940.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [175, 175, 171] |
p03424 | u870518235 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N = int(input())\nS = list(map(int, input().split()))\n\nif "Y" in S:\n print("Four")\nelse:\n print("Three")\n', 'N = int(input())\nS = list(map(str, input().split()))\n\nif "Y" in S:\n print("Four")\nelse:\n print("Three")\n'] | ['Runtime Error', 'Accepted'] | ['s702937056', 's140428428'] | [9028.0, 9064.0] | [25.0, 26.0] | [110, 110] |
p03424 | u874333466 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N = int(input())\nS = list(map(str, input().split()))\n\ncolor = []\n\nfor i in S:\n if i in color:\n pass\n else:\n color.append(i)\n \nprint(len(color))', "N = int(input())\nS = list(map(str, input().split()))\n\ncolor = []\n\nfor i in S:\n if i in color:\n pass\n else:\n color.append(i)\n \ni... | ['Wrong Answer', 'Accepted'] | ['s448503042', 's021279097'] | [9072.0, 9016.0] | [28.0, 27.0] | [154, 197] |
p03424 | u879870653 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N = int(input())\nS = list(map(int,input().split()))\np = S.count("P")\nw = S.count("W")\ng = S.count("G")\ny = S>count("Y")\nans = p+w+g+y\nif ans == 3 :\n print("Three")\nelse :\n print("Four")\n ', 'N = int(input())\nS = list(map(str,input().split()))\np = S.count("P")\nw = S.count("W")\ng = S.count("G")\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s501600363', 's569365379', 's954734945'] | [3060.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [196, 196, 213] |
p03424 | u883792993 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["N=int(input())\nS=list(map(int,input().split()))\nbucket=[]\nfor i in range(N):\n if S[i]=='P':\n bucket[0]+=1\n elif S[i]=='W':\n bucket[1]+=1\n elif S[i]=='G':\n bucket[2]+=1\n else:\n bucket[3]+=1\nif 4 - bucket.count(0)==3:\n print('Three')\nelse:\n print('Four')", "N... | ['Runtime Error', 'Accepted'] | ['s972563215', 's531580642'] | [3060.0, 3064.0] | [18.0, 18.0] | [298, 319] |
p03424 | u893063840 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n = int(input())\ns = list(map(int, input().split()))\n\nprint("Four" if "Y" in s else "Three")\n', 'n = int(input())\ns = list(input().split())\n\nprint("Four" if "Y" in s else "Three")\n'] | ['Runtime Error', 'Accepted'] | ['s597514940', 's510482055'] | [2940.0, 2940.0] | [17.0, 17.0] | [93, 83] |
p03424 | u898058223 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n=int(input())\na=list(map(int,input().split()))\nif len(set(a))==3:\n print("Three")\nelse:\n print("Four")', 'n=int(input())\na=list(input().split())\nif len(set(a))==3:\n print("Three")\nelse:\n print("Four")'] | ['Runtime Error', 'Accepted'] | ['s927995920', 's858608043'] | [9088.0, 8916.0] | [27.0, 29.0] | [105, 96] |
p03424 | u903005414 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["N = int(input())\nA = list(map(int, input().split()))\nfor a in A:\n if a == 'Y':\n print('Four')\n exit()\nprint('Three')", "N = int(input())\nA = input().split()\nfor a in A:\n if a == 'Y':\n print('Four')\n exit()\nprint('Three')\n"] | ['Runtime Error', 'Accepted'] | ['s034683727', 's379380604'] | [2940.0, 2940.0] | [17.0, 17.0] | [123, 108] |
p03424 | u905582793 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n=int(input())\nh=list(map(input().split()))\nif len(list(set(h)))==3:\n print("Three")\nelse:\n print("Four")\n', 'n=int(input())\nh=list(map(int,input().split()))\nif len(list(set(h)))==3:\n print("Three")\nelse:\n print("Four")', 'n=int(input())\nh=list(input().split())\nif len(list(set(h)))==3:\n print("Thre... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s536801223', 's928173917', 's273299602'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [108, 111, 103] |
p03424 | u918601425 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N=int(input())\nfor i in range(N):\n x=int(input())\n if x=="Y":\n print("Four")\n break\nelse:\n print("Three")\n ', 'N=int(input())\nls=input().split()\nfor i in range(N):\n x=ls[i]\n if x=="Y":\n print("Four")\n break\nelse:\n print("Three")\n \n'] | ['Runtime Error', 'Accepted'] | ['s249769279', 's579793025'] | [2940.0, 2940.0] | [17.0, 17.0] | [117, 130] |
p03424 | u923279197 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["n=int(input())\ns=list(input().split())\nif 'Y' in s:\n print('four')\nelse:\n print('three')", "n=int(input())\ns=list(input().split())\nif 'Y' in s:\n print('Four')\nelse:\n print('Three')"] | ['Wrong Answer', 'Accepted'] | ['s941294070', 's656184678'] | [2940.0, 3188.0] | [17.0, 22.0] | [94, 94] |
p03424 | u928784113 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['# -*- coding: utf-8 -*-\nN = int(input())\na = []\nfor i in range(1,N+1):\n a.append(input())\n \nif a.count("Y") == 0:\n print("Three")\nelse:\n print("Four")', 'N = int(input())\nS = list(map(int,input().split()))\nif S.count("Y") == 0:\n print("Three")\nelse:\n print("Four")', '# -*- coding: utf-8 -*-\nN = i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s119836061', 's474514779', 's531647343', 's824786731', 's525302705'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0, 18.0, 17.0] | [154, 112, 151, 111, 140] |
p03424 | u929618357 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N = int(input())\nstr = input().split()\nprint(str)\nif \'Y\' in str:\n print("Four")\nelse:\n print("Three")\n', 'N = int(input())\nstr = input().split()\nif \'Y\' in str:\n print("Four")\nelse:\n print("Three")'] | ['Wrong Answer', 'Accepted'] | ['s382633175', 's073612604'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 96] |
p03424 | u931462344 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n = input()\nprint(len(set(input().split())))', 'n = input()\nprint(len(set(input().split()))', 'n = input()\nif len(set(input().split())) == 3:\n\tprint("Three")\nelse:\n\tprint("Four") '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s567501438', 's758852222', 's658228905'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [44, 43, 85] |
p03424 | u931938233 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["input()\nprint('Three' if 'Y' in input().split() else 'Four')", "input()\nprint('Four' if 'Y' in input().split() else 'Three')"] | ['Wrong Answer', 'Accepted'] | ['s626265391', 's582906629'] | [9028.0, 8992.0] | [29.0, 30.0] | [60, 60] |
p03424 | u936985471 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n=input()\na=input().split()\nprint(("Three","Four")[len(set(a))==4]', 'n=input()\na=input().split()\nprint(("Three","Four")[len(set(a))==4])\n'] | ['Runtime Error', 'Accepted'] | ['s710351336', 's447202396'] | [2940.0, 2940.0] | [17.0, 18.0] | [66, 68] |
p03424 | u940102677 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n = int(input())\na = list(input())\nflag = False\nfor i in range(n):\n if a[i] == "Y":\n flag = True\n\nif flag == Ture:\n print("Four")\nelse:\n print("Three")', 'n = int(input())\na = list(input())\nfor i in range(n):\n if a[i] == "Y":\n print("Four")\n exit()\n \nprint("Three")'] | ['Runtime Error', 'Accepted'] | ['s566305442', 's331412867'] | [2940.0, 2940.0] | [17.0, 17.0] | [157, 120] |
p03424 | u941753895 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["\nN=int(input())\nl=list(map(int,input().split()))\n\nln=len(set(l))\n\nif ln==3:\n print('Three')\nelse:\n print('Four')", "\nN=int(input())\nl=list(map(str,input().split()))\n\nln=len(set(l))\n\nif ln==3:\n print('Three')\nelse:\n print('Four')"] | ['Runtime Error', 'Accepted'] | ['s313497515', 's244554914'] | [2940.0, 2940.0] | [17.0, 17.0] | [122, 122] |
p03424 | u957872856 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N = int(input())\nS = input().split()\nprint(S)\nif len(set(S)) == 3:\n print("Three")\nelse:\n print("Four")\n', 'N = int(input())\nS = list(input())\nprint(S)\nif len(set(S)) == 3:\n print("Three")\nelse:\n print("Four")\n', 'N = int(input())\nS = input().split()\nif len(set(S)) == 3:\n print("Three")\nelse:\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s897790429', 's970479814', 's657917548'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 20.0] | [106, 104, 96] |
p03424 | u958053648 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N=int(input())\nS=list(map(str,input().split()))\nSS=set(S)\nlength=len(SS)\nprint("four" if length==4 else "three")', 'N=int(input())\nS=list(map(str,input().split()))\nSS=set(S)\nlength=len(SS)\nprint("Four" if length==4 else "Three")'] | ['Wrong Answer', 'Accepted'] | ['s650448800', 's053186246'] | [2940.0, 2940.0] | [17.0, 17.0] | [112, 112] |
p03424 | u966891144 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["num = int(input())\ndata = input().rstrip().split(' ')\ncount = 0\nif data.count('P') > 0 or data.count('W') > 0 or data.count('G') > 0 or data.count('Y') > 0:\n count++\nprint(count)", "num = int(input())\ndata = input().rstrip().split(' ')\ncount = 0\nif data.count('P') > 0 or data.count('W') > 0 or data.count('G'... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s391921524', 's752492466', 's789957904'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [179, 232, 92] |
p03424 | u969708690 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N=int(input())\nL=list(map(int,input().split()))\nL=set(L)\nif len(L)==4:\n print("Four")\nelse:\n print("Three")', 'N=int(input())\nL=list(input().split())\nL=set(L)\nif len(L)==4:\n print("Four")\nelse:\n print("Three")'] | ['Runtime Error', 'Accepted'] | ['s061182922', 's456469309'] | [9168.0, 9076.0] | [23.0, 28.0] | [109, 100] |
p03424 | u969848070 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["n = int(input())\nk = len(set(map(str, input().split())))\nif k = 4:\n print('Four')\nelse:\n print('Three')\n", "n = int(input())\nk = len(set(map(str, input().split())))\nif k == 4:\n print('Four')\nelse:\n print('Three')"] | ['Runtime Error', 'Accepted'] | ['s283880314', 's089897590'] | [8940.0, 9156.0] | [25.0, 27.0] | [106, 106] |
p03424 | u970198631 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["N = int(input())\nM = set()\nMM = input().split()\nfor i in MM:\n M.add(i)\nprint(len(M))\nif len(M) == 3:\n print('Three')\nelse:\n print('Four')", "N = int(input())\nM = set()\nMM = input().split()\nfor i in MM:\n M.add(i)\n\nif len(M) == 3:\n print('Three')\nelse:\n print('Four')"] | ['Wrong Answer', 'Accepted'] | ['s723140112', 's198536610'] | [9084.0, 9084.0] | [26.0, 27.0] | [140, 127] |
p03424 | u970809473 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["n = int(input())\na = list(map(int, input().split()))\nif a.count('Y') == 0:\n print('Three')\nelse:\n print('Four')", "n = int(input())\na = list(map(str, input().split()))\nif a.count('Y') == 0:\n print('Three')\nelse:\n print('Four')"] | ['Runtime Error', 'Accepted'] | ['s361603688', 's297361778'] | [2940.0, 2940.0] | [18.0, 17.0] | [113, 113] |
p03424 | u972892985 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['n = int(input())\ns = list(input().split())\n\nif len(set(s)) == 3:\n print("Four")\nelse:\n print("Three")\n', 'n = int(input())\ns = list[input().split()]\n\nif len(set(s)) == "Y":\n print("Four")\nelse:\n print("Three")', 'n = int(input())\nfor i in range(n):\n s = input():\n if s == "Y":\n print("Fou... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s518872026', 's602053347', 's945693219', 's484743591'] | [2940.0, 2940.0, 2940.0, 3316.0] | [17.0, 17.0, 17.0, 21.0] | [104, 105, 130, 104] |
p03424 | u975012184 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["n = int(input())\nok = False\nfor i in range(n):\n t = input()\n if(t == 'Y'):\n ok = True\n break\n \nif(ok):\n print('Four')\nelse:\n print('Three')", "n = int(input())\nt = 'Y'\nx = input().split()\n \nif(t in x):\n print('Four')\nelse:\n print('Three')"] | ['Runtime Error', 'Accepted'] | ['s811767624', 's097487923'] | [2940.0, 3064.0] | [17.0, 17.0] | [152, 100] |
p03424 | u977349332 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["N = int(input())\nS = input().split()\n\nfor x in S:\n if x is 'Y'\n \tprint('Four')\n exit()\n else:\n print('Three')", "N = int(input())\nS = list(input().split())\n\nprint('Four' if 'Y' in S else 'Three')"] | ['Runtime Error', 'Accepted'] | ['s327451407', 's280041581'] | [2940.0, 3064.0] | [17.0, 17.0] | [118, 82] |
p03424 | u977642052 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['def main(n, s):\n a = set(s)\n\n if len(a) == 3:\n print(\'Three\')\n elif len(a) == 4:\n print(\'Four\')\n\n\nif __name__ == "__main__":\n n = int(input())\n s = list(map(int, input().split()))\n\n main(n, s)\n', 'def main(n, s):\n a = set(s)\n\n if len(a) == 3:\n print(\... | ['Runtime Error', 'Accepted'] | ['s919772639', 's504486497'] | [2940.0, 2940.0] | [18.0, 17.0] | [225, 215] |
p03424 | u988832865 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["N = int(input())\nS = set(map(int, input().split()))\n\nprint('Three' if len(S) == 3 else 'Four')\n", "N = int(input())\nS = set(input().split())\n\nprint('Three' if len(S) == 3 else 'Four')\n"] | ['Runtime Error', 'Accepted'] | ['s842018768', 's316162435'] | [3316.0, 2940.0] | [19.0, 19.0] | [95, 85] |
p03424 | u993461026 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['N = int(input())\narare = list(map(int, input().rstrip().split()))\ncount = {"P": 0, "W": 0, "G": 0, "Y": 0}\nfor i in range(N):\n cur = arare[i]\n if cur == "P":\n count["P"] += 1\n elif cur == "W":\n count["W"] += 1\n elif cur == "G":\n count["G"] += 1\n else:\n count["Y"] += 1\nprint("Four" if cou... | ['Runtime Error', 'Accepted'] | ['s390431221', 's230849859'] | [3064.0, 3064.0] | [17.0, 17.0] | [331, 315] |
p03424 | u994988729 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ['from collections import Counter\nN=input()\nc = Counter(list(map(int,input().split())))\nif len(c)==4:\n print("Four")\nelse:\n print("Three")', 'N = int(input())\nA = input().split()\n\nif len(set(A)) <= 3:\n print("Three")\nelse:\n print("Four")\n'] | ['Runtime Error', 'Accepted'] | ['s021019725', 's128369381'] | [3316.0, 2940.0] | [20.0, 17.0] | [138, 102] |
p03424 | u999893056 | 2,000 | 262,144 | In Japan, people make offerings called _hina arare_ , colorful crackers, on March 3. We have a bag that contains N hina arare. (From here, we call them arare.) It is known that the bag either contains arare in three colors: pink, white and green, or contains arare in four colors: pink, white, green and yellow. We ha... | ["n = int(input())\n\ns_list = list(input().split())\ns_set = set(s_list)\nanswer = len(list(s_set))\nprint('Four' if answer == 3 else 'Three')", "n = int(input())\n\ns_list = list(input().split())\ns_set = set(s_list)\nanswer = len(list(s_set))\nprint('Four' if answer == 4 else 'Three')"] | ['Wrong Answer', 'Accepted'] | ['s350085829', 's494938109'] | [3060.0, 2940.0] | [19.0, 17.0] | [136, 136] |
p03425 | u000623733 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import itertools\nN = int(input())\n\nnum_dic = {'M': 0, 'A': 0, 'R': 0, 'C': 0, 'H': 0}\nfor i in range(N):\n S = input()\n if S[0] in num_dic.keys():\n num_dic[S[0]] += 1\n\nans = 0\nprint(num_dic)\nfor i, j, k in itertools.combinations(num_dic.keys(), 3):\n ans += num_dic[i] * num_dic[j] * num_dic[... | ['Wrong Answer', 'Accepted'] | ['s301354020', 's576146514'] | [3060.0, 3060.0] | [175.0, 184.0] | [320, 305] |
p03425 | u017415492 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['using System;\nusing static System.Console;\nusing System.Linq;\nusing System.Collections.Generic;\nclass Program\n{\n static void Main(string[] args)\n {\n int n = int.Parse(ReadLine());\n List<string> s = new List<string>();\n \n for (int i=0;i<n;i++)\n {\n s.Add(ReadLine());\n... | ['Runtime Error', 'Accepted'] | ['s778935506', 's752734191'] | [8940.0, 9220.0] | [24.0, 218.0] | [1276, 263] |
p03425 | u023540496 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N = int(input())\n\nlist_pop = [0] * 5\nfor i in range(N):\n s = input()\n if list(s)[0] == 'M':\n list_pop[0] += 1\n if list(s)[0] == 'A':\n list_pop[1] += 1\n if list(s)[0] == 'R':\n list_pop[2] += 1\n if list(s)[0] == 'C':\n list_pop[3] += 1\n if list(s)[0] == 'H':\n ... | ['Wrong Answer', 'Accepted'] | ['s720111898', 's071878213'] | [3064.0, 3444.0] | [378.0, 362.0] | [528, 513] |
p03425 | u027622859 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N = int(input())\ns = [input()[0] for _ in range(N)]\nt = []\nans = 0\nfor k in 'MARCH':\n t.append(s.count(k))\nfor i in range(32):\n u = []\n for j in range(5):\n u.append(t[j])\n if len(u) == 3:\n ans += u[0]*u[1]*u[2]\nprint(ans)", "N = int(input())\ns = [input()[0] for _ in range(N)]\nt... | ['Wrong Answer', 'Accepted'] | ['s380261374', 's941451285'] | [3864.0, 3864.0] | [145.0, 139.0] | [247, 272] |
p03425 | u030726788 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['import sys\nN=int(input())\nS=[]\nfor i in range(N):\n S.append(input()[0])\n \nCount=[]\nCount.append(S.count("M"))\nCount.append(S.count("A"))\nCount.append(S.count("R"))\nCount.append(S.count("C"))\nCount.append(S.count("H"))\n\nZero=Count.count(0)\nif(Zero>=3):print(0)\nelif(Zero==2):\n Count.remove(0)\n... | ['Wrong Answer', 'Accepted'] | ['s095885488', 's061545800'] | [4016.0, 4016.0] | [149.0, 145.0] | [739, 726] |
p03425 | u036340997 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n = int(input())\nmarch = {'m': 0, 'a': 0, 'r': 0, 'c': 0, 'h': 0}\nfor i in range(n):\n s = input()[0]\n try:\n march[s] += 1\n except:\n pass\nans = 0\n\nfor key1 in march.keys():\n for key2 in march.keys():\n if key1 != key2:\n for key3 in march.keys():\n if key3 != key1 and key3 != key2:\... | ['Runtime Error', 'Accepted'] | ['s260690327', 's041562395'] | [3060.0, 3188.0] | [196.0, 241.0] | [350, 382] |
p03425 | u046187684 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['n = int(input().strip())\ns = [input().strip() for _ in range(n)]\nnum = [0 for _ in range(5)]\nnum[0] = len([True for _s in s if _s[0] == "M"])\nnum[1] = len([True for _s in s if _s[0] == "A"])\nnum[2] = len([True for _s in s if _s[0] == "R"])\nnum[3] = len([True for _s in s if _s[0] == "C"])\nnum[4] = len([True for... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s011305958', 's207168321', 's779161061', 's803889605', 's161963818'] | [3064.0, 3060.0, 3064.0, 10520.0, 12468.0] | [17.0, 17.0, 17.0, 170.0, 188.0] | [474, 357, 560, 475, 541] |
p03425 | u059210959 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['#encoding:utf-8\n\nimport math\nimport itertools\n\nn = int(input())\ns = []\nfor i in range(n):\n s.append(str(input()))\n\nchosen_names = {"m":0,"a":0,"r":0,"c":0,"h":0}\n\nfor name in s:\n if name[0] == "M":\n chosen_names["m"] += 1\n elif name[0] == "A":\n chosen_names["a"] += 1\n elif n... | ['Runtime Error', 'Accepted'] | ['s237976779', 's568685789'] | [9800.0, 9908.0] | [195.0, 191.0] | [793, 792] |
p03425 | u061982241 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N = int(input())\nS ="MARCH"\nS2 = [0]*len(S)\nn=0\n\nfor i in range(N):\n s = input()\n for k, j in enumerate(S1):\n if s[0] == j:\n S2[k]+=1\n \nfor i in range(len(S2)):\n for j in range(i+1,len(S2)):\n for k in range(j+1,len(S2)):\n n +=S2[i]*S2[j]*S2[k]\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s049848839', 's210547522', 's540978844'] | [3060.0, 3188.0, 3060.0] | [17.0, 246.0, 275.0] | [313, 314, 312] |
p03425 | u067983636 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N = int(input())\nS = "ACHMR"\ndic = {s:0 for s in S}\nfor _ in range(N):\n s = input()[0]\n if s in S:\n dic[s] += 1\n \n \nres = 0\nfor s0 in S[:3]:\n for s1 in S[1:4]:\n if s0 >= s1:\n continue\n for s2 in S[2:5]:\n if s2 >= s1:\n con... | ['Wrong Answer', 'Accepted'] | ['s586882297', 's967126098'] | [3064.0, 3060.0] | [170.0, 169.0] | [369, 219] |
p03425 | u076917070 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['import sys\ninput=sys.stdin.readline\n\nh = {}\nfor c in "MARCH":\n h[c] = 0\n\nn = int(input())\nfor i in range(n):\n s = input().strip()\n h[s[0]] += 1\n#print(h)\n\nimport itertools\nans = 0\nfor i,j,k in itertools.combinations("MARCH", 3):\n ans += h[i]*h[j]*h[k]\nprint(ans)\n', 'import sys\ninput=sys... | ['Runtime Error', 'Accepted'] | ['s109614976', 's402817562'] | [3060.0, 3060.0] | [62.0, 66.0] | [275, 278] |
p03425 | u077179028 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N=int(input())\nS=list(input().split())\nm,a,r,c,h = 0,0,0,0,0\nfor s in S:\n if 'M' == s[0]:\n m+=1\n elif 'A' == s[0]:\n a+=1\n elif 'R' == s[0]:\n r+=1\n elif 'C' == s[0]:\n c+=1\n elif 'H' == s[0]:\n h+=1\n\nprint(m*a*r + m*a*c + m*a*h + m*r*c + m*r*h + m*c*h + a*r*c + a*r*h + a*c*h + r*c*h)",... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s139043871', 's298942362', 's041104620'] | [3064.0, 3064.0, 9772.0] | [17.0, 17.0, 161.0] | [301, 301, 307] |
p03425 | u077291787 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['# ABC089C - March\nfrom itertools import combinations as comb\n\n\ndef main():\n N, *S = open(0).read().split()\n cnt = [sum(s.startswith(i) for S) for i in "MARCH"]\n ans = sum(x * y * z for x, y, z in comb(cnt, 3))\n print(ans)\n\n\nif __name__ == "__main__":\n main()', '# ABC089C - March\nfrom itert... | ['Runtime Error', 'Accepted'] | ['s728572520', 's043537056'] | [2940.0, 10864.0] | [17.0, 39.0] | [273, 297] |
p03425 | u086503932 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import itertools\nimport math\n\nN = int(input())\nS_list = []\nfor i in range(N):\n S_list.append(input())\n\ncount_M = 0\ncount_A = 0\ncount_R = 0\ncount_C = 0\ncount_H = 0\n\nfor l in S_list:\n if l.startswith('M'):\n count_M += 1\n elif l.startswith('A'):\n count_A += 1\n elif l.startswi... | ['Wrong Answer', 'Accepted'] | ['s712821410', 's682315982'] | [9792.0, 9792.0] | [207.0, 206.0] | [616, 607] |
p03425 | u094191970 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n=int(input())\nd={'M':0,'A':0,'R':0,'C':0,'H':0}\nfor i in range(n):\n s=input()\n if s[0]=='M':\n d['M']+=1\n if s[0]=='A':\n d['A']+=1\n if s[0]=='R':\n d['R']+=1\n if s[0]=='C':\n d['C']+=1\n if s[0]=='H':\n d['H']+=1\n\nans=0\nfor i,j,k in combinations('MARCH',3):\n ans+=d[i]*d[j]*d[k]\n\np... | ['Runtime Error', 'Accepted'] | ['s976747534', 's850287730'] | [9028.0, 9136.0] | [162.0, 164.0] | [308, 344] |
p03425 | u105124953 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import itertools\nn = int(input())\nlis = [input() for _ in range(n)]\nlis.sort()\nchoice = list(itertools.combinations(range(n), 3))\ncount = 0\nfor ch in choice:\n master = set(['M','A','R','C','H'])\n se = set([lis[ch[0]][0],lis[ch[1]][0],lis[ch[2]][0]])\n if len(se) <=2:\n break\n #print(master... | ['Wrong Answer', 'Accepted'] | ['s962829254', 's926586281'] | [1946612.0, 4224.0] | [2235.0, 148.0] | [385, 436] |
p03425 | u106181248 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['n = int(input())\nans = [0]*5\nx = 1\n\nfor i in range(n):\n s = input()\n if s[0] == "M":\n ans[0] = ans[0] + 1\n if s[0] == "A":\n ans[1] = ans[1] + 1\n if s[0] == "R":\n ans[2] = ans[2] + 1\n if s[0] == "C":\n ans[3] = ans[3] + 1\n if s[0] == "H":\n ans[4] = ans... | ['Wrong Answer', 'Accepted'] | ['s447495930', 's389368526'] | [3064.0, 3064.0] | [187.0, 184.0] | [432, 406] |
p03425 | u109133010 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N=int(input())\nm=0\na=0\nr=0\nc=0\nh=0\nfor _ in range(N):\n s=input()\n if s[0]=="M":\n m+=1\n elif s[0]=="A":\n a+=1\n elif s[0]=="R":\n r+=1\n elif s[0]=="C":\n c+=1\n elif s[0]=="H":\n h+=1\nans=0\nans+=m*a*r\nans+=m*a*c\nans+=m*a*h\nans+=a*r*c\nans+=a*r*h\nans+=r*c*h\nprint(ans)', 'N=int(in... | ['Wrong Answer', 'Accepted'] | ['s914846930', 's644821321'] | [3064.0, 3064.0] | [170.0, 170.0] | [281, 325] |
p03425 | u113971909 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N= int(input())\nS = ['M','A','R','C','H']\nC = [0]*5\nfor _ in range(N):\n X = (input())[0]\n if X in S:\n C[S.index(X)] += 1\nprint(C)\n\nfrom itertools import permutations, combinations,combinations_with_replacement,product\nL = list(combinations(range(5), 3)) #nCr\nans = 0\nfor i in L:\n ans += C[i[0]]*C[... | ['Wrong Answer', 'Accepted'] | ['s741647469', 's736502799'] | [3064.0, 3064.0] | [196.0, 193.0] | [329, 319] |
p03425 | u120810144 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['n = int(input())\n\ns = [input() for i in range(n)]\n\norder = "MARCH"\n\ninitial_arary = [name[0] for name in s]\nnums = [initial_array.count(order[i]) for i in range(len(order))]\n\nans = 0\nfor i in range(0, 5):\n for j in range(i+1, 5):\n for k in range(j+1, 5):\n ans += nums[i] * nums[j] * n... | ['Runtime Error', 'Accepted'] | ['s217564682', 's903131242'] | [10520.0, 10520.0] | [134.0, 150.0] | [337, 337] |
p03425 | u125545880 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['import sys\nimport itertools\n\ninput = sys.stdin.readline\n\ndef main():\n common = common_function()\n N = int(input())\n l = [\'M\', \'A\', \'R\', \'C\', \'H\']\n m = [0]*5\n for _ in range(N):\n S = input()[:-1]\n Shead = S[0]\n for i, s0 in enumerate(l):\n if Shead ... | ['Runtime Error', 'Accepted'] | ['s865699900', 's564232495'] | [9072.0, 9148.0] | [22.0, 73.0] | [669, 638] |
p03425 | u133936772 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n=int(input())\nd={'M':0,'A':0,'R':0,'C':0,'H':0}\nfor _ in range(n): d[input()[0]]+=1\nimport itertools as it\nprint(sum(d[s]*d[t]*d[r] for s,t,r in it.combinations('MARCH',3)))", "_,*l=open(0);from itertools import*;print(sum(x*y*z for x,y,z in combinations([sum(c==s[0]for s in l)for c in'MARCH'],3)))"] | ['Runtime Error', 'Accepted'] | ['s884432326', 's258018735'] | [3060.0, 9876.0] | [163.0, 77.0] | [174, 122] |
p03425 | u135116520 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N=int(input())\nS=[list(map(int,input().split())) for i in range(N)]\nm=0\na=0\nr=0\nc=0\nh=0\nfor i in range(N):\n if S[i][0]=="M":\n m+=1\n if S[i][0]=="A":\n a+=1\n if S[i][0]=="R":\n r+=1\n if S[i][0]=="C":\n c+=1\n if S[i][0]=="H":\n h+=1\nprint(m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h... | ['Runtime Error', 'Accepted'] | ['s027660665', 's413587756'] | [3064.0, 9776.0] | [19.0, 196.0] | [313, 310] |
p03425 | u141574039 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['import itertools\nN=int(input())\nS=list(str(input()) for i in range(N))\nm,a,r,c,h=[0]*5\nans=0\nif S[0]=="M":m+=1\nif S[0]=="A":a+=1\nif S[0]=="R":r+=1\nif S[0]=="C":c+=1\nif S[0]=="H":h+=1\n\nx=[m,a,r,c,h]\nfor i in itertools.combinations(x,3):\n ans+=i[0]*i[1]*i[2]\nprint(ans)', 'import itertools\nN=int(input())... | ['Wrong Answer', 'Accepted'] | ['s634699883', 's639273757'] | [9764.0, 9784.0] | [173.0, 207.0] | [268, 317] |
p03425 | u143212659 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport itertools\n\n\ndef main():\n N = int(input())\n S = [input()[0] for _ in range(N)]\n\n result = []\n for comb in list(itertools.combinations(S, 3)):\n if comb[0] != comb[1] and comb[0] != comb[2] and comb[1] != comb[2]:\n result.a... | ['Wrong Answer', 'Accepted'] | ['s185283466', 's352364069'] | [1966288.0, 3060.0] | [2230.0, 160.0] | [381, 421] |
p03425 | u143509139 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["one = {'M':0, 'A':0, 'R':0, 'C':0, 'H':0}\nn=int(input())\nfor i in range(n):\n one[input()[0]] += 1\nm,a,r,c,h=one['M'],one['A'],one['R'],one['C'],one['H']\nprint(m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h)", "one = {'M':0, 'A':0, 'R':0, 'C':0, 'H':0}\nn=int(input())\nfor i in range(n):\n c=input(... | ['Runtime Error', 'Accepted'] | ['s799719470', 's563672083'] | [3064.0, 3064.0] | [156.0, 176.0] | [220, 238] |
p03425 | u152638361 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['5\nCHOKUDAI\nRNG\nMAKOTO\nAOKI\nRINGO', 'import collections\nN = int(input())\nS = [input() for i in range(N)]\nprint(S)\nSI = [S[i][0] for i in range(N)]\ncnt = collections.Counter(SI)\nn = [cnt["M"],cnt["A"],cnt["R"],cnt["C"],cnt["H"]]\nans = 0\nfor i in range(3):\n for j in range(i+1,5):\n for k in range... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s787989405', 's867516766', 's921754541'] | [2940.0, 13432.0, 10880.0] | [18.0, 166.0, 152.0] | [32, 318, 311] |
p03425 | u163320134 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n=int(input())\ncnt=[0]*5\ncheck='MARCH'\nfor i in range(n):\n s=input()\n for j in range(5):\n if s[0]==check[j]:\n cnt[j]+=1\n break\nans=0\nfor i in range(5):\n for j in range(i+1,5):\n for k in range(j+1,5):\n ans+=cnt[i]*cnt[j]*cnt[k]", "n=int(input())\ncnt=[0]*5\ncheck='MARCH'\nfor i in ... | ['Wrong Answer', 'Accepted'] | ['s522815474', 's487097192'] | [3064.0, 3064.0] | [251.0, 258.0] | [250, 261] |
p03425 | u167681750 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N = int(input())\nS = [input() for i in range(N)]\nmarch = {"M":0, "A":0, "R":0, "C":0, "H":0}\n\nfor i in S:\n if i[0] in march:\n march[i[0]] += 1\n\nans = 0\nfor first, second, third in combinations(march.values(), 3):\n ans += first * second * third\n\nprint(ans)', 'from itertools import combinations... | ['Runtime Error', 'Accepted'] | ['s497236889', 's107452470'] | [9752.0, 9772.0] | [163.0, 157.0] | [268, 304] |
p03425 | u180058306 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['\nN = int(input())\n\nS = [input() for _ in range(N)]\n\nword = "MARCH"\n\nn = len(word)\n\ndic_initial = dict()\nfor letter in word:\n dic_initial[letter] = 0\n\nfor i in range(N):\n \n if S[i][0] in dic_initial:\n \n dic_initial[S[i][0]] += 1\n\nans = 0\n\nfor p in range(n - 2):\n \n nu... | ['Runtime Error', 'Accepted'] | ['s135415430', 's431530066'] | [9772.0, 9776.0] | [174.0, 163.0] | [1254, 1296] |
p03425 | u185896732 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n=int(input())\nm=a=r=c=h=0\nls\nfor i in range(n):\n s=input()\n if s[0]=='M':\n m+=1\n elif a[0]=='A':\n a+=1\n elif a[0]=='R':\n r+=1\n elif a[0]=='C':\n c+=1\n elif a[0]=='H':\n h+=1\nprint(m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*r*h+a*c*h+r*c*h)", "n=int(i... | ['Runtime Error', 'Accepted'] | ['s684791579', 's111255317'] | [3188.0, 3064.0] | [18.0, 167.0] | [292, 289] |
p03425 | u190555868 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N = input()\n\nd = {'M':0,'A':0,'R':0,'C':0,'H':0}\n\nfor i in range(N):\n s = input()\n if s[0] in 'MARCH':\n d[s[0]]+=1\n\nv = list(d.values())\nans = 0\n\nfor i in range(5):\n for j in range (i+1,5):\n for k in range (j+1,5):\n ans += v[i]*v[j]*v[k]\n\nprint(ans)", "N = input()\n\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s673087159', 's943439673', 's598071925'] | [3064.0, 3064.0, 3064.0] | [18.0, 18.0, 174.0] | [283, 283, 288] |
p03425 | u212328220 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import itertools\nn = int(input())\nsl = []\n\ndic = {'M':0,'A':0,'R':0,'C':0,'H':0}\nfor i in range(n):\n name = input()\n if name[0] in dic:\n dic[name[0]] += 1\n\nlst = []\nfor com in itertools.combinations(dic.keys(),3):\n lst.append(com)\nprint(lst)\n\nans = 0\nfor v in lst:\n ans += dic[v[0]]... | ['Wrong Answer', 'Accepted'] | ['s600356998', 's524826846'] | [3064.0, 3064.0] | [169.0, 174.0] | [336, 325] |
p03425 | u222634810 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N = int(input())\nM = []\nA = []\nR = []\nC = []\nH = []\n\nfor i in range(N):\n temp = input()\n init_temp = list(temp)\n if 'M' == init_temp[0]:\n M.append(temp)\n elif 'A' == init_temp[0]:\n A.append(temp)\n elif 'R' == init_temp[0]:\n R.append(temp)\n elif 'C' == init_temp[0... | ['Wrong Answer', 'Accepted'] | ['s426747302', 's481008651'] | [16020.0, 16016.0] | [261.0, 248.0] | [745, 746] |
p03425 | u223904637 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n=int(input())\nal=list('MARCH')\nd=[0]*5\nfor i in range(n):\n s=list(input())\n if s[0] in al:\n d[al.index(s[0])]+=1\nop=[[0],[1]]\nfor i in range(4):\n tmp=[]\n for j in op:\n j.append(0)\n tmp.append(j)\n j.pop(-1)\n j.append(1)\n tmp.append(j)\n op=tmp\nk... | ['Wrong Answer', 'Accepted'] | ['s061909641', 's956897979'] | [3064.0, 3064.0] | [261.0, 258.0] | [479, 501] |
p03425 | u226108478 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["if __name__ == '__main__':\n people_count = int(input())\n\n person_name = list()\n\n for person in range(people_count):\n person_name.append(str(input()))\n\n initial_strings = list()\n\n for name in person_name:\n initial_strings.append(name[0])\n\n mod_initial_strings = set(initial_... | ['Runtime Error', 'Accepted'] | ['s764443138', 's818982608'] | [10520.0, 3064.0] | [195.0, 173.0] | [744, 1032] |
p03425 | u247211039 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N=int(input())\nS=[input() for _ in range(N)]\n\ncnt=[]\nans=0\nfor i in range(N):\n if S[i][0]=='M':\n cnt.append('M')\n elif S[i][0]=='A':\n cnt.append('A')\n elif S[i][0]=='R':\n cnt.append('R')\n elif S[i][0]=='C':\n cnt.append('C')\n elif S[i][0]=='H':\n cnt.appe... | ['Wrong Answer', 'Accepted'] | ['s824196798', 's305623491'] | [1869524.0, 16968.0] | [2271.0, 178.0] | [504, 538] |
p03425 | u257350577 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import itertools\nletters = ['M','A','R','C','H']\nN = int(input())\na = []\ncom_s = []\n\nfor i in range(N):\n x = input()\n if x[0] in letters:\n a.append(x)\n\ncoms = list(itertools.combinations(a,3))\nfor com in coms:\n if com[0][0] != com[1][0] and com[1][0] != com[2][0] and com[2][0] != com[0]co... | ['Runtime Error', 'Accepted'] | ['s017946293', 's869765064'] | [3060.0, 10208.0] | [17.0, 165.0] | [355, 465] |
p03425 | u267325300 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['from functools import reduce\nfrom itertools import combinations\nN = int(input())\nS = {"M": [], "A": [], "R": [], "C": [], "H": []}\nfor _ in range(N):\n i = input()\n head = i[0]\n if head == "M":\n S["M"].append(i)\n elif head == "A":\n S["A"].append(i)\n elif head == "R":\n S[... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s122872997', 's908290664', 's924053957'] | [10724.0, 14812.0, 10720.0] | [175.0, 203.0, 176.0] | [611, 621, 595] |
p03425 | u273038590 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['n=int(input())\ns=list(input() for i in range(n))\nm=[]\na=[]\nr=[]\nc=[]\nh=[]\nans=1\nfor i in range(n):\n if s[i][0] == "M" and not s[i] in m:\n m.append(s[i])\n elif s[i][0] == "A" and not s[i] in a:\n a.append(s[i])\n elif s[i][0] == "R" and not s[i] in r:\n r.append(s[i])\n elif... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s105433474', 's408115642', 's464147436', 's598716921', 's531738043'] | [10164.0, 10012.0, 3064.0, 3064.0, 9764.0] | [2112.0, 2104.0, 17.0, 17.0, 189.0] | [637, 540, 614, 563, 489] |
p03425 | u276204978 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import numpy as np\nfrom itertools\nfrom functools import reduce\nfrom collections import defaultdict\n\nN = int(input())\nd = defaultdict(int)\nfor i in range(N):\n c = input()\n if c[0] in ('M', 'A', 'R', 'C', 'H'):\n d[c[0]] += 1\n\nl = len(d)\nif l < 3:\n print(0)\nelse:\n ans = 0\n for l in... | ['Runtime Error', 'Accepted'] | ['s759112335', 's911270013'] | [8756.0, 27108.0] | [21.0, 225.0] | [399, 409] |
p03425 | u289288647 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N = int(input())\nname = [0]*5\nans = 0\nfor i in range(N):\n a = input()\n if a[0] == 'M': name[0] += 1\n elif a[0] == 'A': name[1] += 1\n elif a[0] == 'R': name[2] += 1\n elif a[0] == 'C': name[3] += 1\n elif a[0] == 'H': name[4] += 1\nif sum(name) < 3:\n print(0)\nelse:\n for i in combinati... | ['Runtime Error', 'Accepted'] | ['s968775339', 's750259471'] | [9132.0, 9200.0] | [153.0, 153.0] | [365, 400] |
p03425 | u301624971 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import itertools\ndef myAnswer(N:int,S:list) -> int:\n ans = 0\n dic = {}\n for s in S:\n if(s[0] in dic.keys()):\n dic[s[0]] += 1\n else:\n dic[s[0]] = 1\n for c in itertools.combinations(dic.values(),3):\n ans += c[0]*c[1]*c[2]\n \n return ans\n\ndef modelAnswer():\n ... | ['Wrong Answer', 'Accepted'] | ['s940624768', 's578471999'] | [10540.0, 10540.0] | [168.0, 168.0] | [440, 427] |
p03425 | u305366205 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["s = [input() for _ in range(n)]\nprefix = ['M', 'A', 'R', 'C', 'H']\ncnt = [0] * 5\nans = 0\nfor i in range(n):\n for j in range(5):\n if s[i][0] == prefix[j]:\n cnt[j] += 1\nfor i in range(2 ** 5):\n flag = [False] * 5\n for j in range(5):\n if (i >> j) & 1:\n flag[j] = T... | ['Runtime Error', 'Accepted'] | ['s833970256', 's649200801'] | [3064.0, 9752.0] | [17.0, 250.0] | [466, 483] |
p03425 | u308241789 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["N = int(input())\nA = []\nfor i in range(N):\n A.append(input())\nk = 0\nc = [ 0,0,0,0,0]\nfor i in A:\n if i[0] == 'm':\n c[0] += 1\n if i[0] == 'a':\n c[1] += 1\n if i[0] == 'r':\n c[2] += 1\n if i[0] == 'c':\n c[3] += 1\n if i[0] == 'h':\n c[4] += 1\n\nprint(c)\nif not c.count(0) >= 3:\n k ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s061975952', 's220385003', 's292189147', 's547471288'] | [9780.0, 2940.0, 9776.0, 9772.0] | [172.0, 17.0, 185.0, 183.0] | [519, 482, 519, 511] |
p03425 | u318029285 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N = int(input())\ns = [0] * N\nd = {"M": 0, "A": 0, "R": 0, "C": 0, "H": 0}\nfor i in range(N):\n s[i] = input()\n if s[i][0] == "M":\n d[\'M\'] += 1\n elif s[i][0] == "A":\n d[\'A\'] += 1\n elif s[i][0] == "R":\n d[\'R\'] += 1\n elif s[i][0] == "C":\n d[\'C\'] += 1\n eli... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s667085785', 's980630678', 's326425579'] | [9716.0, 4224.0, 4224.0] | [192.0, 146.0, 140.0] | [898, 295, 285] |
p03425 | u340781749 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["from collections import Counter\nfrom itertools import combinations\n\nn = int(input())\nl = Counter(input()[0] for _ in range(n))\ncon = [l[c] for c in 'MARCH' if c in l]\nprint(sum(a * b * c) for a, b, c in combinations(con, 3))\n", "from collections import Counter\nfrom itertools import combinations\n\nn = int(inp... | ['Wrong Answer', 'Accepted'] | ['s191668372', 's269363981'] | [3316.0, 3316.0] | [166.0, 161.0] | [225, 225] |
p03425 | u350049649 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N=int(input())\nS=set()\n\nfor i in range(N):\n s=input()\n if s[0] in [M,A,R,C,H]:\n S.add(s)\n\nL=len(S)\n\nprint(L*(L-1)*(L-2)//6)', "N=int(input())\nS=set()\n\nfor i in range(N):\n s=input()\n if s[0] in ['M','A','R','C','H']:\n S.add(s)\n\nL=len(S)\n\nprint(L*(L-1)*(L-2)//6)\n", "N=int(input())\nchars=... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s256175522', 's755669638', 's276853698'] | [3060.0, 14316.0, 3064.0] | [18.0, 174.0, 173.0] | [128, 139, 383] |
p03425 | u365858785 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['a=int(input())\nlis=[input()[0] for i in range(a)]\nlis2=[0,0,0,0,0]\ndellist=[]\nfor m in lis:\n if m=="M":\n lis2[0]+=1\n elif m=="A":\n lis2[1]+=1\n elif m=="R":\n lis2[2]+=1\n elif m=="C":\n lis2[3]+=1\n elif m=="H":\n lis2[4]+=1\na=sum(lis2)\nprint(lis2,a)\ndef c3(a):\n return a*(a-1)*(a-2)/... | ['Wrong Answer', 'Accepted'] | ['s616667859', 's663124775'] | [3992.0, 3888.0] | [156.0, 155.0] | [404, 390] |
p03425 | u367130284 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['from itertools import*;print(sum(p*q*r for p,q,r in combinations([list(s[0]for s in open(0).readlines()).count(s)for s in"MARCH"],3)))', 'import itertools as i,collections as c;print(sum(p*q*r for p,q,r in i.combinations(c.Counter(s[0]*(s[0]in"MARCH")for s in open(0).readlines()[1:]).values(),3)))\n', 'from itertools... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s791966041', 's828055897', 's928514879', 's969276548'] | [10748.0, 11004.0, 10664.0, 10992.0] | [36.0, 55.0, 56.0, 41.0] | [134, 161, 154, 133] |
p03425 | u368796742 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['n = int(input())\nl = [0]*5\nfor i in range(n):\n if input()[0] == "M":\n l[0] += 1\n elif input()[0] == "A":\n l[1] += 1\n elif input()[0] == "R":\n l[2] += 1\n elif input()[0] == "C":\n l[3] += 1\n elif input()[0] == "H":\n l[4] += 1\nans = 0\nfor i in range(3):\n for j in range(i+1,4):\n fo... | ['Runtime Error', 'Accepted'] | ['s475500459', 's776933343'] | [3064.0, 3064.0] | [161.0, 168.0] | [367, 406] |
p03425 | u375500286 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['n=int(input())\ns={"M":0,"A":0,"R":0,"C":0,"H":0}\nfor i in range(n):\n v=input()\n if v[0] in s:\n s[v[0]]+=1\nl=s.values()\nsum=0\nfor a in range(5):\n for b in range(a+1,5):\n for c in range(b+1,5):\n sum+=l[a]*l[b]*l[c] \nprint(sum)', 'n=int(input())\ns={"M":0,"A":0,"R":0... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s024640891', 's122223341', 's876972281', 's002893175'] | [3064.0, 3064.0, 3188.0, 3064.0] | [167.0, 174.0, 173.0, 164.0] | [266, 282, 313, 273] |
p03425 | u388323466 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["# n = int(input())\n# arr = []\n\n# arr += [list(input())]\nn = 5\narr = [['Z','H'],['Z','N'],['Z','A'],['Z','O'],['Z','I']]\n\nMARCH = [0] * 5 \n \nfor j in range(n):\n if arr[j][0] == 'M':\n MARCH[0] += 1\n elif arr[j][0] == 'A':\n MARCH[1] += 1\n elif arr[j][0] == 'R':\n MAR... | ['Wrong Answer', 'Accepted'] | ['s948716802', 's341056719'] | [3064.0, 20304.0] | [18.0, 316.0] | [820, 748] |
p03425 | u401686269 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["from collections import defaultdict\nfrom itertools import combinations\n\nN=int(input())\nS=[input() for _ in range(N)]\n\nc = defaultdict(int)\n\nfor i in range(N):\n if S[i][0] in {'M','A','R','C','H'}:\n c[S[i][0]] += 1\n\nif len(c) < 3:\n print(0)\n exit()\n\nif len(c)==3:\n ans=0\n for k in c.keys():\n ... | ['Wrong Answer', 'Accepted'] | ['s289957164', 's332755646'] | [16408.0, 16472.0] | [158.0, 149.0] | [506, 506] |
p03425 | u411923565 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["#60 C - March\nimport collections\nN = int(input())\nS = [input() for _ in range(N)]\nS = [s[0] for s in S if s[0] == 'M' or s[0] == 'A' or s[0] == 'R' or s[0] == 'C' or s[0] == 'H']\n\ncnt = collections.Counter(S)\nn = len(cnt)\n\nans = ((n*(n-1)*(n-2))//(3*2))\nif ans == 1:\n for i in cnt.values():\n if i... | ['Wrong Answer', 'Accepted'] | ['s571880291', 's778441072'] | [16992.0, 17196.0] | [146.0, 148.0] | [450, 341] |
p03425 | u413165887 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['from collections import Counter\nn = int(input())\ns = [input() for _ in range(n)]\nname_count = [0 for _ in range(5)]\nfor i in s:\n if i[0] == "M":\n name_count[0] += 1\n elif i[0] == "A":\n name_count[1] += 1\n elif i[0] == "R":\n name_count[2] += 1\n elif i[0] == "C":\n nam... | ['Wrong Answer', 'Accepted'] | ['s112658041', 's858277645'] | [10112.0, 10108.0] | [175.0, 167.0] | [483, 539] |
p03425 | u417835834 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["import collections\nN = int(input())\na = ['']*N\nfor i in range(N):\n a[i] = list(input())[0]\nprint(a)\nc_list = [0]*5\nMARCH = ['M','A','R','C','H']\nc_list = [a.count(i) for i in MARCH]\nprint(c_list)\nsummation = 0\nfor i in range(3):\n for j in range(i+1,4):\n for k in range(j+1,5):\n su... | ['Wrong Answer', 'Accepted'] | ['s017613072', 's744396944'] | [5616.0, 4084.0] | [222.0, 225.0] | [361, 338] |
p03425 | u426108351 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N = int(input())\nS = []\nfor i in range(N):\n S.append(input())\nmarch = [0, 0, 0, 0, 0]\n\nfor i in range(N):\n if S[i][0] == "M":\n march[0] += 1\n if S[i][0] == "A":\n march[1] += 1\n if S[i][0] == "R":\n march[2] += 1\n if S[i][0] == "C":\n march[3] += 1\n if S[i][0]... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s790133078', 's942412057', 's732815511'] | [9772.0, 9772.0, 9772.0] | [200.0, 202.0, 193.0] | [495, 495, 482] |
p03425 | u440129511 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["from itertools import combinations as c\nn=int(input())\ns=[input() for _ in range(n)]\nm=[m1 for m1 in s if s.startswith('M')]\na=[a1 for a1 in s if s.startswith('A')]\nr=[r1 for r1 in s if s.startswith('R')]\nc=[c1 for c1 in s if s.startswith('C')]\nh=[h1 for h1 in s if s.startswith('H')]\nmarch=[len(m),len(a),len(... | ['Runtime Error', 'Accepted'] | ['s500804036', 's204830307'] | [9776.0, 9776.0] | [137.0, 174.0] | [372, 328] |
p03425 | u444856278 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ['N = int(input())\nS = {"M":0,"A":0,"R":0,"C":0,"H":0}\nfor i in range(N):\n s = input()\n if s[0] in ["M","A","R","C","H"]\n S[s[0]] += 1\n\nprint(S["M"] * S["A"] * (S["R"]+S["C"]+S["H"]) + S["M"] * S["R"] * (S["C"] + S["H"]) + S["M"] * S["C"] * S["H"] + S["A"] * S["R"] * (S["C"] + S["H"]) + S["C"] * S["... | ['Runtime Error', 'Accepted'] | ['s828931161', 's680705272'] | [2940.0, 3064.0] | [17.0, 175.0] | [353, 387] |
p03425 | u451017206 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n = int(input())\nl = ['M','A','R','C','H']\nm = []\na = []\nr = []\nc = []\nh = []\nfor i in range(n):\n s = input()\n if not s[0] in l: continue\n if s[0] == 'M':\n m.append(s)\n elif s[0] == 'A':\n a.append(s)\n elif s[0] == 'R':\n r.append(s)\n elif s[0] == 'C':\n c.a... | ['Wrong Answer', 'Accepted'] | ['s433250686', 's569569041'] | [10612.0, 10228.0] | [183.0, 180.0] | [606, 603] |
p03425 | u470542271 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["n = int(input())\ns_ = [input() for i in range(n)]\n\ns_list = [0, 0, 0, 0, 0]\nfor i in range(n):\n if s_[i][0] == 'M':\n s_list[0] += 1\n elif s_[i][0] == 'A':\n s_list[1] += 1\n elif s_[i][0] == 'R':\n s_list[2] += 1\n elif s_[i][0] == 'C':\n s_list[3] += 1\n elif s_[i][0... | ['Wrong Answer', 'Accepted'] | ['s843270487', 's398871270'] | [9832.0, 9784.0] | [180.0, 174.0] | [1557, 1645] |
p03425 | u475675023 | 2,000 | 262,144 | There are N people. The name of the i-th person is S_i. We would like to choose three people so that the following conditions are met: * The name of every chosen person begins with `M`, `A`, `R`, `C` or `H`. * There are no multiple people whose names begin with the same letter. How many such ways are there to ch... | ["from itertools import combinations\nn=int(input())\ns=[input()[0] for _ in range(n)]\na=[]\nfor i in ['M','A','R','C','H']:\n a+=[s.count(i)]\nprint(a)\nans=0\nfor i in combinations(a,3):\n ans+=i[0]*i[1]*i[2]\nprint(ans)", "from itertools import combinations\nn=int(input())\ns=[input()[0] for _ in range(n)]\na=[]\... | ['Wrong Answer', 'Accepted'] | ['s410119233', 's321227338'] | [3888.0, 3888.0] | [142.0, 141.0] | [213, 204] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.