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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02676 | u949237528 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['K=int(input())\nS=input()\nprint(S if len(S)<=K else S[0:K]+"."*(len(S)-K)) ', 'K=int(input())\nS=input()\nprint(S if len(S)<=K else S[0:K]+"."*3) '] | ['Wrong Answer', 'Accepted'] | ['s594581961', 's089047684'] | [9076.0, 9104.0] | [23.0, 24.0] | [74, 65] |
p02676 | u956318161 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['k=int(input())\ns=list(input())\nss=("").join(s)\nS=len(s)\nif S<=k:\n print(ss)\nelse:\n print(ss+("..."))', 'k=int(input())\ns=list(input())\nss=("").join(s)\nS=len(s)\nsss=("").join(s[0:k])\nif S<=k:\n print(ss)\nelse:\n print(sss+("..."))'] | ['Wrong Answer', 'Accepted'] | ['s950931219', 's717235684'] | [9144.0, 9100.0] | [27.0, 26.0] | [102, 125] |
p02676 | u957872856 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['k = int(input())\nS = input()\nif len(S) > K:\n print(S[:K]+"...")\nelse:\n print(S)\n', 'k = int(input())\nS = input()\nif len(S) > K:\n print(S[:K])\nelse:\n print(S)', 'K = int(input())\nS = input()\nif len(S) > K:\n print(S[:K])\nelse:\n print(S)\n', 'K = int(input())\nS = input()\nif len(S) > K:\n print(S... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s093053375', 's471184548', 's708936743', 's239570756'] | [9024.0, 9156.0, 9140.0, 9160.0] | [25.0, 23.0, 26.0, 23.0] | [82, 75, 76, 82] |
p02676 | u963747475 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["s=input()\nk=int(input())\nif len(s)> k:\n print(s[:k]+'...')\nif len(s)<=k:\n print(s)", "k=int(input())\ns=input()\nif len(s)> k:\n print(s[:k]+'...')\nif len(s)<=k:\n print(s)\n"] | ['Runtime Error', 'Accepted'] | ['s026566443', 's841721974'] | [9160.0, 9156.0] | [22.0, 22.0] | [84, 85] |
p02676 | u967359881 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['k=int(input())\ns=input()\nif len(s)==k:\n print(s)\nelse:\n print(s[:k+1]+"...")\n ', 'k=int(input())\ns=input()\nif len(s)<=k:\n print(s)\nelse:\n print(s[:k]+"...")\n'] | ['Wrong Answer', 'Accepted'] | ['s241490627', 's548573180'] | [9156.0, 9156.0] | [24.0, 23.0] | [81, 77] |
p02676 | u967484343 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['K = int(input())\nS = input()\nans = ""\nif K >= len(S):\n print(S)\nelse:\n for i in range(K):\n ans += S[i]\n print(ans + "…")', 'K = int(input())\nS = input()\nans = ""\nif K >= len(S):\n print(S)\nelse:\n for i in range(K):\n ans += S[i]\n print(ans + "...")'] | ['Wrong Answer', 'Accepted'] | ['s719897997', 's267110105'] | [9128.0, 9064.0] | [24.0, 30.0] | [138, 138] |
p02676 | u969483761 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['S=input()\nK=int(input())\n\nif len(S) <= K:\n print(S)\nelse :\n print(S[0:K]+"...")', 'K=int(input())\nS=input()\n\nif len(S) <= K:\n print(S)\nelse :\n print(S[0:K]+"...")'] | ['Runtime Error', 'Accepted'] | ['s848312652', 's066768295'] | [9172.0, 9192.0] | [21.0, 20.0] | [85, 85] |
p02676 | u973972117 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["S = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K]+'...')", "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K]+'...')"] | ['Runtime Error', 'Accepted'] | ['s429710140', 's297552331'] | [9032.0, 9160.0] | [19.0, 22.0] | [70, 87] |
p02676 | u974485376 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['k = int(input())\ns = input()\nif len(s) <= k:\n print(s)\nelse:\n print(s[:k])\n', 'm = int(input())\nk = input()\nif len(k) <= m:\n print(k)\nelse:\n print(k[:m])\n', "k = int(input())\ns = input()\nif len(s) <= k:\n print(s)\nelse:\n print(s[:k]+'...')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s222213902', 's700302067', 's332285058'] | [8996.0, 9128.0, 9092.0] | [33.0, 26.0, 25.0] | [81, 81, 87] |
p02676 | u974918235 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['K, S = int(input()), input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + ...)', 'K, S = int(input()), input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + "...")'] | ['Runtime Error', 'Accepted'] | ['s737938733', 's878984110'] | [9168.0, 8836.0] | [29.0, 29.0] | [82, 84] |
p02676 | u977650778 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["a = int(input())\nb = input()\nif len(b) < a:\n print(b[:a]+'...')\nelse:\n print(b)", "a = int(input())\nb = input()\nif len(a) < b:\n print(b[:a]+'...')\nelse:\n print(b)", "a = int(input())\nb = input()\nif len(b) > a:\n print(b[:a]+'...')\nelse:\n print(b)"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s564403397', 's914447144', 's347595403'] | [9168.0, 9164.0, 9168.0] | [21.0, 21.0, 23.0] | [85, 85, 85] |
p02676 | u982591663 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['K = int(input())\nS = input()\nlen_S = len(S)\n\nif len_S <= K:\n print(S)\nelse:\n ans = S[:K+1]\n print(ans+"...")\n', 'K = int(input())\nS = input()\nlen_S = len(S)\n\nif len_S <= K:\n print(S)\nelse:\n ans = S[:K]\n print(ans+"...")\n'] | ['Wrong Answer', 'Accepted'] | ['s870843982', 's795473001'] | [9160.0, 9160.0] | [21.0, 24.0] | [118, 116] |
p02676 | u983967747 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['k = int(input())\ns = input()\nans = ""\nif(k<len(s)):\n ans += s[0:k]\n ans += ans.ljust(len(s),\'.\')\nelse:\n ans+=s[0:k]\n\nprint(ans)\n', 'k = int(input())\ns = input()\nans = ""\nif(k<len(s)):\n ans += s[0:k]\n ans.ljust(len(s)-k,\'.\')\nelse:\n ans+=s[0:k]\n\nprint(ans)\n', 'k = int(input())\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s377535227', 's534542385', 's461314586'] | [9180.0, 9176.0, 9172.0] | [21.0, 22.0, 22.0] | [137, 132, 121] |
p02676 | u987549444 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["from sys import stdin\nimport math\na=int(stdin.readline())\nb=stdin.readline()\n\nif len(b)<=a:\n print(b)\nelse:\n for k in range(0,a):\n print(b[k],end='')\n print('...',end='')", "from sys import stdin\n\na=int(stdin.readline())\nb=stdin.readline()\n\nif len(b)-1<=a:\n print(b)\nelse:\n b=b[... | ['Wrong Answer', 'Accepted'] | ['s493347166', 's445093932'] | [9180.0, 9168.0] | [21.0, 21.0] | [186, 140] |
p02676 | u987637902 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['K = int(input())\nS = input()\na = len(S)\nif a <= K:\n print(S)\nelse:\n print(str(S[0:K]))\n', "# ABC168\n# B (Triple Dots)\nK = int(input())\nS = input()\na = len(S)\nif a <= K:\n print(S)\nelse:\n print(str(S[0:K])+'...')\n"] | ['Wrong Answer', 'Accepted'] | ['s906588125', 's153986101'] | [9060.0, 9156.0] | [26.0, 26.0] | [93, 126] |
p02676 | u996996256 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["k = int(input())\nn = input()\nif len(n)>k:\n print(n+'...')\nelse:\n print(n)", "k = int(input())\nn = input()\nif len(n)>k:\n print(n[:k]+'...')\nelse:\n print(n)"] | ['Wrong Answer', 'Accepted'] | ['s546074371', 's414123089'] | [9160.0, 9164.0] | [22.0, 22.0] | [79, 83] |
p02676 | u997036872 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["n = int(input())\na = input()\nif len(a) > n:\n print(a[0:n+1]+'...')\nelse:\n print(a )", "n = int(input())\na = input()\nif len(a) > n:\n print(a[0:n+1])\nelse:\n print(a +'...')", 'n = int(input())\na = input()\nif len(a) > n:\n print(a[0:n+1])\nelse:\n print(a)', "n = int(input())\na = input()\nif len(a) > ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s123876477', 's606562058', 's971218982', 's000646644'] | [9072.0, 9160.0, 9180.0, 9148.0] | [22.0, 22.0, 21.0, 23.0] | [85, 85, 78, 83] |
p02676 | u999799597 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ['k = int(input())\ns = input()\nif len(s) > k:\n print (s[: k + 1] + "...")\nelse:\n print(s)\n', 'k = int(input())\ns = input()\nif len(s) > k:\n print (s[: k] + "...")\nelse:\n print(s)'] | ['Wrong Answer', 'Accepted'] | ['s781641041', 's913084326'] | [9064.0, 9160.0] | [27.0, 27.0] | [94, 89] |
p02676 | u999983491 | 2,000 | 1,048,576 | We have a string S consisting of lowercase English letters. If the length of S is at most K, print S without change. If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result. | ["K = int(input())\nS = input()\nif len(S) > K:\n print(S[:-K+1] + '...')\nelse:\n print(S)", "K = int(input())\nS = input()\nif len(S) > K:\n print(S[:K] + '...')\nelse:\n print(S)\n"] | ['Wrong Answer', 'Accepted'] | ['s210896679', 's904685964'] | [9160.0, 9160.0] | [22.0, 22.0] | [90, 88] |
p02677 | u026862065 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ["import math\n\na, b, h, m = map(int, input().split())\nl = m * 6\ns = m * 0.5 + h * 30\nth = abs(l - s)\nif th == 0:\n print(abs(a - b))\n #print('{:.20f}'.format(abs(a - b)))\n exit()\nelif th == 180:\n print(a + b)\n #print('{:.20f}'.format(a + b))\n exit()\nif th >= 180:\n th -= 180\ncos = mat... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s027026235', 's256938239', 's942149631'] | [9520.0, 9464.0, 9352.0] | [23.0, 24.0, 26.0] | [418, 374, 364] |
p02677 | u146967091 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ["import sys\nimport math\n\ninput = sys.stdin.readline\nsys.setrecursionlimit(4100000)\n\n\ndef main():\n A, B, H, M = map(int, input().rstrip().split())\n theta_m = 2 * math.pi * M / 60\n theta_h = 2 * math.pi * (H * 60 + M) / (12 * 60)\n theta = (theta_h - theta_m) % math.pi\n ans = math.sqrt(A ** 2 +... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s039514293', 's254420108', 's780191803', 's952411053'] | [9492.0, 9424.0, 9468.0, 9476.0] | [22.0, 26.0, 24.0, 24.0] | [455, 461, 547, 532] |
p02677 | u197868423 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ["import sys\nimport math\n\ndef resolve():\nA, B, H, M = map(int, sys.stdin.readline().split())\ntheta = (H * 30 + M * 0.5) - (M * 6)\nans = math.sqrt((A**2 + B**2) - (2 * A * B) * math.cos(math.radians(theta)))\nprint('{:.20f}'.format(ans))", "import sys\nimport math\n\nA, B, H, M = map(int, sys.stdin.readline().spl... | ['Runtime Error', 'Accepted'] | ['s450754719', 's587762491'] | [8940.0, 9428.0] | [25.0, 24.0] | [234, 219] |
p02677 | u210882514 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\n\nInp = input()\nList = Inp.split(" ")\nA = int(List[0])\nB = int(List[1])\nH = int(List[2])\nM = int(List[3])\n\nDegA = int(H*30 + M*0.5)\nDegB = int(M*6)\n\n \n\nDeg =abs(DegA - DegB)\n\nC = (A**2 + B**2 - 2*B*A*math.cos(math.radians(Deg)))**0.5\n\nprint(format(C,\'.10f\'))', 'import math\n\nInp = in... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s585426320', 's949580452', 's534495785'] | [9484.0, 9556.0, 9524.0] | [23.0, 25.0, 22.0] | [430, 402, 452] |
p02677 | u218757284 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\na, b, h, m = map(int, input().split())\n\nangle_m = 6 * m\nangle_h = 30 * h + 0.5 * m\nangle = abs(angle_m - angle_h)\nif angle >= 180:\n angle -= 180\n\nans = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(angle)))\nprint(ans)', 'import math\na, b, h, m = map(int, input().split())\n\nangle_m = 6 * m... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s162386037', 's892574537', 's756461920'] | [9388.0, 9504.0, 9516.0] | [23.0, 21.0, 23.0] | [234, 233, 258] |
p02677 | u307615746 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\n\ndef main() :\n A, B, H, M = list(map(int, input().split()))\n\n theta = abs((H+ M/ 60)* 30- M* 6)\n print(theta)\n \n result = B**2 + A**2 - 2* B* A* math.cos(math.radians(theta))\n result = math.sqrt(result)\n\n print(\'{:.020f}\'.format(result))\n\nif __name__ == "__main__":\n ... | ['Wrong Answer', 'Accepted'] | ['s136177472', 's135517645'] | [9444.0, 9500.0] | [23.0, 24.0] | [309, 310] |
p02677 | u425068548 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\n\nnums = list(map(lambda x:int(x), input().split()))\na, b, h, m = nums[0], nums[1], nums[2], nums[3]\n\nwa = 0.5\nwb = 6\n\ntm = 60 * h + m\n\nda = tm * wa\ndb = (tm % 60) * wb\ndiff = abs(da - db)\nprint(tm, da, db, diff)\ncsq = a*a + b*b - (2 * a * b * math.cos(diff * math.pi / 180))\nprint("{:.20f}".... | ['Wrong Answer', 'Accepted'] | ['s980504658', 's378757329'] | [9468.0, 9456.0] | [23.0, 23.0] | [326, 318] |
p02677 | u511501183 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\n\nA, B, H, M = [int(a) for a in input().split()]\nh_d = -2*math.pi/12\nm_d = -2*math.pi/60\n\nh_s = h_d*(H+M/60) + math.pi/2\nm_s = m_d*M + math.pi/2\n\nh_y = A*math.sin(h_s)\nh_x = A*math.cos(h_s)\nm_y = B*math.sin(m_s)\nm_x = B*math.cos(m_s)\n\nx = h_x - m_x\ny = h_y - m_y\n\nprint(A, h_x, h_y, math.sq... | ['Wrong Answer', 'Accepted'] | ['s142237881', 's156011380'] | [9576.0, 9576.0] | [23.0, 24.0] | [430, 339] |
p02677 | u565448206 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\nfrom math import cos\n\n\ndef time():\n A, B, H, M = map(int, input().split())\n minuteAngel = (float(M) * 360) / 60\n hourAngel = (float(H) % 12) * 30 + (float(M) * 30) / 60\n angel = abs(hourAngel - minuteAngel)\n a = cos((angel % 180)/180 * math.pi)\n diatance = math.sqrt(A * A + B *... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s298761519', 's607251984', 's776820364', 's051947006'] | [9056.0, 9624.0, 9120.0, 9476.0] | [21.0, 24.0, 22.0, 25.0] | [359, 341, 380, 395] |
p02677 | u587518324 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['#!/usr/bin/env python\n\n\n__author__ = \'bugttle <bugttle@gmail.com>\'\n\nimport math\n\ndef normalize_angle(angle):\n angle = 360 - angle\n angle = angle + 90\n if (360 <= angle):\n angle -= 360\n return angle\n\n\ndef main():\n A, B, H, M = list(map(int, input().split()))\n\n # X * 12 = 36... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s412557966', 's477686620', 's115443744'] | [9556.0, 9572.0, 9524.0] | [24.0, 23.0, 23.0] | [878, 896, 793] |
p02677 | u744695362 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\n\n\na,b,h,m=map(int, input().split())\n\n\nd = 30*(h+m/60)-6*m\ne = 360-d\nf = int(min(d,e))\ny = math.cos(math.radians(f))\n\n\nx = a**2+b**2-2*a*b*y\nprint(math.sqrt(x))\n', 'import math\n \n \na,b,h,m=map(int, input().split())\n \n \nd = 30*(h+m/60)-6*m\ne = 360-d\nf = min(d,e)\ny = math.cos(math.radi... | ['Wrong Answer', 'Accepted'] | ['s665502781', 's522771336'] | [9504.0, 9520.0] | [23.0, 25.0] | [172, 204] |
p02677 | u750651325 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\nimport sys\nsys.stdin.readline\n\ndef yogen(x):\n ans = 0\n ans = (A ** 2 + B ** 2 - 2*A*B*math.cos(math.radians(x)))**(1/2)\n print(ans)\n\nA, B, H, M = map(int, input().split())\n\nji = int(H)*30 + int(M)/2\nhun = int(M)*6\n\nif ji == hun:\n print(0)\nelif ji - hun < 180:\n yogen(ji - hu... | ['Wrong Answer', 'Accepted'] | ['s678839192', 's992410863'] | [9512.0, 9524.0] | [23.0, 22.0] | [328, 371] |
p02677 | u754046530 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ["# C\nimport math\n\nA,B,H,M = map(int,input().split(' '))\n\nrad = math.radians(abs(H*30-M*6))\n\nprint('{:.15f}'.format((A**2 + B**2 - 2*A*B*math.cos(rad))**0.5))", "# C\nimport math\n\nA,B,H,M = map(int,input().split(' '))\n\n\nrad = abs(H*30-M*6)\nrad = math.radians(min(rad,360-rad))\nprint('{:.15f}'.format((A**2 ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s028543614', 's185310088', 's204574247', 's264877751', 's380111652', 's382972017', 's523370662', 's563856303', 's897654072', 's985144563', 's497546433'] | [9432.0, 9512.0, 9616.0, 9596.0, 9528.0, 9320.0, 9588.0, 9404.0, 9496.0, 9476.0, 9572.0] | [21.0, 22.0, 24.0, 24.0, 26.0, 23.0, 22.0, 23.0, 22.0, 24.0, 21.0] | [210, 256, 423, 254, 319, 423, 412, 398, 238, 412, 237] |
p02677 | u759510609 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ["import math\n\nA,B,H,M = map(int,input().split())\n\nsita1=M*360/60\nsita2=H*360/12+0.5*40\na=abs(sita1-sita2)\nx1 = B*math.cos(math.radians(sita1))\ny1 = B*math.sin(math.radians(sita1))\nx2 = A*math.cos(math.radians(sita2))\ny2 = A*math.sin(math.radians(sita2))\n\nd = math.sqrt(A*A+B*B-2*A*B*math.cos(math.radians(a)... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s248580148', 's253231834', 's352605955', 's611150023', 's714364348', 's742975854', 's757401442'] | [9524.0, 9524.0, 9572.0, 9452.0, 9488.0, 9520.0, 9508.0] | [22.0, 23.0, 23.0, 25.0, 24.0, 23.0, 23.0] | [337, 331, 229, 190, 302, 318, 216] |
p02677 | u805392425 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\nfrom decimal import *\nimport sympy\na, b, h, m = map(int, input().split())\n\nbig = max(30*h, 6*m)\nsmall = min(30*h, 6*m)\ngap = min(big - small, 360 - (big - small)) + (m*0.5)\n\n\nprint(format(Decimal(a**2 + b**2 - 2*a*b*sympy.cos(sympy.radians(gap)))**Decimal("0.5"), ".20f"))\n', 'import math\na, b,... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s140375885', 's880351823', 's903709287', 's130826620'] | [9872.0, 9392.0, 9516.0, 9516.0] | [28.0, 22.0, 23.0, 23.0] | [285, 206, 217, 242] |
p02677 | u832806457 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import sys\nimport numpy as np\n\n##i = list(map(int, input().split()))\n##a = i[0]\n##b = i[1]\n##h = i[2]\n##m = i[3]\na,b,h,m = 3,4,10,40\ntime = h*60+m\nths = np.pi/2-(np.pi * time/(60*12))\nthl = np.pi/2-(np.pi * m/30.0)\n#ths = np.deg2rad(90-h*30.0)\n#thl = np.deg2rad(90-m*6.0)\nx1 = a*np.cos(ths)\ny1 = a*np.si... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s159529236', 's277106320', 's400773841', 's529167427', 's662490474', 's744251713', 's764305779', 's451466737'] | [27172.0, 27208.0, 27224.0, 27232.0, 27220.0, 27208.0, 27232.0, 27212.0] | [100.0, 110.0, 113.0, 103.0, 100.0, 105.0, 105.0, 105.0] | [385, 294, 279, 252, 245, 356, 279, 311] |
p02677 | u833382483 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\ndef:\n\tA B H M=map(int,input().split(" "))\n\tif H>M/5:\n\t\tangle=(H/12-M/60)*360\n\telse:\n\t\tangle=(M/60-H/12)*360\n t=cos(angle)\n d=(A^2+B^2-2AB*t)^0.5\n print(d)\n ', 'import math\ndef:\n\tA B H M=map(int,input().split(" "))\n\tif H>M/5:\n\t\tangle=(H/12-M/60)\n\telse:\n\t\tangle=(M/6... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s265239745', 's265468852', 's641723269'] | [9012.0, 9036.0, 9460.0] | [21.0, 21.0, 22.0] | [180, 185, 501] |
p02677 | u945157177 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['import math\ndef readInt():\n return list(map(int, input().split()))\na,b,h,m = readInt()\n# print(a)\narg_h = 30*h + 30*(m/60)\narg_m = 6*m\nif abs(arg_h-arg_m) <= 180:\n arg = math.radians(abs(arg_h-arg_m))\nelse:\n arg = math.radians(abs(arg_h-arg_m)-180) \n# print(arg_h, arg_m, arg)\n# print(math.cos(arg... | ['Wrong Answer', 'Accepted'] | ['s709449926', 's597596331'] | [9448.0, 9540.0] | [25.0, 21.0] | [366, 479] |
p02677 | u952656646 | 2,000 | 1,048,576 | Consider an analog clock whose hour and minute hands are A and B centimeters long, respectively. An endpoint of the hour hand and an endpoint of the minute hand are fixed at the same point, around which each hand rotates clockwise at constant angular velocity. It takes the hour and minute hands 12 hours and 1 hour to ... | ['A, B, H, M = map(int, input().split())\nw_a = 2*pi/(12*60.0)\nw_b = 2*pi/(60.0)\ntheta_a = w_a*(H*60+M)\ntheta_b = w_b*M\nans = sqrt(A**2+B**2-2*A*B*cos(theta_a-theta_b))\nprint("{:.20f}".format(ans))', 'from math import pi, cos, sqrt\nA, B, H, M = map(int, input().split())\nw_a = 2*pi/(12*60.0)\nw_b = 2*pi/(60.0)\n... | ['Runtime Error', 'Accepted'] | ['s374416868', 's465568143'] | [9212.0, 9496.0] | [21.0, 30.0] | [194, 226] |
p02679 | u021916304 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["def ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\ndef ism():return map(str,input().split())\ndef isl():return list(map(str,input().split()))\n\nfrom fractions import Fraction\n\nmod = int(1e9+7)\nn = ii()\ncnd = {}\nazero = 0\nbzero = 0\nallzero ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s097565008', 's851738950', 's967379916', 's449726086'] | [37484.0, 19048.0, 9256.0, 63844.0] | [2206.0, 2206.0, 352.0, 940.0] | [1133, 1019, 1511, 1317] |
p02679 | u036340997 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["from math import gcd\nmod = 10**9+7\nn = int(input())\ndicn = {}\ndicp = {}\ndicz = {'a': 0, 'b': 0, 'z': 0}\nfor i in range(n):\n a, b = map(int, input().split())\n if a == 0 and b == 0:\n dicz['z'] += 1\n else:\n g = gcd(a,b)\n a //= g\n b //= g\n if a < 0:\n a *= -1\n b *= -1\n elif ... | ['Wrong Answer', 'Accepted'] | ['s091915076', 's173319387'] | [82876.0, 82552.0] | [992.0, 1004.0] | [1381, 1370] |
p02679 | u038021590 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import fractions\nfrom collections import Counter\nN = int(input())\nA_B = []\nmod = 1000000007\nfor _ in range(N):\n A, B = map(int, input().split())\n if A < 0:\n A = -A\n B = -B\n C = fractions.gcd(abs(A), abs(B))\n A_B.append((A//C, B//C))\nA_B_C = Counter(A_B)\n\n\nhate_couple = 0\nans ... | ['Runtime Error', 'Accepted'] | ['s679462882', 's190299998'] | [62724.0, 61140.0] | [1769.0, 961.0] | [718, 1060] |
p02679 | u047816928 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['N = int(input())\nD = {}\n\ndef gcd(x,y):\n if x>y: x,y=y,x\n while x:\n x,y=y%x,x\n return y\n\nprint(gcd(12,5))\nprint(gcd(12,16))\n\nfor _ in range(N):\n A, B = map(int, input().split())\n if A==0 and B==0: key=(0,0)\n elif A==0: key=(0,1)\n elif B==0: key=(1,0)\n else:\n if... | ['Wrong Answer', 'Accepted'] | ['s571531244', 's084892211'] | [46408.0, 46244.0] | [1365.0, 1389.0] | [860, 824] |
p02679 | u153302617 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\nn = int(input())\np = 10**9 + 7\niwashi = {}\nbad = 0\nans = 1\nfor i in range(n):\n x, y = map(int, input().split())\n if(x == 0 and y == 0):\n bad += 1\n continue\n elif(x == 0):\n\t\ttry:\n \tiwashi[(0, -1)] += 1\n\t\texcept KeyError:\n iwashi[(0, -1)] = 1... | ['Runtime Error', 'Accepted'] | ['s651505510', 's636735105'] | [9036.0, 46316.0] | [24.0, 1073.0] | [974, 992] |
p02679 | u157020659 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["import math\nimport collections\n\nn = int(input())\nmod = 10 * 6 + 7\nc = []\nd = []\n\ntan = []\natan = []\n\nfor _ in range(n):\n a, b = map(int, input().split())\n if b == 0: tan.append(float('inf'))\n else: tan.append(a / b)\n if a == 0: atan.append(float('inf'))\n else: atan.append(- b / a)\n\nta... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s315399622', 's337712768', 's907589571', 's997769772', 's686591534'] | [53984.0, 73140.0, 73328.0, 57600.0, 44988.0] | [826.0, 942.0, 985.0, 1250.0, 847.0] | [669, 1204, 1174, 357, 1161] |
p02679 | u163783894 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\n\n\ndef main():\n\n mod = 1000000007\n N = int(input())\n\n A = [0]\n B = [0]\n\n for n in range(N):\n a, b = map(int, input().split())\n A.append(a)\n B.append(b)\n\n calc = dict()\n\n for i in range(1, N + 1):\n r = math.gcd(A[i], B[i])\n m = 1\n ... | ['Runtime Error', 'Accepted'] | ['s241158121', 's828572654'] | [83140.0, 79356.0] | [1374.0, 915.0] | [1215, 1463] |
p02679 | u169350228 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nimport numpy as np\nimport queue\nfrom collections import deque\nimport heapq\nmod = 10**9+7\nans = 1\n\ndef twoxxn(t,mod):\n ni = t\n an = 1\n n2 = 2\n while ni > 0:\n if ni%2 == 1:\n an = (an*n2)%mod\n n2 = (n2**2)%mod\n ni //= 2\n return an\n\nn = int(inp... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s068557681', 's411401616', 's932030191', 's933226766', 's455488549'] | [132576.0, 58800.0, 64192.0, 64324.0, 64128.0] | [1839.0, 1260.0, 999.0, 996.0, 1067.0] | [1373, 1336, 1180, 1174, 1040] |
p02679 | u191680842 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\n\nmod = 10**9 +7\nN = int(input())\ndic = {}\n\nzero = 0\nfor _ in range(N):\n a,b = map(int, input().split())\n if a ==0 and b == 0:\n zero += 1\n continue\n elif a == 0:\n key = (0,1)\n elif b == 0:\n key = (1,0)\n else:\n if a<0:\n ... | ['Runtime Error', 'Accepted'] | ['s561754670', 's263189491'] | [9016.0, 46144.0] | [23.0, 820.0] | [802, 800] |
p02679 | u201387466 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\ninput=sys.stdin.readline\nsys.setrecursionlimit(10 ** 7)\nfrom itertools import accumulate\nfrom itertools import permutations\nfrom itertools import combinations\nfrom collections import defaultdict\nfrom collections import Counter\nimport fractions\nimport math\nfrom collections import deque\nfrom bisec... | ['Runtime Error', 'Accepted'] | ['s689565537', 's933833804'] | [27272.0, 184604.0] | [225.0, 1399.0] | [1594, 1896] |
p02679 | u204616996 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['N=int(input())\nfrom collections import defaultdict\nimport math\nd = defaultdict(int)\nMOD=10**9+7\nM=0\nfor i in range(N):\n a,b=map(int,input().split())\n x=math.gcd(abs(a),abs(b))\n if x==0:\n if a>b:\n k=(1,0)\n elif b>a:\n k=(0,1)\n else:\n k=(0,0)\n else:\n if a<0:\n a,b=-a,... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s128419583', 's133021482', 's281036484', 's632832786', 's768386200'] | [82600.0, 82600.0, 82580.0, 82776.0, 81112.0] | [1691.0, 1684.0, 1667.0, 1703.0, 1520.0] | [1289, 1402, 1446, 1412, 796] |
p02679 | u216928054 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from collections import defaultdict\nimport sys\nfrom fractions import Fraction\n\ncount = defaultdict(int)\nif 1:\n N = int(sys.stdin.readline())\n\n edges = defaultdict(list)\n for i in range(N):\n A, B = [int(x) for x in sys.stdin.readline().split()]\n if B == 0:\n angle = "I"\n ... | ['Runtime Error', 'Accepted'] | ['s368624638', 's345266849'] | [15552.0, 46780.0] | [2206.0, 1109.0] | [901, 1449] |
p02679 | u221061152 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\nmod=1000000007\n\nn=int(input())\nzeros = 0\nvec = {}\nfor _ in range(n):\n a,b=map(int,input().split())\n if a==0 and b==0:\n zeros+=1\n continue\n elif a==0:\n vec[(0,1)]=vec.get((0,1),0)+1\n elif b==0:\n vec[(1,0)]=vec.get((1,0),0)+1\n else:\n g = gcd(a,b)\n a,b= a//g,b... | ['Runtime Error', 'Accepted'] | ['s200466257', 's630582610'] | [46524.0, 124756.0] | [659.0, 1458.0] | [569, 613] |
p02679 | u239528020 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['#!/usr/bin/env python3\nimport math\n\nn = int(input())\n\nmod = 10**9+7\n\ndata = {}\nzero_zero = 0\n\nfor i in range(n):\n a, b = list(map(int, input().split()))\n # # print(a, b)\n gcd = math.gcd(a, b)\n a, b = a//gcd, b//gcd\n\n if a == 0 and b == 0:\n zero_zero += 1\n continue\n i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s266653927', 's390397018', 's451607452', 's408198196'] | [88108.0, 88092.0, 88076.0, 68212.0] | [1106.0, 1668.0, 1654.0, 1471.0] | [2406, 2399, 2391, 2422] |
p02679 | u249218427 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['# -*- coding: utf-8 -*-\nfrom fractions import Fraction\n\nN = int(input())\n\ndict_F = {}\ncount_0 = 0\n\ndef insert(A,B,s): # A>=0, B>0, s=0or1\n if Fraction(A,B) not in dict_F.keys():\n dict_F[Fraction(A,B)] = [0,0]\n dict_F[Fraction(A,B)][s] += 1\n\ndef power2(A):\n result = 1\n for _ in range(A):\n res... | ['Wrong Answer', 'Accepted'] | ['s353981849', 's465838285'] | [17804.0, 92996.0] | [2206.0, 775.0] | [742, 872] |
p02679 | u316464887 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\ndef main():\n N = int(input())\n d = {}\n zb = 0\n za = 0\n zab = 0\n r = 0\n mod = 10**9 + 7\n for i in range(N):\n a, b = map(int, input().split())\n if a== 0 and b == 0:\n zab += 1\n elif b == 0:\n zb += 1\n elif a == 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s507663916', 's256828319'] | [59412.0, 100640.0] | [874.0, 1050.0] | [1241, 917] |
p02679 | u318127926 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['n = int(input())\nab = []\nfor _ in range(n):\n a, b = map(int, input().split())\n ab.append((a, b))\ndi = {}\ndef gcd(a, b):\n while b!=0:\n a, b = b, a%b\n return a\nfor a, b in ab:\n if a*b!=0:\n g = gcd(abs(a), abs(b))\n a, b = a//g, b//g\n if a*b>0:\n ind = (abs(a), ... | ['Wrong Answer', 'Accepted'] | ['s223088166', 's963732415'] | [111868.0, 84596.0] | [1739.0, 1544.0] | [805, 836] |
p02679 | u318233626 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\nfrom sys import setrecursionlimit\nsetrecursionlimit(4100000)\nmod = 10 ** 9 + 7\nn = int(input())\n\nzeros = 0\nd = {}\nfor i in range(n):\n x, y = map(int, input().split())\n if x == 0 and y == 0:\n zeros += 1\n else:\n g = gcd(x, y)\n x, y = x / g, y / g\n ... | ['Runtime Error', 'Accepted'] | ['s478671377', 's307599297'] | [61716.0, 60384.0] | [852.0, 959.0] | [1310, 1323] |
p02679 | u324090406 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\nfrom numpy import sign\nmod = 1000000007\nN = int(input())\n\nif N == 1:\n print(1)\n \nd = {}\n\nfor _ in range(N):\n a, b = list(map(int, input().split()))\n if a == b == 0:\n if (0, 0) not in d:\n d[(0, 0)] = 1\n else:\n d[(0, 0)] += 1\n else... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s080958489', 's295153901', 's545843721', 's609973448', 's970907530'] | [86840.0, 64268.0, 90008.0, 89916.0, 90168.0] | [2218.0, 834.0, 967.0, 1163.0, 1775.0] | [1017, 1043, 1040, 1066, 953] |
p02679 | u347600233 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from collections import defaultdict\nfrom math import gcd\nMOD = 10**9 + 7\nn = int(input())\nzero = 0\ncnt = dict()\nfor i in range(n):\n x, y = map(int, input().split())\n if x == 0 and y == 0:\n zero += 1\n continue\n g = gcd(x, y)\n x //= g\n y //= g\n if y < 0 or (y == 0 and x < 0... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s355144113', 's638649856', 's671821646'] | [9444.0, 9196.0, 62788.0] | [345.0, 21.0, 1619.0] | [615, 586, 657] |
p02679 | u347640436 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\n\nN = int(input())\nAB = [map(int, input().split()) for _ in range(N)]\n\nab = set()\nd = {}\nd[0] = {}\nd[0][0] = 0\nfor a, b in AB:\n i = gcd(a, b)\n if i != 0:\n a //= i\n b //= i\n if b < 0:\n a, b = -a, -b\n ab.add((a, b))\n d.setdefault(a, {})\n d[a].... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s083908143', 's158028667', 's289958766', 's780719256'] | [134308.0, 102868.0, 134316.0, 151468.0] | [1552.0, 624.0, 1564.0, 1355.0] | [704, 829, 682, 848] |
p02679 | u391589398 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nmod = 10**9+7\nN = int(input())\n\niwashi01 = 0\niwashi10 = 0\niwashi00 = 0\niwashi = dict()\nfor i in range(N):\n a, b = map(int, input().split())\n g = math.gcd(abs(a), abs(b))\n a //= g; b //= g\n if a == 0 and b == 0:\n iwashi00 += 1\n elif a == 0:\n iwashi01 += 1\n el... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s753873083', 's829191406', 's379770145'] | [9032.0, 63132.0, 62824.0] | [24.0, 1051.0, 977.0] | [915, 913, 923] |
p02679 | u425177436 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nmod = 10**9 + 7\nn = int(input())\nd = {}\nd0 = 0\nfor _ in range(n):\n a, b = map(int, input().split())\n g = math.gcd(a, b)\n if g == 0:\n d0 += 1\n else:\n a //= g\n b //= g\n if a < 0:\n a = -a\n b = -b\n elif a == 0 and b < 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s962937225', 's878693555'] | [69464.0, 46208.0] | [968.0, 884.0] | [687, 679] |
p02679 | u434846982 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['_, *e = [[*map(int, t.split())] for t in open(0)]\nans = 1\nmod = 10 ** 9 + 7\nslope_dict = {}\nzeros = 0\nvect_x = 0\nfor x, y in e:\n if x == y == 0:\n zeros += 1\n elif y == 0:\n vect_x += 1\n else:\n slope_dict[x/y] = slope_dict.get(x/y, 0) + 1\nans = ans * (pow(2, vect_x, mod) + pow... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s549586158', 's992516031', 's998725158', 's472956643'] | [68660.0, 68536.0, 68780.0, 99168.0] | [419.0, 652.0, 447.0, 966.0] | [646, 652, 650, 634] |
p02679 | u460375306 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\nmod_val = 1000000007\ndef simplify(A, B):\n a = A//gcd(A,B)\n b = B//gcd(A,B)\n if b<0:\n return (-a, -b)\n return (a, b)\nn = int(input())\ncount_simple_fish = dict()\nbad_fish = 0\nfor _ in range(n):\n A, B = map(int, input().split())\n if A == B == 0:\n bad_fish = (bad_fish + 1)%m... | ['Wrong Answer', 'Accepted'] | ['s608149336', 's401666140'] | [88116.0, 60480.0] | [1364.0, 1140.0] | [1362, 1337] |
p02679 | u479719434 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\n\nmod = 1000000007\n\nn = int(input())\ncounter = {}\nzeros = 0\nfor i in range(n):\n a, b = map(int, input().split())\n if (a == 0 and b == 0):\n zeros += 1\n continue\n g = gcd(a, b)\n a //= g\n b //= g\n if (b < 0):\n a = -a\n b = -b\n if (b ==... | ['Wrong Answer', 'Accepted'] | ['s685636685', 's855524042'] | [90832.0, 60576.0] | [1856.0, 1073.0] | [824, 749] |
p02679 | u493520238 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nMOD = 10**9 + 7\n\n\ndef pow_k(x, n):\n if n == 0:\n return 1\n\n K = 1\n while n > 1:\n if n % 2 != 0:\n K *= x\n x *= x\n n //= 2\n \n x%=MOD\n return K * x\n\n\nn = int(input())\n\na_b_d = {}\n# b_a_d = {}\n\nzero_cnt = 0\n\nfor i in ran... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s026557161', 's804772827', 's823538762', 's865173290', 's170545640'] | [49016.0, 49236.0, 72828.0, 49292.0, 49172.0] | [865.0, 852.0, 959.0, 862.0, 869.0] | [1327, 1457, 1459, 1552, 1480] |
p02679 | u503228842 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['\n\nfrom collections import defaultdict\nfrom math import gcd\nN = int(input())\nMOD = 10**9 + 7\nd = defaultdict(lambda: [0, 0])\nzeros = 0\nfor _ in range(N):\n x, y = map(int, input().split())\n if x == 0 and y == 0:\n zeros += 1\n elif x == 0:\n d[(0, 0)][0] += 1\n elif y == 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s348847297', 's117229229'] | [84444.0, 60760.0] | [1138.0, 964.0] | [869, 860] |
p02679 | u515740713 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\nimport math\nmod = 1000000007\n \nn = int(sys.stdin.readline().rstrip())\nab = {}\nfor i in range(n):\n a,b = map(int,sys.stdin.readline().rstrip().split())\n if a == 0 and b == 0:\n pass\n elif a == 0:\n b = 1\n else:\n gcd = math.gcd(a,b)\n a //= gcd\n b //... | ['Wrong Answer', 'Accepted'] | ['s281986143', 's558819137'] | [59308.0, 59356.0] | [2207.0, 629.0] | [887, 831] |
p02679 | u559196406 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd \nn=int(input())\nmod = 10**9+7\ncount = {}\n\nfor _ in range(n):\n a,b = map(int,input().split())\n if a==0 and b==0:\n continue\n if a*b != 0:\n g=gcd(a,b)*b//abs(b)\n elif a != 0:\n g=a\n else:\n g=b\n \n x=a//g,b//g\n count[x]=count.get(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s186363451', 's833761889', 's011352031'] | [46604.0, 9096.0, 72080.0] | [686.0, 24.0, 1075.0] | [534, 533, 594] |
p02679 | u588341295 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["import sys\nfrom collections import Counter\nfrom math import gcd\n\ndef input(): return sys.stdin.readline().strip()\ndef list2d(a, b, c): return [[c] * b for i in range(a)]\ndef list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]\ndef list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)... | ['Runtime Error', 'Accepted'] | ['s010036282', 's866460717'] | [46716.0, 46880.0] | [1514.0, 949.0] | [1080, 1263] |
p02679 | u588794534 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['n=int(input())\n\nmod=10**9+7\n\n\nfrom collections import defaultdict\npp = defaultdict(lambda: 0) \npm = defaultdict(lambda: 0) \n\nfrom math import gcd\nzero=0\nfor _ in range(n):\n a,b=map(int,input().split())\n\n if a==0 and b==0:\n zero+=1\n elif a*b>0:\n tmp=gcd(a,b)\n a=a//tmp\n ... | ['Wrong Answer', 'Accepted'] | ['s973419824', 's522555058'] | [54916.0, 62724.0] | [883.0, 1030.0] | [732, 761] |
p02679 | u619819312 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from fractions import gcd\nfrom collections import defaultdict as d\nn=int(input())\nm=10**9+7\ns=d(lambda:[0,0])\np=-1\nfor i in range(n):\n a,b=map(int,input().split())\n if a==b==0:p+=1\n else:\n g=gcd(a,b)\n a=a//g\n b=b//g\n if a<0 or a==0<b:\n a,b=-a,-b\n ... | ['Wrong Answer', 'Accepted'] | ['s415559537', 's741827825'] | [36036.0, 60588.0] | [991.0, 1016.0] | [440, 414] |
p02679 | u627600101 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from collections import defaultdict\nfrom math import gcd\nN = int(input())\nMOD = 10**9 + 7\nL = defaultdict(lambda: [0,0])\nzero = 0\nfor _ in range(N):\n A, B = map(int, input().split())\n if A==0: d=B\n elif B==0: d=A\n else: d=gcd(A,B)\n if d != 0:\n A, B = A//d, B//d\n if A<0: A, B ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s332492684', 's608297791', 's378111658'] | [84432.0, 17996.0, 60604.0] | [1101.0, 2206.0, 970.0] | [522, 2569, 514] |
p02679 | u638456847 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from fractions import Fraction\nfrom collections import Counter\nimport sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\nMOD = 10**9+7\n\ndef main():\n N,*ab = map(int, read().split())\n\n ab_zero = 0\n a_zero = 0\n b_zero = 0\n ratio = []\n for a, b in z... | ['Wrong Answer', 'Accepted'] | ['s483654112', 's105318732'] | [61468.0, 72596.0] | [2207.0, 409.0] | [988, 1043] |
p02679 | u667084803 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math \n\nMOD = 10**9 + 7\nN = int(input())\nABC = []\nfor i in range(N):\n a, b = map(int, input().split())\n if a * b >=0 and a > 0:\n ABC.append([ math.atan2(abs(b),abs(a)), abs(a), abs(b),1])\n else:\n ABC.append([math.atan2(abs(a),abs(b)), abs(b), abs(a), -1])\nABC.sort()\nprint(ABC)... | ['Wrong Answer', 'Accepted'] | ['s061634882', 's384916435'] | [82628.0, 69080.0] | [1352.0, 956.0] | [890, 807] |
p02679 | u674959776 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import functools\nMOD=10**9+7\n\ndef euclid(a, b):\n if b == 0:\n return a\n else:\n return euclid(b, a%b)\n\ndef gcd(nums):\n return functools.reduce(euclid, nums)\n\nn=int(input())\nt=[]\nfor i in range(n):\n a,b=map(int,input().split())\n t.append((a,b))\nz=0\ny={}\nfor i in range(n):\n if t[i][0... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s091559306', 's793247682', 's708029547'] | [74000.0, 21308.0, 73824.0] | [1728.0, 535.0, 1730.0] | [828, 556, 837] |
p02679 | u677523557 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\ninput = sys.stdin.readline\nimport math\n\nmod = 10**9+7\n\nN = int(input())\nAs = {}\nEmpty = 0\nfor _ in range(N):\n x, y = map(int, input().split())\n g = math.gcd(x, y)\n x, y = x//g, y//g\n if x == 0 and y == 0:\n Empty += 1\n else:\n if y < 0 or (y==0 and x < 0):\n ... | ['Runtime Error', 'Accepted'] | ['s325040544', 's906923630'] | [46336.0, 46196.0] | [653.0, 725.0] | [676, 633] |
p02679 | u695811449 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\nimport io, os\ninput = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline\nfrom collections import Counter\nfrom fractions import Fraction\n\nN=int(input())\nmod=10**9+7\n\nS=[tuple(map(int,input().split())) for i in range(N)]\n\ndef main():\n C=Counter()\n PLUS=0\n for a,b in S:\n if a==... | ['Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s363902345', 's849164147', 's089840464'] | [53544.0, 45928.0, 109032.0] | [2207.0, 2207.0, 1057.0] | [923, 750, 1146] |
p02679 | u708255304 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import degrees, atan2\nfrom collections import defaultdict\n\nMOD = 10**9+7\nN = int(input())\n\n\n\npoints = [list(map(int, input().split())) for _ in range(N)]\ntmp = defaultdict(int)\nhoge = defaultdict(lambda: defaultdict(int))\nfor i in range(N):\n a, b = points[i] \n v = degrees(atan2(b, a))\n ... | ['Runtime Error', 'Accepted'] | ['s743334052', 's272800764'] | [87588.0, 60404.0] | [889.0, 968.0] | [893, 959] |
p02679 | u709304134 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nMOD = 1000000007\nN = int(input())\nd_p = dict()\nd_m = dict()\nzz = 0 # a=b=0\nfor n in range(N):\n a,b = map(int,input().split())\n if a==0 and b==0:\n zz += 1\n continue\n if a==0:\n n_sign = 0\n elif b==0:\n n_sign = 1\n \n else: \n n_sign = ((a... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s467425363', 's669028519', 's709358412', 's973248577', 's993519410'] | [39872.0, 38184.0, 49508.0, 39788.0, 38220.0] | [972.0, 910.0, 968.0, 1000.0, 871.0] | [909, 855, 938, 902, 855] |
p02679 | u745514010 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['\nfrom collections import Counter\nmod = 1000000007\n\nn = int(input())\na_div_b = []\na_0 = 0\nb_0 = 0\na_b_0 = 0\nfor _ in range(n):\n a, b = map(int, input().split())\n if a == 0 or b == 0:\n if a == 0 and b == 0:\n a_b_0 += 1\n elif a == 0:\n a_0 += 1\n else b == 0... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s192968487', 's719627194', 's928693755'] | [9052.0, 8964.0, 55076.0] | [20.0, 20.0, 763.0] | [902, 901, 960] |
p02679 | u764956288 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["from sys import stdin\nfrom collections import defaultdict\nfrom math import gcd\n\n\ndef main():\n MOD = 1000000007\n\n N, *AB = map(int, stdin.buffer.read().split())\n\n d = defaultdict(int)\n n_zeros = 0\n\n for a, b in zip(AB[::2], AB[1::2]):\n if a == 0 and b == 0:\n n_zeros += 1... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s014980854', 's432873494', 's483871680'] | [74184.0, 74324.0, 74104.0] | [481.0, 484.0, 462.0] | [927, 896, 927] |
p02679 | u814986259 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['def main():\n import math\n import collections\n N = int(input())\n\n mod = 10**9+7\n AB = [tuple(map(int, input().split())) for i in range(N)]\n\n d = collections.defaultdict(set)\n i = 0\n ab = []\n for a, b in AB:\n g = math.gcd(a, b)\n a = a // g\n b = b // g\n ... | ['Runtime Error', 'Accepted'] | ['s137963236', 's434672855'] | [144892.0, 170708.0] | [1085.0, 1223.0] | [1112, 1299] |
p02679 | u879309973 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\n\nMOD = 1000000007\n\ndef solve(n, a, b):\n zero = 0\n D = {}\n for i in range(n):\n p, q = a[i], b[i]\n if (p == 0) and (q == 0):\n zero += 1\n else:\n if p < 0 and q < 0:\n p, q = -p, -q\n if p == 0:\n ... | ['Runtime Error', 'Accepted'] | ['s534007221', 's813629590'] | [8992.0, 94304.0] | [24.0, 1019.0] | [2973, 1179] |
p02679 | u888092736 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from math import gcd\nfrom collections import defaultdict\n\n\ndef cmb(n, r):\n return (fac[n] * pow(fac[r], p - 2, p) * pow(fac[n - r], p - 2, p)) % p\n\n\np = 1000000007\nfac = [1] * (2 * 10 ** 6 + 1)\nfor i in range(1, 2 * 10 ** 6 + 1):\n fac[i] = (fac[i - 1] * i) % p\n\n\nN = int(input())\n\nAB = defaultdic... | ['Runtime Error', 'Accepted'] | ['s713690063', 's139364378'] | [125548.0, 68240.0] | [2210.0, 911.0] | [676, 696] |
p02679 | u894265012 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["import math\nimport itertools\nimport numpy as np\ndef main():\n N = int(input())\n AB = []\n for _ in range(N):\n AB.append(list(map(int, input().split())))\n mod = 1000000007\n total = math.factorial(N) % mod\n violate = []\n set_N = set({i for i in range(N)})\n for i, j in itertools.... | ['Wrong Answer', 'Accepted'] | ['s118653388', 's671280039'] | [237716.0, 81568.0] | [2213.0, 1604.0] | [528, 1440] |
p02679 | u895515293 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\nimport math\nimport heapq\nsys.setrecursionlimit(10**7)\nINTMAX = 9223372036854775807\nINTMIN = -9223372036854775808\nDVSR = 1000000007\ndef POW(x, y): return pow(x, y, DVSR)\ndef INV(x, m=DVSR): return pow(x, m - 2, m)\ndef DIV(x, y, m=DVSR): return (x * INV(y, m)) % m\ndef LI(): return [int(x) for x in ... | ['Runtime Error', 'Accepted'] | ['s645359017', 's639099916'] | [92784.0, 85792.0] | [1752.0, 1586.0] | [1697, 1728] |
p02679 | u896741788 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\ninput=sys.stdin.buffer.readline\nmod=10**9+7\nn=int(input())\nd={}\nz=0\nfrom math import gcd \nfor i in range(n):\n x,y=map(int,input().split())\n if x==y==0:z+=1\n else:\n f=gcd(x,y)\n x//=f;y//=f\n if x<0:x*=-1;y*=-1\n if x==0 and y<0:y=-y\n d[(x,y)]+=1 if (x... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s154580443', 's599395993', 's968079854', 's224457591'] | [9064.0, 9068.0, 69864.0, 49444.0] | [21.0, 22.0, 1125.0, 807.0] | [580, 584, 669, 592] |
p02679 | u899782392 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['from collections import defaultdict, deque\nimport math\n\nkMod = 10**9 + 7\n\nN = int(input())\nkey2count = defaultdict(lambda: [0, 0])\n\nfor _ in range(N):\n a, b = map(int, input().split())\n g = math.gcd(a, b)\n a, b = a//g, b//g\n if a < 0:\n a, b = -a, -b\n idx = 0\n if b < 0:\n ... | ['Runtime Error', 'Accepted'] | ['s354994848', 's432755627'] | [84664.0, 60552.0] | [1120.0, 977.0] | [548, 641] |
p02679 | u916323984 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ["from collections import defaultdict\nfrom math import gcd\n\ndef main():\n n = int(input())\n mod = 1000000007\n zeroes = 0\n quad1 = defaultdict(int)\n quad2 = defaultdict(int)\n for _ in range(n):\n if a == b == 0:\n zeroes += 1\n continue\n\n a, b = map(int, in... | ['Runtime Error', 'Accepted'] | ['s618243460', 's581799157'] | [9480.0, 68192.0] | [25.0, 939.0] | [858, 920] |
p02679 | u920977317 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nimport copy\n\ndef main():\n N=int(input())\n zero_fish=0\n\n Pair={}\n\n for i in range(N):\n A,B=map(int,input().split())\n\n if A==0 and B==0:\n zero_fish+=1\n continue\n if B==0:\n bunsi=1\n bunbo=0\n elif B>0:\n ... | ['Wrong Answer', 'Accepted'] | ['s783943585', 's618492937'] | [81652.0, 54672.0] | [1261.0, 1163.0] | [1289, 1283] |
p02679 | u924691798 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\n\n# Combination\nMOD = 10**9+7\nMAX = 2*10**5\nfac = [1,1] + [0]*MAX\nfinv = [1,1] + [0]*MAX\ninv = [0,1] + [0]*MAX\nfor i in range(2,MAX+2):\n fac[i] = fac[i-1] * i % MOD\n inv[i] = -inv[MOD%i] * (MOD // i) % MOD\n finv[i] = finv[i-1] * inv[i] % MOD\n\ndef comb(n,r):\n if n < r: return 0\n ... | ['Runtime Error', 'Accepted'] | ['s330380412', 's083654690'] | [150688.0, 103384.0] | [1868.0, 1057.0] | [1107, 804] |
p02679 | u940831163 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\nimport collections\n\nn = int(input())\niwashi = [None for _ in range(n)]\nfor i in range(n):\n a, b = map(int, input().split())\n iwashi[i] = (math.degrees(math.atan2(a, b)) + 180) % 180\n# print(iwashi)\niwashi = collections.Counter(iwashi)\nk_list = list(iwashi.keys())\nv = list(iwashi.values())... | ['Wrong Answer', 'Accepted'] | ['s136468592', 's477639470'] | [54280.0, 76152.0] | [962.0, 1240.0] | [755, 1152] |
p02679 | u945181840 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import sys\nimport numpy as np\nfrom collections import Counter\n\nread = sys.stdin.read\nreadline = sys.stdin.readline\n\nN, *AB = map(int, read().split())\nA = np.array(AB[::2], np.int64)\nB = np.array(AB[1::2], np.int64)\ng = np.gcd(A, B)\nA //= g\nB //= g\na = Counter(A.tolist())\nb = Counter(B.tolist())\n\n', 'i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s435671246', 's777417333', 's122444363'] | [91660.0, 72752.0, 72600.0] | [446.0, 524.0, 481.0] | [297, 915, 913] |
p02679 | u952708174 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['def e_bullet(MOD=10**9 + 7):\n from math import gcd\n from collections import defaultdict\n N = int(input())\n\n zero_all = 0\n pair = defaultdict(int)\n for _ in range(N):\n a, b = [int(i) for i in input().split()]\n if a == 0 and b == 0:\n zero_all += 1\n contin... | ['Wrong Answer', 'Accepted'] | ['s593633915', 's472595120'] | [135008.0, 135352.0] | [1154.0, 1169.0] | [1476, 1452] |
p02679 | u961674365 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['import math\n\n\nn = int(input())\nmod = 1000000007\nab = [list(map(int,input().split())) for _ in range(n)]\ndic = {}\nz = 0\nnz,zn = 0,0\nfor a,b in ab:\n if a == 0 and b == 0:\n z += 1\n continue\n elif a == 0:\n zn += 1\n continue\n elif b == 0:\n nz += 1\n if a< 0:\... | ['Wrong Answer', 'Accepted'] | ['s093318543', 's065148434'] | [82688.0, 82684.0] | [820.0, 783.0] | [945, 949] |
p02679 | u984592063 | 2,000 | 1,048,576 | We have caught N sardines. The _deliciousness_ and _fragrantness_ of the i-th sardine is A_i and B_i, respectively. We will choose one or more of these sardines and put them into a cooler. However, two sardines on bad terms cannot be chosen at the same time. The i-th and j-th sardines (i \neq j) are on bad terms if a... | ['mod = 10 ** 9 + 7\ndef gcd(a, b):\n return gcd(b, a%b) if b else a\nN = int(input())\nfrom collections import defaultdict\nX = defaultdict(lambda: [0, 0])\nx = 0\ny = 0\nz = 0\nfor i in range(N):\n a, b = map(int, input().split())\n g = abs(gcd(a, b))\n if a * b > 0:\n X[(abs(a) // g, abs(b) // g)]... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s332349251', 's421900785', 's711286520', 's388389766'] | [84420.0, 68824.0, 84580.0, 68572.0] | [1930.0, 1789.0, 1955.0, 885.0] | [728, 792, 728, 617] |
p02680 | u165429863 | 3,000 | 1,048,576 | There is a grass field that stretches infinitely. In this field, there is a negligibly small cow. Let (x, y) denote the point that is x\ \mathrm{cm} south and y\ \mathrm{cm} east of the point where the cow stands now. The cow itself is standing at (0, 0). There are also N north-south lines and M east-west lines drawn... | ['#168 - F\nimport sys\nimport numpy as np\n\n\ndef main():\n N, M = map(int, sys.stdin.buffer.readline().split())\n LineData = np.int64(sys.stdin.buffer.read().split())\n\n INF = 10**9 + 1\n\n LineData = LineData.reshape(-1, 3)\n A, B, C = LineData[:N].T\n D, E, F = LineData[N:].T\n X = np.unique(... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s045555143', 's719724883', 's861750481'] | [45248.0, 45364.0, 66200.0] | [3309.0, 3309.0, 2587.0] | [2026, 1922, 2389] |
p02680 | u268210555 | 3,000 | 1,048,576 | There is a grass field that stretches infinitely. In this field, there is a negligibly small cow. Let (x, y) denote the point that is x\ \mathrm{cm} south and y\ \mathrm{cm} east of the point where the cow stands now. The cow itself is standing at (0, 0). There are also N north-south lines and M east-west lines drawn... | ["import numpy as np\nfrom bisect import *\nn, m = map(int, input().split())\na, b, c = zip(*(map(int, input().split()) for _ in range(n)))\nd, e, f = zip(*(map(int, input().split()) for _ in range(m)))\nx = sorted(set(c + e + f))\ny = sorted(set(a + b + d))\nh = len(y)-1\nw = len(x)-1\ndef tx(i):\n return bisect(x,... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s248232466', 's463153570', 's856553123', 's900361398', 's192252993'] | [97880.0, 238780.0, 303372.0, 27188.0, 209696.0] | [139.0, 197.0, 468.0, 116.0, 1315.0] | [1024, 1032, 1119, 992, 1257] |
p02680 | u704252625 | 3,000 | 1,048,576 | There is a grass field that stretches infinitely. In this field, there is a negligibly small cow. Let (x, y) denote the point that is x\ \mathrm{cm} south and y\ \mathrm{cm} east of the point where the cow stands now. The cow itself is standing at (0, 0). There are also N north-south lines and M east-west lines drawn... | ["import sys\nimport numpy as np\nfrom itertools import chain\n\n\ndef inputs(func=lambda x: x, sep=None, maxsplit=-1):\n\treturn map(func, sys.stdin.buffer.readline().split(sep=sep, maxsplit=maxsplit))\n\ndef input_row(n : int, type=np.int, **kwargs):\n\treturn np.fromiter(inputs(type, **kwargs), dtype=type)\n\ndef in... | ['Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', '... | ['s065761599', 's234534511', 's357001945', 's409964009', 's590618326', 's599766515', 's644358570', 's655076580', 's675315567', 's740324531', 's797116993', 's815184956', 's911185336', 's957795004', 's968710011', 's776126620'] | [30040.0, 27220.0, 48568.0, 30076.0, 46740.0, 29888.0, 48620.0, 46796.0, 122748.0, 48448.0, 439016.0, 48236.0, 248132.0, 46760.0, 46612.0, 40508.0] | [3309.0, 115.0, 3309.0, 2484.0, 3310.0, 3309.0, 3310.0, 3309.0, 3313.0, 3309.0, 3321.0, 3309.0, 3317.0, 3309.0, 3309.0, 2362.0] | [1892, 1847, 1761, 1939, 1666, 1945, 1797, 1814, 1881, 1677, 1736, 1804, 1707, 2009, 1833, 6448] |
p02681 | u000037600 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether... | ['a=input()\nb=input()\nif len(a)+1==len(b) and a==b[0:a]:\n print("Yes")\nelse:\n print("No")', 'a=input()\nb=input()\nif len(a)+1=len(b) and a==b[0:a]:\n print("Yes")\nelse:\n print("No")', 'a=input()\nb=input()\nif len(a)+1==len(b) and b[:len(a)]==a:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s147656394', 's754323293', 's811465178'] | [9012.0, 8884.0, 8972.0] | [24.0, 27.0, 29.0] | [89, 88, 93] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.