query stringlengths 50 14k | positive stringlengths 9 289k | positive_score float64 0.33 0.95 | negative_0 stringlengths 23 289k | negative_0_score float64 0.37 0.9 | negative_1 stringlengths 5 289k | negative_1_score float64 0.36 0.9 | negative_2 stringlengths 23 289k | negative_2_score float64 0.34 0.88 | negative_3 stringlengths 23 289k | negative_3_score float64 0.34 0.87 | negative_4 stringlengths 23 289k | negative_4_score float64 0.33 0.84 | negative_5 stringlengths 5 289k | negative_5_score float64 0.32 0.84 | negative_6 stringlengths 9 289k | negative_6_score float64 0.31 0.83 | negative_7 stringlengths 8 289k | negative_7_score float64 0.31 0.83 | negative_8 stringlengths 14 289k | negative_8_score float64 0.3 0.82 | negative_9 stringlengths 18 115k | negative_9_score float64 0.29 0.81 | negative_10 stringlengths 23 289k | negative_10_score float64 0.28 0.8 | negative_11 stringlengths 23 289k | negative_11_score float64 0.28 0.8 | negative_12 stringlengths 14 289k | negative_12_score float64 0.27 0.79 | negative_13 stringlengths 5 289k | negative_13_score float64 0.27 0.79 | negative_14 stringlengths 9 289k | negative_14_score float64 0.27 0.79 | negative_15 stringlengths 5 289k | negative_15_score float64 0.27 0.77 | negative_16 stringlengths 5 289k | negative_16_score float64 0.27 0.76 | negative_17 stringlengths 14 115k | negative_17_score float64 0.26 0.76 | negative_18 stringlengths 5 289k | negative_18_score float64 0.26 0.75 | negative_19 stringlengths 8 289k | negative_19_score float64 0.26 0.75 | negative_20 stringlengths 9 289k | negative_20_score float64 0.25 0.75 | negative_21 stringlengths 9 289k | negative_21_score float64 0.25 0.75 | negative_22 stringlengths 5 289k | negative_22_score float64 0.25 0.75 | negative_23 stringlengths 5 289k | negative_23_score float64 0.25 0.75 | negative_24 stringlengths 18 289k | negative_24_score float64 0.25 0.75 | negative_25 stringlengths 5 289k | negative_25_score float64 0.25 0.75 | negative_26 stringlengths 5 289k | negative_26_score float64 0.25 0.75 | negative_27 stringlengths 23 289k | negative_27_score float64 0.25 0.74 | negative_28 stringlengths 18 289k | negative_28_score float64 0.24 0.74 | negative_29 stringlengths 18 289k | negative_29_score float64 0.24 0.74 | negative_30 stringlengths 14 289k | negative_30_score float64 0.24 0.74 | negative_31 stringlengths 5 115k | negative_31_score float64 0.24 0.74 | negative_32 stringlengths 5 289k | negative_32_score float64 0.24 0.74 | negative_33 stringlengths 23 289k | negative_33_score float64 0.24 0.74 | negative_34 stringlengths 9 289k | negative_34_score float64 0.24 0.74 | negative_35 stringlengths 5 289k | negative_35_score float64 0.24 0.73 | negative_36 stringlengths 9 289k | negative_36_score float64 0.24 0.73 | negative_37 stringlengths 5 289k | negative_37_score float64 0.24 0.73 | negative_38 stringlengths 18 115k | negative_38_score float64 0.23 0.73 | negative_39 stringlengths 23 289k | negative_39_score float64 0.23 0.73 | negative_40 stringlengths 5 289k | negative_40_score float64 0.23 0.73 | negative_41 stringlengths 9 289k | negative_41_score float64 0.23 0.73 | negative_42 stringlengths 9 289k | negative_42_score float64 0.23 0.73 | negative_43 stringlengths 14 289k | negative_43_score float64 0.23 0.73 | negative_44 stringlengths 5 289k | negative_44_score float64 0.23 0.73 | negative_45 stringlengths 8 289k | negative_45_score float64 0.23 0.72 | negative_46 stringlengths 5 289k | negative_46_score float64 0.23 0.72 | negative_47 stringlengths 5 289k | negative_47_score float64 0.23 0.72 | negative_48 stringlengths 5 289k | negative_48_score float64 0.23 0.72 | negative_49 stringlengths 5 289k | negative_49_score float64 0.23 0.72 | negative_50 stringlengths 18 115k | negative_50_score float64 0.23 0.71 | negative_51 stringlengths 5 289k | negative_51_score float64 0.23 0.71 | negative_52 stringlengths 5 289k | negative_52_score float64 0.23 0.71 | negative_53 stringlengths 8 289k | negative_53_score float64 0.22 0.71 | negative_54 stringlengths 18 115k | negative_54_score float64 0.22 0.7 | negative_55 stringlengths 14 289k | negative_55_score float64 0.22 0.7 | negative_56 stringlengths 9 289k | negative_56_score float64 0.22 0.7 | negative_57 stringlengths 5 115k | negative_57_score float64 0.22 0.7 | negative_58 stringlengths 23 289k | negative_58_score float64 0.22 0.7 | negative_59 stringlengths 5 289k | negative_59_score float64 0.22 0.7 | negative_60 stringlengths 8 289k | negative_60_score float64 0.22 0.7 | negative_61 stringlengths 5 289k | negative_61_score float64 0.22 0.7 | negative_62 stringlengths 5 289k | negative_62_score float64 0.22 0.69 | negative_63 stringlengths 5 289k | negative_63_score float64 0.22 0.69 | negative_64 stringlengths 5 115k | negative_64_score float64 0.22 0.69 | negative_65 stringlengths 23 289k | negative_65_score float64 0.22 0.69 | negative_66 stringlengths 18 289k | negative_66_score float64 0.21 0.69 | negative_67 stringlengths 5 115k | negative_67_score float64 0.21 0.69 | negative_68 stringlengths 5 289k | negative_68_score float64 0.21 0.69 | negative_69 stringlengths 23 289k | negative_69_score float64 0.21 0.69 | negative_70 stringlengths 23 289k | negative_70_score float64 0.21 0.69 | negative_71 stringlengths 8 115k | negative_71_score float64 0.21 0.69 | negative_72 stringlengths 18 115k | negative_72_score float64 0.21 0.69 | negative_73 stringlengths 18 115k | negative_73_score float64 0.21 0.69 | negative_74 stringlengths 8 115k | negative_74_score float64 0.21 0.69 | negative_75 stringlengths 18 115k | negative_75_score float64 0.21 0.69 | negative_76 stringlengths 5 289k | negative_76_score float64 0.21 0.69 | negative_77 stringlengths 8 115k | negative_77_score float64 0.21 0.69 | negative_78 stringlengths 23 289k | negative_78_score float64 0.21 0.69 | negative_79 stringlengths 9 289k | negative_79_score float64 0.21 0.68 | negative_80 stringlengths 8 289k | negative_80_score float64 0.21 0.68 | negative_81 stringlengths 26 289k | negative_81_score float64 0.21 0.68 | negative_82 stringlengths 5 289k | negative_82_score float64 0.21 0.68 | negative_83 stringlengths 9 289k | negative_83_score float64 0.21 0.68 | negative_84 stringlengths 8 289k | negative_84_score float64 0.21 0.68 | negative_85 stringlengths 8 115k | negative_85_score float64 0.21 0.68 | negative_86 stringlengths 5 289k | negative_86_score float64 0.21 0.68 | negative_87 stringlengths 5 289k | negative_87_score float64 0.21 0.68 | negative_88 stringlengths 5 289k | negative_88_score float64 0.21 0.68 | negative_89 stringlengths 18 289k | negative_89_score float64 0.21 0.68 | negative_90 stringlengths 8 289k | negative_90_score float64 0.21 0.68 | negative_91 stringlengths 5 289k | negative_91_score float64 0.2 0.68 | negative_92 stringlengths 5 289k | negative_92_score float64 0.2 0.68 | negative_93 stringlengths 14 115k | negative_93_score float64 0.2 0.68 | negative_94 stringlengths 5 115k | negative_94_score float64 0.2 0.67 | negative_95 stringlengths 18 289k | negative_95_score float64 0.2 0.67 | negative_96 stringlengths 9 115k | negative_96_score float64 0.2 0.67 | negative_97 stringlengths 5 289k | negative_97_score float64 0.2 0.67 | negative_98 stringlengths 25 289k | negative_98_score float64 0.2 0.67 | negative_99 stringlengths 5 115k | negative_99_score float64 0.2 0.67 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
"Polycarp has $n$ different binary words. A word called binary if it contains only characters '0' an(...TRUNCATED) | "for _ in range(int(input())):\n n = int(input())\n mass = []\n zo = 0\n oz = 0\n zz (...TRUNCATED) | 0.809441 | "#!/usr/bin/env python3\n# Copied solution\n\nimport collections\nimport sys\nimport traceback\n\ncl(...TRUNCATED) | 0.765235 | "import sys\n\ninput=sys.stdin.readline\n\n#t=1\nt=int(input())\nfor _ in range(t):\n n=int(input(...TRUNCATED) | 0.751225 | "for _ in range(int(input())):\n n=int(input())\n a=input()\n b=input()\n l=[]\n flag=0\n for i in r(...TRUNCATED) | 0.723793 | "let_to_num = {'A':[0,5], 'B':[1,6], 'C':[2,7], 'D':[3,8], 'E':[4,9]}\n\nnum_to_let = {0:'A', 1:'B',(...TRUNCATED) | 0.716009 | "t = int(input())\nfor _ in range(t):\n n = int(input())\n l = list([int(x)- 1 for x in input((...TRUNCATED) | 0.711062 | "s = input() \nzero = set() # 前面的一个以0结尾的串的索引\none = set() # 前面的一(...TRUNCATED) | 0.709779 | "# map(int, input())\nt = int(input())\nfor i in range(t):\n\ts = sorted(input())\n\tif s[0] == s[-1(...TRUNCATED) | 0.680031 | "import sys\n\nsys.setrecursionlimit(10 ** 5)\nint1 = lambda x: int(x) - 1\np2D = lambda x: print(*x(...TRUNCATED) | 0.67906 | "from sys import stdin,stderr\ndef rl():\n return [int(w) for w in stdin.readline().split()]\n\nd(...TRUNCATED) | 0.676934 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor testcases in range(t):\n n=int(inp(...TRUNCATED) | 0.676668 | "t = int(input())\n\nfor ti in range(t):\n\tn = int(input())\n\n\tlri = [None for _ in range(n)]\n\n(...TRUNCATED) | 0.675857 | "T= int(input());\n\nfor i in range(T):\n n,k = list(map(int,input().split()));\n s=list(map(int,inp(...TRUNCATED) | 0.674646 | "t=int(input())\nfor _ in range(t):\n n=int(input())\n l=list(map(int,input().split()))\n if sum(l)!(...TRUNCATED) | 0.669323 | "t=eval(input())\n \na=[]\nb=[]\n \ntop=-1\n \nfor __ in range(0,t):\n \n x=input().split()\n \n if((...TRUNCATED) | 0.667718 | "(lambda R:(lambda N:(lambda n:any((lambda z,r:all((lambda p:all(p==k for k in n[j:j+i]))(n[j])for j(...TRUNCATED) | 0.664506 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n n=int(input())\n if n<101:\n l1=[]\n (...TRUNCATED) | 0.664501 | "# cook your dish here\nfor _ in range(int(input())):\n n=int(input())\n l1=[]\n l2=[]\n \n for i in(...TRUNCATED) | 0.661206 | "def main():\n t = int(input())\n s1 = \"one\"\n s2 = \"two\"\n for i in range(t):\n (...TRUNCATED) | 0.657401 | "t = int(input())\n\nfor _ in range(t):\n n = list(input().strip())\n s = list(map(int, input((...TRUNCATED) | 0.655536 | "import sys\n\ninput=sys.stdin.readline\n\nfor _ in range(int(input())):\n s=input().rstrip()\n (...TRUNCATED) | 0.655053 | "# cook your dish here\r\nfrom collections import deque\r\nprimes = {2,3,5,7,11,13,17}\r\nedges = [((...TRUNCATED) | 0.650252 | "test=int(input())\nfor i in range(test):\n s=input()\n b=len(s)\n list1=[]\n for j in r(...TRUNCATED) | 0.649885 | "import sys\ninput = sys.stdin.readline\n\ndef dfs(x,S):\n #print(x,S)\n for i in range(len(S)(...TRUNCATED) | 0.644848 | "#list(map(int,input().split()))\nt=int(input())\nfor i in range(t):\n n=int(input())\n it=lis(...TRUNCATED) | 0.643797 | "t=int(input())\nfor i in range(t):\n s=input()\n zeroes=s.count('0')\n ones=s.count('1')\n if (len((...TRUNCATED) | 0.642114 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n \n a = {}\n \n for i in (...TRUNCATED) | 0.640509 | "import sys\ninput = sys.stdin.readline\n\nT = int(input())\nfor _ in range(T):\n n = int(input()(...TRUNCATED) | 0.639687 | "def outOfIndex(boys,girls,COST):\n if COST == 0:\n return len(boys)\n else:\n total_cost = [ abs((...TRUNCATED) | 0.635944 | "for _ in range(int(input())):\n n = int(input())\n ls = []\n rs = []\n lrs = []\n\n for i in range((...TRUNCATED) | 0.632386 | "t=int(input())\ndef check():\n pref = [0]*n\n pref[0]=a[0]\n suff = [0]*n\n suff[-1]=a[(...TRUNCATED) | 0.631462 | "for _ in range(int(input())):\n n=int(input())\n s=input()\n a=\"\"\n b=\"\"\n flag=(...TRUNCATED) | 0.628143 | "for _ in range(int(input())):\n n = int(input())\n arr = [list(input()) for _ in range(n)]\n (...TRUNCATED) | 0.62601 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n a = input().strip()\n prev = a(...TRUNCATED) | 0.62485 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\nT = int(input())\nfor _ in range(T):\n (...TRUNCATED) | 0.623823 | "for __ in range(int(input())):\n n = int(input())\n s = list(map(int, input()))\n r = [0] (...TRUNCATED) | 0.622932 | "t=int(input())\nno_of_chars = 256\n \n# Function to find smallest window \n# containing all chara(...TRUNCATED) | 0.622772 | "\n\n\ndef powerset(s):\n n = len(s)\n masks = [1 << j for j in range(n)]\n for i in range((...TRUNCATED) | 0.621992 | "t = int(input())\nfor i in range(t):\n n = int(input())\n suffixes = {}\n xx = input().split()\n fo(...TRUNCATED) | 0.620639 | "for i in range(int(input())):\n n = int(input())\n c = list(map(int, input().split()))\n d(...TRUNCATED) | 0.619694 | "def det(s, i, j):\n ans = 0\n curr = i\n for a in s:\n if a == curr:\n a(...TRUNCATED) | 0.617902 | "#!/usr/bin/env python3\nimport sys\ninput = sys.stdin.readline\n\nt = int(input())\nfor _ in range((...TRUNCATED) | 0.61755 | "import sys\nreadline = sys.stdin.readline\n\nN = int(readline())\nA = list(map(int, readline().spli(...TRUNCATED) | 0.617148 | "t = int(input())\nfor _ in range(t):\n\ts = input()\n\tn = len(s)\n\tif s.count('1') == n or s.coun(...TRUNCATED) | 0.617088 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nT = int(input())\nfor _ in range(T):\n(...TRUNCATED) | 0.616873 | "import sys\n\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nns = lambda: readline(...TRUNCATED) | 0.616449 | "import sys\nreadline = sys.stdin.readline\n\nT = int(readline())\nAns = [None]*T\nfor qu in range(T(...TRUNCATED) | 0.616126 | "s = input()\n\nif s[0] == '0' or s[-2] == '0' or s[-1] == '1': # 's' should be like \"1xx...x0\"\n(...TRUNCATED) | 0.615432 | "\ndef __starting_point():\n N = int(input())\n L = [0,0,0,0,0,0,0,0]\n inp = input()\n (...TRUNCATED) | 0.61334 | "'''\nName : Jaymeet Mehta\ncodechef id :mj_13\nProblem : Avenir Strings\n'''\nfrom sys import stdin(...TRUNCATED) | 0.612079 | "# cook your dish here\nimport math;\nfrom math import gcd,sqrt,floor,factorial,ceil\nfrom bisect im(...TRUNCATED) | 0.611101 | "#import set\nt = eval(input()) \nwhile(t):\n s = input()\n set1 = set()\n j = 0\n for (...TRUNCATED) | 0.610978 | "S = input()\n\nT = [[0]*10 for i in range(10)]\n\nfor i in range(1,len(S)):\n T[int(S[i-1])][int(...TRUNCATED) | 0.609286 | "for nt in range(int(input())):\n\tn=int(input())\n\tl=list(map(int,input().split()))\n\ts=sum(l)\n\(...TRUNCATED) | 0.60869 | "# cook your dish here\n# cook your dish here\ntest=int(input())\nfor _ in range(test):\n n=int(inpu(...TRUNCATED) | 0.608512 | "t = int(input())\nfor faw in range(t):\n n = int(input())\n a = [0] + list(map(int,input().sp(...TRUNCATED) | 0.608191 | "for _ in range(int(input())):\n # a, b = map(int, input().split())\n n = int(input())\n # (...TRUNCATED) | 0.607975 | "line = input()\ntest = 0\n\nwhile line != \"0\":\n test += 1\n d = {'0':0,'1':0,'2':0,'3':0,'(...TRUNCATED) | 0.607769 | "def countSubstr(str, n, x, y): \r\n \r\n tot_count = 0\r\n \r\n count_x = 0\r\n \r\n fo(...TRUNCATED) | 0.607356 | "for _ in range(int(input())):\n input()\n nums = [int(x) for x in input().split()]\n new_a(...TRUNCATED) | 0.607316 | "def solve():\n n = int(input())\n lst = list(map(int,input().split()))\n if sum(lst) <= n (...TRUNCATED) | 0.607084 | "for _ in range(int(input())):\n n = int(input())\n a = list(map(int, input().split()))\n s = set(a)(...TRUNCATED) | 0.606034 | "n = int(input())\nINF = 10 ** 18\ng = [[INF for i in range(n)] for _ in range(n)]\nfor i in range(n(...TRUNCATED) | 0.605528 | "def isvalid(s):\n nonlocal l\n for i in l:\n count=0\n for j in range(len(i)):\(...TRUNCATED) | 0.605262 | "t=int(input())\nfor i in ' '*t:\n n,x=map(int,input().split())\n s=input()\n L=[0]\n fo(...TRUNCATED) | 0.603457 | "for _ in range(int(input())):\n n,s = int(input()),input().strip()\n previ,num,_s,dic = s[0],(...TRUNCATED) | 0.602875 | "for _ in range(int(input())):\n lasts = {}\n ans = n = int(input())\n for i, a in enumerat(...TRUNCATED) | 0.602751 | "import sys\nimport math\nfrom collections import defaultdict\nfrom itertools import combinations\nf(...TRUNCATED) | 0.602138 | "import sys\ninput = sys.stdin.readline\nfrom collections import deque\n\nt=int(input())\nfor tests (...TRUNCATED) | 0.600341 | "#include<sdg.h>\nfor _ in range(int(input())):\n s=input()\n n=len(s)\n if n==1:\n (...TRUNCATED) | 0.600141 | "import sys\nT = int(sys.stdin.readline().strip())\nfor t in range(T):\n sys.stdin.readline().strip((...TRUNCATED) | 0.599431 | "def possible(a):\n ans = set()\n s = set()\n lmax = 0\n for i in range(len(a)):\n (...TRUNCATED) | 0.597553 | "t = int(input())\nfor _ in range(t):\n s = input()\n pref = [0]*len(s)\n if s[0]==\"1\":\n pref[0](...TRUNCATED) | 0.597324 | "t=int(input())\ndef reversebinary(bits,n):\n bStr=''\n for i in range(bits):\n if n>0:(...TRUNCATED) | 0.597278 | "buck = [[0, 0] for i in range(2201)]\nm = int(input())\nfor i in range(m):\n a = int(input())\n (...TRUNCATED) | 0.596409 | "m=int(input())\nwhile m:\n m-=1\n n=int(input())\n t=[i for i in input().split()]\n pri(...TRUNCATED) | 0.596375 | "def solve():\n n = int(input())\n a = list(map(int, input().split()))\n c = [0] * (n + 1)\(...TRUNCATED) | 0.596278 | "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: map(int, input((...TRUNCATED) | 0.595326 | "# cook your dish here\ndef decode(L,S):\n str_2=\"\"\n lst=[]\n for i in range(L//4):\n str_1 = \"(...TRUNCATED) | 0.594312 | "for _ in range(int(input())):\n n = int(input())\n s = input()\n balance = 0\n index = (...TRUNCATED) | 0.594208 | "t = int(input())\n\nfor i in range(t):\n n = int(input())\n dir = []\n \n for j in rang(...TRUNCATED) | 0.594139 | "def main():\n import sys\n input = sys.stdin.readline\n\n # 偶数長含めた回文の長(...TRUNCATED) | 0.593057 | "def size(k):\n return int(math.log2(k))\ndef v2(k):\n if k%2==1:\n return 0\n else:(...TRUNCATED) | 0.59248 | "# cook your dish here\nx=int(input())\nfor i in range(x):\n s=input()\n print(int(s[::-1]))\n(...TRUNCATED) | 0.591665 | "from itertools import permutations\n\ndef solve(n,a):\n ans=[]\n \n for des in desire:\n check=1\n(...TRUNCATED) | 0.590799 | "# cook your dish here\ndef ceil(num):\n if num%1==0:\n return int(num//1)\n else:\n return int((n(...TRUNCATED) | 0.590243 | "import sys\r\nfrom collections import defaultdict\r\nfrom copy import copy\r\n\r\nR = lambda t = in(...TRUNCATED) | 0.589852 | "# cook your dish here\n# cook your dish here\nimport math\ntest=int(input())\nfor _ in range(test):(...TRUNCATED) | 0.588835 | "n = int(input())\n\n\ndef test(a, s):\n k = [''] * len(a)\n d = {}\n for i in range(len(a)(...TRUNCATED) | 0.588424 | "def invper(ar):\n ar1=[0]*(len(ar))\n for i in range(len(ar)):\n ar1[ar[i]-1]=i+1\n return ar1\nt=(...TRUNCATED) | 0.588329 | "import math\ndef findnumber(l,n):\n l.sort()\n x = l[0] * l[-1]\n vec = []\n i = 2\n (...TRUNCATED) | 0.587343 | "import sys\ninput = sys.stdin.readline\n\n\ndef compress(array):\n array2 = sorted(set(array))\n(...TRUNCATED) | 0.586526 | "for tc in range(int(input())):\n N = int(input())\n a, b = list(map(int, input().split()))\n pr = [(...TRUNCATED) | 0.586381 | "from math import log2, ceil\r\nMOD = int(1e9 + 7)\r\nsrt = lambda s: ''.join(sorted(s))\r\nfor _ in(...TRUNCATED) | 0.585857 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\n\nstuff=input().split(\",\")(...TRUNCATED) | 0.585473 | "# cook your dish here\nfrom sys import stdin, stdout\n\nfor _ in range(int(stdin.readline())):\n n,(...TRUNCATED) | 0.585336 | "c = int(input())\n\nr = [\"AC\", \"WA\", \"TLE\", \"RE\"]\na = { i:0 for i in r}\n\nfor i in range((...TRUNCATED) | 0.585265 | "import sys\ninput = sys.stdin.readline\nout = []\n\nt = int(input())\nfor _ in range(t):\n n = i(...TRUNCATED) | 0.584871 | "from collections import deque\n\n__author__ = 'asmn'\n\nn = int(input())\nend = tuple(sorted(map(la(...TRUNCATED) | 0.584231 | "import sys\nimport bisect as bi\nimport math\nfrom collections import defaultdict as dd\ninput=sys.(...TRUNCATED) | 0.583967 | "import sys,math\n\ndef main(filename):\n inputfile = open(filename,'rU')\n data = inputfile.readlin(...TRUNCATED) | 0.583701 |
"Mikhail walks on a Cartesian plane. He starts at the point $(0, 0)$, and in one move he can go to a(...TRUNCATED) | "q=int(input())\n\nfor e in range(q):\n x,y,k=list(map(int,input().split()))\n x,y=abs(x),abs((...TRUNCATED) | 0.844392 | "import sys\n\ndef spaces(a,n,m,k,visit1,visit2,dist,position):\n queue = [position]\n lastedit = [](...TRUNCATED) | 0.776658 | "from math import *\n\n\ndef ri():\n return int(input())\n\n\ndef rli():\n return list(map(int(...TRUNCATED) | 0.759773 | "import sys\nfrom operator import itemgetter\n\nn, m, k, q = list(map(int, input().split()))\nquery (...TRUNCATED) | 0.751998 | "'''input\n2\n7 3 5\n5 2 5 2\n2 4 2 6\n6 2 6 4\n5 6 5 7\n7 1 7 4\n7 3 7\n1 1 6 1\n1 2 3 2\n5 2 5 2\n(...TRUNCATED) | 0.741754 | "from math import gcd\n\n\ndef lcm(a, b): return a * b // gcd(a, b)\n\n\nfor _ in range(int(input())(...TRUNCATED) | 0.736106 | "n, q = list(map(int, input().split()))\nservers = [0] * n\nfor _ in range(q):\n t, k, d = list(m(...TRUNCATED) | 0.731682 | "import math\r\nimport os\r\nimport random\r\nimport re\r\nimport sys\r\n\r\n\r\nr = 100000\r\nprev (...TRUNCATED) | 0.730928 | "def magic():\n def check(art,k,m):\n n=len(art)\n for i in range(n-k+1):\n maxi=0\n maxi=max((...TRUNCATED) | 0.726729 | "q = int(input())\nfor query in range(q):\n\tk, n, a, b = list(map(int,input().split()))\n\tif n * b(...TRUNCATED) | 0.718859 | "def solve(x, y, p, q):\n if p == 0: return 0 if x == 0 else -1\n pp = (x - 1) // p + 1 if p !(...TRUNCATED) | 0.716477 | "from math import ceil, floor\nQ = int(input())\nfor _ in range(Q):\n a, b, m = map(int, input().(...TRUNCATED) | 0.712767 | "t=int(input())\nfor i in range(t):\n n,k,l=map(int,input().split())\n if k*l<n:\n print(-1)\n elif(...TRUNCATED) | 0.709887 | "import sys\r\nfrom collections import defaultdict\r\nfrom copy import copy\r\n\r\nR = lambda t = in(...TRUNCATED) | 0.708913 | "for _ in range(int(input())):\n\tn, x, y, d = map(int, input().split())\n\ttt = abs(x - y)\n\tif tt(...TRUNCATED) | 0.704198 | "# cook your dish here\nfor i in range(int(input())):\n n,k=[int(i) for i in input().split()]\n (...TRUNCATED) | 0.698686 | "import sys\n\nblocks = {}\n\nfor i in range(1, 10):\n blocks[i] = [(0, 0)]\nfor i in range(2, 10(...TRUNCATED) | 0.694344 | "for haaghfj in range(int(input())):\n x,y,k = list(map(int,input().split()))\n print(k + (y *(...TRUNCATED) | 0.692662 | "import decimal;\nfrom decimal import *;\n\ndef solve(a, b, min1, min2, min3, min4, x, y):\n\tif a >(...TRUNCATED) | 0.690222 | "import sys\n\n# sys.stdin = open('in.txt')\n\ns = sys.stdin.read().split()\np = 0\n\n\ndef getSm(k,(...TRUNCATED) | 0.690033 | "def merge(intervals,start,mid,end):\n al = mid-start+1\n bl = end-mid\n \n A = intervals[start:mid+(...TRUNCATED) | 0.688406 | "dt, a = None, None\ndef dfs(z):\n r = [{}, {}];ln = len(dt[z])\n if ln == 0:r[0][0] = 0;r[1][(...TRUNCATED) | 0.68809 | "import sys\n\nreadline = sys.stdin.readline\nread = sys.stdin.read\nns = lambda: readline().rstrip((...TRUNCATED) | 0.685517 | "# input = raw_input\n# range = xrange\nimport sys\ninp = [int(x) for x in sys.stdin.read().split()](...TRUNCATED) | 0.68384 | "n,m,k = [int(x) for x in input().split()]\n\nif k+2>n+m:\n print(-1)\nelse:\n if k >= n:\n (...TRUNCATED) | 0.6816 | "def __starting_point():\n t=int(input())\n for _ in range(t):\n n,k,v=map(int,input().split())\n (...TRUNCATED) | 0.680299 | "import sys\nimport math\n\n\na, b, n = list(map(int, str.split(sys.stdin.readline())))\ns = lambda (...TRUNCATED) | 0.679155 | "# cook your dish here\n\"\"\"\nInput:\nThe first line of the input contains a single integer T deno(...TRUNCATED) | 0.678318 | "q = int(input())\nfor _ in range(q):\n\tn,m,k = map(int,input().split())\n\tplayer = n//k\n\tjok_pl(...TRUNCATED) | 0.672177 | "# cook your dish here\nfrom math import gcd\nfor _ in range(int(input())):\n n,a,k,min_k,e = int(...TRUNCATED) | 0.669114 | "import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,funct(...TRUNCATED) | 0.668296 | "n, k = map(int, input().split())\na = set(map(int, input().split()))\nq = int(input())\n\n# def isI(...TRUNCATED) | 0.66745 | "3\n\nimport sys\n\n# 1 <= n, d <= 1000, 1 <= k <= 10**9\nn, k, d = list(map(int, (...TRUNCATED) | 0.666058 | "def solve():\n n = int(input())\n if n % 3 == 0:\n print(n//3,0,0)\n return 0\n(...TRUNCATED) | 0.66448 | "# cook your dish here\n# cook your dish here\nimport numpy as np\nimport sys\n\ndef findSeq(n, s, k(...TRUNCATED) | 0.661622 | "def one():\n return int(input())\n\n\ndef two():\n return list(map(int, input().split()))\n\n(...TRUNCATED) | 0.659728 | "from math import ceil\n\ndef mkgr(n, srs, k):\n res = [str(n-1)]\n for d in srs[1]:\n res.appe(...TRUNCATED) | 0.659447 | "import sys\nsys.setrecursionlimit(100000)\n\nmemo = {}\ndef recurse(arr, T1, T2, k, i):\n if T1 >= (...TRUNCATED) | 0.658074 | "def Testcase():\n h,x,y = [int(x) for x in input().strip().split()]\n \n h = h-1\n yt =(...TRUNCATED) | 0.657334 | "k = 0\nx, y, m = map(int, input().split())\nif (y < x):\n x, y = y, x\nif (y >= m):\n print(0(...TRUNCATED) | 0.656415 | "D=[0]*31\nD[1]=2\nD[2]=5\n\nfor i in range(3,31):\n best=10**10\n for p in range(1,i+1):\n best=mi(...TRUNCATED) | 0.654296 | "\nt=int(input())\nfor nbt in range(t):\n n,k=[int(i) for i in input().split()]\n a=[int(i) fo(...TRUNCATED) | 0.653059 | "try:\n# https://www.codechef.com/LTIME63B/problems/GHMC\n# Finally.... I properly understood what n(...TRUNCATED) | 0.652239 | "# cook your dish here\nfor _ in range(int(input())):\n n = int(input())\n k = n//4\n # a,b,c = map((...TRUNCATED) | 0.651335 | "import sys\nreadline = sys.stdin.readline\n\nclass Segtree:\n def __init__(self, A, intv, initia(...TRUNCATED) | 0.65014 | "def f(x, y, a, b, n):\n return a + (x - a) * cos[n] - (y - b) * sin[n], b + (x - a) * sin[n] + ((...TRUNCATED) | 0.647399 | "mem = [[[0 for i in range(51)] for j in range(31)] for k in range(31)]\n\n\ndef f(n, m, k):\n if(...TRUNCATED) | 0.645641 | "t=int(input())\nfor i in range(t):\n a,k=list(map(int,input().split()))\n x1,x2,x3=list(map(int,inp(...TRUNCATED) | 0.644975 | "3\n\nfrom math import factorial as fact\n\nN = 55\nc = [1]\nfor i in range(N):\n\tc.append(fact(i))(...TRUNCATED) | 0.644185 | "from sys import setrecursionlimit\r\nsetrecursionlimit(10 * 9)\r\n\r\ndef solve(i):\r\n if i + k(...TRUNCATED) | 0.643483 | "#!/usr/bin/env python3\n\ndef main():\n import sys\n\n readln = sys.stdin.readline\n try:\(...TRUNCATED) | 0.643435 | "def ke(i):\n return b[i]\nn,m=map(int,input().split())\na=[0]*m\nb=[0]*m\nc=[0]*m\ne=[]\nans=[0](...TRUNCATED) | 0.639722 | "import sys\nf = sys.stdin\n# f = open(\"input.txt\", \"r\")\ny, k, n = map(int, f.readline().strip((...TRUNCATED) | 0.636274 | "#!/usr/bin/env python3\n# 598D_Igor.py - Codeforces.com/problemset/problem/598/D by Sergey 2015\n\n(...TRUNCATED) | 0.635981 | "N,M,K = map(int,input().split())\n\nINF = 10**6+1\nfrom collections import defaultdict\n\nincoming (...TRUNCATED) | 0.635792 | "import fractions\nfor t in range(int(input())):\n h,u,d = list(map(int,input().split()))\n g = frac(...TRUNCATED) | 0.635705 | "def main():\n n, k = map(int, input().split())\n a, b, c, d = (list(map(int, input().split())(...TRUNCATED) | 0.635424 | "def sim(k,n,p):\n r = [(k,k,0),(k,p,p)]\n for i in range(n-2):\n u,d = r[0][1]+r[1][1](...TRUNCATED) | 0.633773 | "for ei in range(int(input())):\n n, k = map(int, input().split())\n A = list(map(int, input()(...TRUNCATED) | 0.632851 | "# cook your dish here\nT = int(input())\nfor i in range(T):\n l = list(map(int, input().split())(...TRUNCATED) | 0.631966 | "q = int(input())\nfor i in range(q):\n n = int(input())\n if n % 4 == 0:\n print(n // (...TRUNCATED) | 0.630889 | "import sys\n\n\ndef get_sol(a, b, c, n, reverse):\n\t#1\n\tif reverse[0]:\n\t\ta = (a[1], a[0], a[2(...TRUNCATED) | 0.630188 | "def main():\n\tn, ma, mb, *L = list(map(int, open(0).read().split()))\n\tM = 1 << 30\n\tdp = [[M] *(...TRUNCATED) | 0.630019 | "for _ in range(int(input())):\n am = int(input())\n arr = list(map(int,input().split()))\n (...TRUNCATED) | 0.626647 | "import numpy as np\nfrom scipy.sparse.csgraph import shortest_path\nfrom scipy.sparse import csr_ma(...TRUNCATED) | 0.626042 | "# cook your dish here\r\nfrom collections import deque\r\nprimes = {2,3,5,7,11,13,17}\r\nedges = [((...TRUNCATED) | 0.625026 | "k = int(input())\nx, y = list(map(int, input().split()))\nans = []\nif k % 2 == 0:\n if (x + y) (...TRUNCATED) | 0.624889 | "tests = int(input())\nINF = 10**20\n\nfor test in range(tests):\n n, w = map(int, input().split((...TRUNCATED) | 0.624602 | "import math\nimport sys\n\ninput = sys.stdin.readline\n\ndef main():\n\n\n\n MAX_N = int(1e6) + (...TRUNCATED) | 0.62395 | "prime_factors = [[] for _ in range(10**6 + 1)]\nprimes=[True for i in range(10**6+1)]\ndef generate(...TRUNCATED) | 0.623011 | "import sys\nimport random\nfrom fractions import Fraction\nfrom math import *\n \ndef input():\n (...TRUNCATED) | 0.622571 | "import sys\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\nfor i in range(int(input(...TRUNCATED) | 0.61936 | "read_line = lambda: [int(i) for i in input().split()]\n\nn, m, k = read_line()\na = [read_line() fo(...TRUNCATED) | 0.618952 | "import re\nimport itertools\nfrom collections import Counter, deque\n\nclass Task:\n n, k = 0, 0(...TRUNCATED) | 0.618733 | "def main():\n t = int(input())\n for z in range(t):\n n, k, d1, d2 = map(int, input().(...TRUNCATED) | 0.618272 | "t=int(input())\nwhile(t):\n t-=1\n d={}\n n,m,k=[int(x) for x in list(input().split())]\n sum=0\n w(...TRUNCATED) | 0.617509 | "import sys\nreader = (s.rstrip() for s in sys.stdin)\ninput = reader.__next__\n\nclass RAQ_RMQ():\n(...TRUNCATED) | 0.617298 | "n, k = map(int, input().split())\ndiv = []\ni = 1\nn1 = n\nwhile i * i <= n:\n if n % i == 0:\n (...TRUNCATED) | 0.616741 | "t = int(input())\n\nfor _ in range(t):\n n, k = [int(x) for x in input().split()]\n a = [int((...TRUNCATED) | 0.615842 | "import numpy as np\n\nk, q = map(int, input().split())\nd = np.array(list(map(int, input().split())(...TRUNCATED) | 0.614342 | "import sys\nimport math\n\n\ndef main():\n n,t,k = map(int,sys.stdin.readline().split())\n a (...TRUNCATED) | 0.614097 | "# O(M*N*K)\nclass Solution:\n def shortestPath(self, grid: List[List[int]], k: int) -> int:\n (...TRUNCATED) | 0.61405 | "# cook your dish here\nclass TestCase:\n def __init__(self):\n [self.node_count, self.que(...TRUNCATED) | 0.613736 | "def list_input():\n return list(map(int,input().split()))\ndef map_input():\n return map(int,(...TRUNCATED) | 0.612984 | "n, m, k = map(int, input().split())\nif k == -1 and n % 2 != m % 2:\n\tprint(0)\nelse:\n\tprint(pow(...TRUNCATED) | 0.612108 | "n, m, k, l = map(int, input().split())\ncnt = (k + l + m - 1) // m\nif cnt * m > n:\n print(-1)\(...TRUNCATED) | 0.610357 | "import sys\nn = 500001\nsqrt = int(0.75 * n**0.5)\n\ndata = [0]*(n)\nans = [[]]\nout = []\nfor i in(...TRUNCATED) | 0.609774 | "import sys\n\n \ndef main():\n #n = iinput()\n #k = iinput() \n #m = iinput() \n #n (...TRUNCATED) | 0.609608 | "from collections import defaultdict\nimport copy\n#def dfs(l,r,dct):\ndef dfs(l,r,dct):\n visit=[0 (...TRUNCATED) | 0.609026 | "n, m, k = list(map(int,input().split()))\ndm, dp = {}, {}\nvis = {}\nsensors = []\nborder = set()\n(...TRUNCATED) | 0.60829 | "import collections\nimport math\nn, k, m = [int(i) for i in input().split()]\nl = math.ceil((math.l(...TRUNCATED) | 0.608263 | "from sys import stdin\n\nn,k = list(map(int, stdin.readline().strip().split(' ')))\n\nAB = []\nA = (...TRUNCATED) | 0.607561 | "# cook your dish here\n# cook your dish here\nMOD = 10 ** 9 + 7\n \nfor t in range(int(input())):\n(...TRUNCATED) | 0.607348 | "t=int(input())\ndef check():\n pref = [0]*n\n pref[0]=a[0]\n suff = [0]*n\n suff[-1]=a[(...TRUNCATED) | 0.606969 | "#!/usr/local/bin/python3.3 -tt\n\nimport sys\n\ndef __starting_point():\n def _(f):\n for(...TRUNCATED) | 0.604547 | "for testcase in range(int(input())):\n n = int(input())\n cnt2, cnt3 = 0, 0\n while n % 2 (...TRUNCATED) | 0.603514 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n a=0\n b=0\n N,K,x,y=map(int,input().spl(...TRUNCATED) | 0.603494 | "def mod(a,b,c):\n x = 1\n y = a\n while(b>0):\n if(b%2==1):\n x = (x*y)%c\n y = (y*y)%c\n b /=(...TRUNCATED) | 0.603358 | "from sys import stdin, stdout\n\nk = int(stdin.readline())\nn, m = map(int, stdin.readline().split((...TRUNCATED) | 0.603278 | "mod = 1000000007\n\ndef sum(x, y, k, add) :\n if k < add : return 0\n up = x + add\n if up(...TRUNCATED) | 0.603186 | "def main():\n\t(n, k) = (int(x) for x in input().split())\n\t(a, b, c, d) = (int(x) for x in input((...TRUNCATED) | 0.603141 |
"You are given three sequences: $a_1, a_2, \\ldots, a_n$; $b_1, b_2, \\ldots, b_n$; $c_1, c_2, \\ldo(...TRUNCATED) | "import sys\nimport random\nfrom fractions import Fraction\nfrom math import *\n \ndef input():\n (...TRUNCATED) | 0.758736 | "class Node:\r\n def __init__(self,x):\r\n self.x=x\r\n self.next=None\r\n s(...TRUNCATED) | 0.650493 | "T = int(input())\nfor t in range(T):\n a, b, n = [int(i) for i in input().split()]\n if n%3 =(...TRUNCATED) | 0.642695 | "import os\nfrom io import BytesIO\nimport sys\nimport threading\n\n\nsys.setrecursionlimit(10 ** 9)(...TRUNCATED) | 0.634359 | "mii = 3*10**4\n\nfactors = [set() for _ in range(mii + 1)]\nfactors[1] = set([1])\n\nfor k in range(...TRUNCATED) | 0.628918 | "import sys;\n\nnbDancers, nbDances = list(map(int, sys.stdin.readline().split(' ')));\ndancers = [0(...TRUNCATED) | 0.61164 | "T=int(input()) # cook your dish here\nfor i in range(T): \n n=list(map(int,input().split()))\n (...TRUNCATED) | 0.606386 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nT = int(input())\nfor _ in range(T):\n(...TRUNCATED) | 0.605993 | "def eq_solve(v0, v1, u0, u1):\r\n den = u0 - v0\r\n num = u1 - v1\r\n if den != 0:\r\n (...TRUNCATED) | 0.596886 | "# Python3 program to find XNOR\n# of two numbers\nimport math\n\n\ndef swap(a, b):\n temp = a\n a =(...TRUNCATED) | 0.596449 | "\"\"\"\nCodeforces Round 240 Div 1 Problem B\n\nAuthor : chaotic_iak\nLanguage: Python 3.3.4\n\"\"(...TRUNCATED) | 0.594059 | "a = []\nb = []\nfor i in range(3):\n t = input().split() \n a.append([int(t[0]), int(t[1(...TRUNCATED) | 0.586019 | "import math\nfrom collections import deque\nfrom sys import stdin, stdout\nfrom string import ascii(...TRUNCATED) | 0.578485 | "# Md. Khairullah Gaurab\n# SUST, CSE, 20th Batch\n# gaurab.cse.sust@gmail.com\n\n\ntest = int(inpu(...TRUNCATED) | 0.574624 | "t = int(input())\nfor i in range(t):\n n = int(input())\n suffixes = {}\n xx = input().split()\n fo(...TRUNCATED) | 0.573776 | "N=100001\nfac=[0 for i in range(N)]\nfor i in range(1,N):\n for j in range(i,N,i):\n fac[(...TRUNCATED) | 0.572511 | "t=int(input())\nfor i in range(0,t):\n n=int(input())\n lis=list(map(int,input().split()))\n lis2=[(...TRUNCATED) | 0.572294 | "t = int(input())\nwhile(t>0):\n t-=1;\n n,l,r = list(map(int,input().split()));\n a = bin(l)[2:];\n(...TRUNCATED) | 0.570735 | "t=int(input())\nfor nt in range(t):\n\ta,b,c=map(int,input().split())\n\tprint (max(0,abs(a-b)+abs((...TRUNCATED) | 0.570094 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n a = list(map(int, input().split()(...TRUNCATED) | 0.569967 | "\r\n\r\nd = 10**9 + 7\r\n\r\nt = int(input())\r\nwhile t:\r\n t-=1\r\n n =int(input())\r\n (...TRUNCATED) | 0.568784 | "from sys import stdin\nfrom fractions import Fraction\n\ninput = stdin.readline\n\nfor _ in range(i(...TRUNCATED) | 0.563998 | "# cook your dish here\ntest_cases = int(input())\nfor i in range(test_cases):\n no_of_elements = in(...TRUNCATED) | 0.560367 | "#list(map(int,input().split()))\nt=int(input())\nfor _ in range(t):\n n=int(input())\n aa=lis(...TRUNCATED) | 0.559473 | "from sys import stdin,stderr\ndef rl():\n return [int(w) for w in stdin.readline().split()]\n\nd(...TRUNCATED) | 0.558075 | "from itertools import permutations as p\ndef disc(a,b):\n for ai in a:\n for bi in b:\n if ai==b(...TRUNCATED) | 0.557663 | "import sys\ninput = sys.stdin.readline\nout = []\n\nt = int(input())\nfor _ in range(t):\n n = i(...TRUNCATED) | 0.556345 | "TC = int(input())\nwhile TC > 0:\n n, a, b = list(map(int, input().split()))\n ans = \"\"\n (...TRUNCATED) | 0.555659 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor testcases in range(t):\n n=int(inp(...TRUNCATED) | 0.552647 | "def fun(a,cur,n,cnt):\n if cur>=n-1:\n return\n for i in range(cur,n-1):\n if i(...TRUNCATED) | 0.548313 | "# cook your dish here\n\"\"\"\nInput:\nThe first line of the input contains a single integer T deno(...TRUNCATED) | 0.546896 | "d=1000000007\nfor _ in range(int(input())):\n l=sorted(list(map(int,input().split())))\n ans=(l[0]%(...TRUNCATED) | 0.54666 | "# Problem: http://www.codechef.com/JULY09/submit/CUBESUM/ \n# Author: Susam Pal\n\ndef computeA():\(...TRUNCATED) | 0.546571 | "#CF Round 150. Div II Prob. A - Dividing Orange\nimport sys\n\nIn = sys.stdin\nn, k = [int(x) for x(...TRUNCATED) | 0.546549 | "T= int(input());\n\nfor i in range(T):\n n,k = list(map(int,input().split()));\n s=list(map(int,inp(...TRUNCATED) | 0.546069 | "# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!\n# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!\n# TAIWAN NUMBER ONE(...TRUNCATED) | 0.545889 | "from bisect import *\nd = [{}, {}]\ni = [0, 0]\nfor q in range(int(input())):\n a, t, x = map(in(...TRUNCATED) | 0.545651 | "def gcd(a, b):\n if a == 0:\n return b\n return(gcd(b % a, a))\n\nt = int(input())\nfor T in range(...TRUNCATED) | 0.545353 | "for _ in range(int(input())):\n a,b,c = list(map(int, input().split()))\n x,y,z = list(map(in(...TRUNCATED) | 0.545335 | "IN = input\nrint = lambda: int(IN())\nrmint = lambda: map(int, IN().split())\nrlist = lambda: list((...TRUNCATED) | 0.545311 | "# coding=utf-8\nfrom functools import reduce\n\na = input()\nb = input()\nc = input()\n\nalen = len(...TRUNCATED) | 0.543781 | "import sys\nimport random\nfrom math import *\n \ndef input():\n return sys.stdin.readline().str(...TRUNCATED) | 0.543471 | "from collections import *\ndef go():\n n,s,t=int(input()),input(),input()\n if Counter(s)!=Counter((...TRUNCATED) | 0.543166 | "import sys\ninput = sys.stdin.readline\n\ndef solve(ax,ay,bx,by,cx,cy):\n x = ax+bx+cx\n y = (...TRUNCATED) | 0.542591 | "import sys\n\ndef binpow(a, n, p):\n res = 1\n while n > 0:\n if n % 2 == 1:\n (...TRUNCATED) | 0.541975 | "import sys\nfrom collections import Counter\nreadline = sys.stdin.readline\n\nN = int(readline())\n(...TRUNCATED) | 0.541466 | "t=int(input())\nfor q in range(t):\n n=int(input())\n x=list(map(int,input().split()))\n dic={}\n d(...TRUNCATED) | 0.540883 | "t = int(input())\nfor _ in range(t):\n n = int(input())\n l = list([int(x)- 1 for x in input((...TRUNCATED) | 0.540774 | "def solve(a):\n for i in a:\n li = [i]\n while 1:\n if li[-1] % 3 == 0 (...TRUNCATED) | 0.537756 | "import math\ndef csb(n): \n count = 0\n while (n): \n n &= (n-1) \n count+= 1\n \n return count\(...TRUNCATED) | 0.537279 | "def read_int():\n return int(input())\n\n\ndef read_ints():\n return list(map(int, input().sp(...TRUNCATED) | 0.535306 | "# cook your dish here\nfor _ in range(int(input())):\n l,n,x=map(int,input().split())\n m=[]\(...TRUNCATED) | 0.533132 | "def f(arr):\n d = max(arr)\n for i in range(len(arr)):\n arr[i] = d - arr[i]\n\n\n# fo(...TRUNCATED) | 0.532807 | "import sys\n\nrd = lambda : sys.stdin.readline().rstrip()\n\nt = int(rd())\nfor _ in range(t):\n (...TRUNCATED) | 0.531584 | "from itertools import permutations\n\ndef solve(n,a):\n ans=[]\n \n for des in desire:\n check=1\n(...TRUNCATED) | 0.53141 | "eps=1e-8\nt=int(input())\nfor ii in range(t):\n n=int(input())\n l=[int(i) for i in input().s(...TRUNCATED) | 0.530564 | "t = int(input())\n\nfor ti in range(t):\n\tn = int(input())\n\n\tlri = [None for _ in range(n)]\n\n(...TRUNCATED) | 0.530511 | "try:\n # cook your dish here\n t=int(input())\n for j in range(t):\n n=int(input())\n x=[]\n p=[(...TRUNCATED) | 0.530002 | "for testcase in range(int(input())):\n vals = list(map(int, input().split()))\n \n ans = N(...TRUNCATED) | 0.529307 | "n=int(input())\na=list(map(int,input().split()))\nq=int(input())\nwhile q>0:\n i=1\n tot=a[0]\n b=l(...TRUNCATED) | 0.52875 | "from __future__ import division, print_function\npy2 = round(0.5)\n\nif py2:\n from future_built(...TRUNCATED) | 0.528688 | "import sys\ninput = sys.stdin.readline\n\ndef dfs(x,S):\n #print(x,S)\n for i in range(len(S)(...TRUNCATED) | 0.526727 | "def modgroup(M = 10**9+7, invn = 0) :\n\texec(f'''class mod{M} :\n\tinv = [None] * {invn}\n\tif {in(...TRUNCATED) | 0.52649 | "# cook your dish here\nfor _ in range(int(input())):\n n = int(input())\n k = n//4\n # a,b,c = map((...TRUNCATED) | 0.526477 | "# cook your dish here\na=int(input())\np=list(map(int,input().split()))\nfor n in p:\n # n=int(i(...TRUNCATED) | 0.526449 | "for t in range(int(input())):\r\n\tl1=list(map(int,input().split()))\r\n\tl2=list(map(int,input().s(...TRUNCATED) | 0.525385 | "# cook your dish here\nfor _ in range(int(input())):\n n = int(input())\n count = 1\n l = (...TRUNCATED) | 0.524967 | "# Enter your code here. Read input from STDIN. Print output to STDOUT\nx=int(input())\ny=int(input((...TRUNCATED) | 0.524939 | "def powof3(x):\n ans=0\n while(x%3==0):\n x=x//3\n ans+=1\n return ans\n\n\n(...TRUNCATED) | 0.524897 | "import math as mt \nimport sys,string\ninput=sys.stdin.readline\nprint=sys.stdout.write\nimport ran(...TRUNCATED) | 0.524186 | "import sys\n\ndef mex(S,W,C,start,end):\n \"\"\"Returns Nim-number of S[start:end]\"\"\"\n ke(...TRUNCATED) | 0.524138 | "from math import *\nt = int(input())\nfor _ in range(t):\n n = int(input())\n a = [int(d) for(...TRUNCATED) | 0.522506 | "# cook your dish here\nfor t in range(int(input())):\n a,b,c=map(int,input().split())\n p=(c/(...TRUNCATED) | 0.522056 | "# cook your dish here\nfor u in range(int(input())):\n n=int(input())\n l=list(map(int,input().spli(...TRUNCATED) | 0.519667 | "import sys\nreadline = sys.stdin.readline\n\nT = int(readline())\nAns = [None]*T\nfor qu in range(T(...TRUNCATED) | 0.518602 | "# cook your dish here\nfor _ in range(int(input())):\n n = int(input())\n a = list(map(int,in(...TRUNCATED) | 0.518464 | "import sys\nf = sys.stdin\n#f = open(\"input.txt\", \"r\")\na = [list(map(int, i.split())) for i in(...TRUNCATED) | 0.518122 | "for __ in range(int(input())):\n n = int(input())\n ar = list(map(int, input().split()))\n (...TRUNCATED) | 0.516831 | "import sys\n\n \ndef main():\n #n = iinput()\n #k = iinput() \n #m = iinput() \n #n (...TRUNCATED) | 0.516687 | "from sys import stdin\ninput = stdin.readline\nq = int(input())\nfor _ in range(q):\n a,b,n = ma(...TRUNCATED) | 0.51658 | "import sys\ninput = sys.stdin.readline\nfrom collections import deque\n\nt=int(input())\nfor tests (...TRUNCATED) | 0.516137 | "\ndef __starting_point():\n N = int(input())\n L = [0,0,0,0,0,0,0,0]\n inp = input()\n (...TRUNCATED) | 0.516122 | "def triple_trouble(one, two, three):\n return ''.join(''.join(a) for a in zip(one, two, three))\(...TRUNCATED) | 0.515875 | "t=int(input())\ncount=[]\n\nfor i in range(t) :\n s = input()\n a,b,c,n = s.split()\n n=int(n)\n d (...TRUNCATED) | 0.515433 | "from collections import *\nimport sys\ntry: inp = raw_input\nexcept: inp = input\ndef err(s):\n (...TRUNCATED) | 0.515165 | t=int(input())
for j in range(t):
a,b,c,d=map(int, input().split())
print(b,c,c) | 0.515001 | "for _ in range(int(input())):\n a,o,g=map(int,input().split())\n while g>0:\n if a<o:\n a+=1\n (...TRUNCATED) | 0.514247 | "from sys import stdin\ninput = stdin.readline\nq = int(input())\nfor rwerew in range(q):\n\tn = int(...TRUNCATED) | 0.512824 | "def solve():\n n = int(input())\n a = list(map(int, input().split()))\n c = [0] * (n + 1)\(...TRUNCATED) | 0.512238 | "q = int(input())\nfor qi in range(q):\n n = int(input())\n a = list(map(int, input().split())(...TRUNCATED) | 0.512048 | "# http://codeforces.com/problemset/problem/848/B\nfrom collections import defaultdict\n\n\ndef get_(...TRUNCATED) | 0.51186 | def shuffle_it(A,*T):
for x,y in T:
A[x],A[y]=A[y],A[x]
return A
| 0.511137 | "def solve():\n n = int(input())\n if n % 3 == 0:\n print(n//3,0,0)\n return 0\n(...TRUNCATED) | 0.511023 | "input=__import__('sys').stdin.readline\nfor _ in range(int(input())):\n\tn=int(input())\n\ts=list(m(...TRUNCATED) | 0.510953 | "import sys\nreadline = sys.stdin.readline\n\nT = int(readline())\nMOD = 998244353\nAns = [None]*T\(...TRUNCATED) | 0.510903 | "import sys\nfrom collections import deque\ninput = sys.stdin.readline\n\nt = int(input())\nfor _ in(...TRUNCATED) | 0.510742 | "from bisect import bisect_left as bl\nfrom bisect import bisect_right as br\nimport heapq\nimport m(...TRUNCATED) | 0.510692 | "import sys\ninput = sys.stdin.readline\n\nfrom math import gcd\n\nt = int(input())\nfor _ in range((...TRUNCATED) | 0.510646 | "import sys\n\n# sys.stdin = open('in.txt')\n\ns = sys.stdin.read().split()\np = 0\n\n\ndef getSm(k,(...TRUNCATED) | 0.50947 | "import numpy as np\n\ndef sort_it(array):\n new_list = []\n for i in range(len(array)):\n (...TRUNCATED) | 0.508813 | "t = int(input())\nlist_to_tri = []\nfor i in range(t):\n list_to_tri.append(int(input()))\nlist_(...TRUNCATED) | 0.508383 |
"You have $n$ barrels lined up in a row, numbered from left to right from one. Initially, the $i$-th(...TRUNCATED) | "def solve():\n n, k = map(int,input().split())\n lst = list(map(int,input().split()))\n ls(...TRUNCATED) | 0.637122 | "# cook your dish here\ntestcases=int(input())\n\nfor _ in range(testcases):\n (N,K)=list(map(int(...TRUNCATED) | 0.743936 | "def main():\n T = int(input())\n for t in range(T):\n N,K = map(int, input().split())\n W = list((...TRUNCATED) | 0.736876 | "import sys\ninput = sys.stdin.readline\nT = int(input())\nfor _ in range(T):\n N, K = list(map(i(...TRUNCATED) | 0.725263 | "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: list(map(int, i(...TRUNCATED) | 0.72024 | "import sys\nimport math\n\ndef main(arr,k):\n \n \n x=[]\n y=[]\n \n \n \n for e in arr:\n if e%2=(...TRUNCATED) | 0.704133 | "from sys import stdin,stdout\r\nfrom math import gcd\r\nfor _ in range(int(stdin.readline())):\r\n (...TRUNCATED) | 0.703469 | "def max_sum(arr):\n # Finds the maximum sum of sub-arrays of arr\n max_till_now = -1000000 #m(...TRUNCATED) | 0.698819 | "\nT = int(input())\n\nfor _ in range(T):\n a = int(input())\n hh = sorted(map(int, input().sp(...TRUNCATED) | 0.694358 | "for _ in range(int(input())):\n n = int(input())\n ar = list(map(int, input().split()))\n (...TRUNCATED) | 0.688395 | "n = int(input())\nfor i in range(n) :\n t = int(input())\n li = sorted(list(map(int , input().split(...TRUNCATED) | 0.68748 | "t=eval(input())\nfor q in range(t):\n l=eval(input())\n a=input().split()\n a=[int(x) for x in a]\n(...TRUNCATED) | 0.686969 | "t = int(input())\nfor tc in range(t):\n n,k=list(map(int, input().split()))\n tap = list(map((...TRUNCATED) | 0.6868 | "# cook your dish here\ndef func(arr, k):\n sumi = 0\n for j in range(k):\n sumi += arr(...TRUNCATED) | 0.686239 | "def solve():\n n, k = map(int,input().split())\n lst1 = list(map(int,input().split()))\n l(...TRUNCATED) | 0.674123 | "import sys\ndef input():\n\treturn sys.stdin.readline()[:-1]\n\nt = int(input())\nfor _ in range(t)(...TRUNCATED) | 0.674007 | "import sys\ninput = sys.stdin.readline\n\nt = int(input())\nfor _ in range(t):\n n = int(input()(...TRUNCATED) | 0.670686 | "import math\nt = int(input())\nfor test in range(t):\n n,k = map(int,input().split())\n A = l(...TRUNCATED) | 0.663317 | "for _ in range(int(input())):\n n,k=list(map(int,input().split()))\n c=list(map(int,input().split()(...TRUNCATED) | 0.655037 | "def main():\n t= int(input())\n while(t!=0):\n n,k = list(map(int , input().split()))\n arr = lis(...TRUNCATED) | 0.651709 | "t = int(input())\nfor _ in range(t):\n n, k = list(map(int, input().split()))\n l = list(map((...TRUNCATED) | 0.64663 | "import sys\ninput=sys.stdin.readline\nfor _ in range(int(input())):\n n = int(input())\n t = (...TRUNCATED) | 0.643137 | "(n, k) = map(int, input().split())\na = list(map(int, input().split()))\na.sort()\ncur = 0\nidx = 0(...TRUNCATED) | 0.63728 | "import bisect\ndef inpl(): return [int(i) for i in input().split()]\n\nX = int(input())\nK = int(in(...TRUNCATED) | 0.635116 | "for _ in range(int(input())):\n\n n, k = map(int, input().split())\n l = [*map(int, input())]\n\n c(...TRUNCATED) | 0.634329 | "# cook your dish here\n\nimport collections\n\ndef shortestSubarray(A, K):\n \n \n N = len(A)\n (...TRUNCATED) | 0.633353 | "#\n\nfor _ in range(int(input())):\n n,k = list(map(int,input().split()))\n arr = list(map(int,inpu(...TRUNCATED) | 0.631725 | "import bisect\n\ndef solve(n,x_coords,y_coords,k,ans):\n x_coords.sort()\n dp = []\n for i(...TRUNCATED) | 0.628941 | "#code snippet reference:http://www.geeksforgeeks.org/searching-for-patterns-set -2-kmp-algor(...TRUNCATED) | 0.628606 | "# cook your dish here\n\nimport numpy as np\n \n\ndef minstairs(n,k):\n stairsHeight=[]\n stairs=0\(...TRUNCATED) | 0.628055 | "t = int(input())\n\nfor _ in range(t):\n n, k = [int(x) for x in input().split()]\n l1, r1 = (...TRUNCATED) | 0.62764 | "for __ in range(int(input())):\n n = int(input())\n ar = []\n for ________ in range(n):\n (...TRUNCATED) | 0.626196 | "# cook your dish here\n# from queue import PriorityQueue\n# import bisect\ndef insort(l, v):\n s(...TRUNCATED) | 0.625738 | "'''Author- Akshit Monga'''\nfrom sys import stdin, stdout\ninput = stdin.readline\nt=int(input())\n(...TRUNCATED) | 0.625411 | "# cook your dish here\nfrom sys import stdin, stdout\nfrom collections import defaultdict\nfor _ in(...TRUNCATED) | 0.624834 | "import math as ma\nimport sys\nfrom decimal import Decimal as dec\nfrom itertools import permutatio(...TRUNCATED) | 0.62389 | "import numpy as np\r\nfrom numba import njit\r\ni8 = np.int64\r\n\r\n\r\n@njit\r\ndef solve(a, b, t(...TRUNCATED) | 0.620087 | "# cook your dish here\n\nt = int(input())\nwhile t:\n t -= 1\n n = int(input())\n arr = list(map(in(...TRUNCATED) | 0.619627 | "import sys\ninput = sys.stdin.readline\n\n\nt = int(input())\nfor _ in range(t):\n n = int(input(...TRUNCATED) | 0.619341 | "def f(arr):\n d = max(arr)\n for i in range(len(arr)):\n arr[i] = d - arr[i]\n\n\n# fo(...TRUNCATED) | 0.610172 | "class Solution:\n def maxSumAfterPartitioning(self, arr, k):\n res = [0]\n \n (...TRUNCATED) | 0.609668 | "import sys\nimport math\n\ndef main(arr,k):\n \n ans=0\n for i in range(len(arr)):\n (...TRUNCATED) | 0.60881 | "for i in range(int(input())):\n n=int(input())\n c=[int(z) for z in input().split()]\n c.sort()\n c(...TRUNCATED) | 0.606362 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor test in range(t):\n n=int(input())(...TRUNCATED) | 0.605945 | "from operator import itemgetter\nimport sys\ninput = sys.stdin.readline\n\nMAX_A = 200\nt = int(inp(...TRUNCATED) | 0.60568 | "import sys\ninput = sys.stdin.readline\nfrom bisect import bisect_right\n\nbin_s = [1]\nwhile bin_s(...TRUNCATED) | 0.602542 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n n=int(input())\n nums=list(map(in(...TRUNCATED) | 0.602511 | "# python3\n\ndef readline(): return tuple(map(int, input().split()))\n\n\ndef main():\n n, k = r(...TRUNCATED) | 0.602482 | "\n\ntry:\n n,k = map(int,input().split())\n x = [int(input()) for _ in range(n)]\n k = k//2\n dp = (...TRUNCATED) | 0.601815 | "from itertools import permutations as p\ndef disc(a,b):\n for ai in a:\n for bi in b:\n if ai==b(...TRUNCATED) | 0.601072 | "# cook your dish here\n#t = int(input())\nfor i in range(int(input())):\n n,k = map(int,input().spl(...TRUNCATED) | 0.597896 | "# cook your dish here\nT=int(input())\nfor _ in range(T):\n n=int(input())\n arr=list(map(int,input(...TRUNCATED) | 0.597483 | "# cook your dish here\nfor t in range(int(input())):\n n,k=map(int,input().split())\n a=[]\n (...TRUNCATED) | 0.596276 | "n = int(input())\nvs = [int(x) for x in input().split()]\nts = [int(x) for x in input().split()]\n\(...TRUNCATED) | 0.595559 | "# cook your dish here\nfor _ in range(int(input())):\n n,k=list(map(int,input().split()))\n a=list((...TRUNCATED) | 0.595146 | "#dt = {} for i in x: dt[i] = dt.get(i,0)+1\r\nimport sys;input = sys.stdin.readline\r\ninp,ip = lam(...TRUNCATED) | 0.593949 | "for t in range(int(input())):\n n=int(input())\n a=list(map(int,input().split()))\n s=0\n l=[]\n fo(...TRUNCATED) | 0.593778 | "t=int(input())\nfor _ in range(t):\n n=int(input())\n a=list(map(int,input().split()))\n a.sort()\n(...TRUNCATED) | 0.592571 | "for ei in range(int(input())):\n n, k = map(int, input().split())\n A = list(map(int, input()(...TRUNCATED) | 0.59225 | "from itertools import accumulate\nfrom bisect import bisect_right\nimport sys\n\nn, q = list(map(in(...TRUNCATED) | 0.592106 | "from sys import stdin\nfor _ in range(int(input())):\n n = int(input())\n l = list(map(int,in(...TRUNCATED) | 0.591975 | "import sys\nfrom math import *\n\ndef minp():\n\treturn sys.stdin.readline().strip()\n\ndef mint():(...TRUNCATED) | 0.590679 | "from collections import deque\nt=int(input())\n\nfor i in range(t):\n n=int(input())\n N=[i for i i(...TRUNCATED) | 0.590326 | "import sys\nsys.setrecursionlimit(100000)\n\nmemo = {}\ndef recurse(arr, T1, T2, k, i):\n if T1 >= (...TRUNCATED) | 0.590252 | "n, k = list(map(int, input().split()))\nA = list(map(int, input().split()))\nmaximum = max(A)\nmini(...TRUNCATED) | 0.589194 | "\nfor _ in range(int(input())):\n n = int(input())\n arr = list(map(int, input().split()))\n hrs = (...TRUNCATED) | 0.58827 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nANS = []\nT = int(input())\nfor _ in r(...TRUNCATED) | 0.586498 | "for _ in range(int(input())):\n n=int(input())\n l=list(map(int,input().split()))\n a=[]\n(...TRUNCATED) | 0.586307 | "# cook your dish here\nfor _ in range(int(input())):\n n=int(input());li=list(map(int,input().sp(...TRUNCATED) | 0.585212 | "def subsolve(a):\n c = 0\n m = 0\n for i in a:\n c += i\n if c < 0:\n (...TRUNCATED) | 0.585049 | "from sys import stdin\ndef gt(num):\n if num:\n return num\n return 0\nfor __ in range(int(stdin.r(...TRUNCATED) | 0.584659 | "# cook your dish here\ndef index(n,val):\n while(val >= n):\n val = val//2\n return n (...TRUNCATED) | 0.583458 | "def fact(n):\n if n<2:\n return 1\n return n * fact(n-1)\n \ndef ncr(n, r):\n return fact(n)// (fa(...TRUNCATED) | 0.582242 | "t=int(input())\nwhile t>0 :\n n=int(input())\n a=list(map(int,input().split()))\n an=0\n (...TRUNCATED) | 0.58177 | "# cook your dish here\nimport bisect\n\nfor _ in range(int(input())):\n w,k=map(str, input().split((...TRUNCATED) | 0.580894 | "from bisect import *\nfor x in range(eval(input())):\n n,k = list(map(int,input().split()))\n arr =(...TRUNCATED) | 0.578333 | "\"\"\"\n4\n4\n4 3 1 2\n6\n1 2 2 1 3 1\n5\n10 1 2 10 5\n4\n1 2 1 2\n\"\"\"\ntests = int(input())\n\n(...TRUNCATED) | 0.577983 | "__author__ = 'Think'\nn=int(input())\naints=[int(i) for i in input().split()]\npermutes=[int(i)-1 f(...TRUNCATED) | 0.577757 | "t = int(input())\nfor i in range(t):\n n = int(input())\n arr = [int(x) for x in input().spli(...TRUNCATED) | 0.576904 | "import sys\nfrom sys import stdin\n\nimport bisect\n\ndef LIS(lis , end):\n\n seq = []\n\n fo(...TRUNCATED) | 0.576859 | "\nt=int(input())\nfor nbt in range(t):\n n,k=[int(i) for i in input().split()]\n a=[int(i) fo(...TRUNCATED) | 0.576648 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n n=int(input())\n a=list(map(int,input()(...TRUNCATED) | 0.576561 | "import sys\n\n(n, k) = [int(x) for x in sys.stdin.readline().strip().split()]\n\nans = -99999999999(...TRUNCATED) | 0.576066 | "from bisect import insort\nfrom math import ceil\nfor _ in range(int(input())):\n n,k=list(map(int,(...TRUNCATED) | 0.574795 | "from itertools import permutations\n\nfor _ in range(int(input())):\n N,K=list(map(int,input().spli(...TRUNCATED) | 0.57447 | "n, k = list(map(int, input().split()))\na = list(map(int, input().split()))\nd = list(map(int, inpu(...TRUNCATED) | 0.574126 | "#!usr/bin/env python3\nfrom collections import defaultdict, deque\nfrom heapq import heappush, heap(...TRUNCATED) | 0.57351 | "import sys\ninput = sys.stdin.readline\nimport bisect\n\nt=int(input())\nfor tests in range(t):\n (...TRUNCATED) | 0.572592 | "from sys import stdin, stdout\n\nrd = lambda: list(map(int, stdin.readline().split()))\n\nn, m, k =(...TRUNCATED) | 0.572403 | "test = int(input())\nfor _ in range(test):\n n, m = map(int, input().split())\n indexArray = list(m(...TRUNCATED) | 0.57173 | "try:\n a=list(map(int,input().split()))\n n=a[0]\n k=a[1]\n hi=[]\n for i in range(n(...TRUNCATED) | 0.57084 | "class Solution:\n def smallestRangeII(self, A: List[int], K: int) -> int:\n if not A:\n (...TRUNCATED) | 0.569289 | "t=int(input())\n\ndef diffe(a,b):\n return int(a-b)\n\nwhile t :\n t=t-1\n \n lia=[]\n lib=[]\n lik(...TRUNCATED) | 0.569153 | "from math import gcd\r\n\r\n__author__ = 'Prateek'\r\n\r\n\r\ndef test():\r\n n = int(input())\r(...TRUNCATED) | 0.568577 | "for _ in range(int(input())):\n n=int(input())\n f=list(map(int,input().split()))\n sum1=f[0]\n d=0(...TRUNCATED) | 0.568241 | "n, k = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nans = 0\nfor i in ra(...TRUNCATED) | 0.567946 | "import sys\nreadline = sys.stdin.readline\n\nclass Segtree:\n def __init__(self, A, intv, initia(...TRUNCATED) | 0.566939 | "for i in range(int(input())):\n n = int(input())\n c = list(map(int, input().split()))\n d(...TRUNCATED) | 0.566374 | "try:\n n, k=map(int, input().split())\n arr=list(map(int, input().split()))\n forward = [0(...TRUNCATED) | 0.566196 | "class Solution:\n def maxProfit(self, k, prices):\n \"\"\"\n :type k: int\n (...TRUNCATED) | 0.565793 | "import sys\ninput = sys.stdin.readline\nfrom collections import defaultdict\n\nclass Unionfind:\n (...TRUNCATED) | 0.565715 |
"You are given a permutation $p=[p_1, p_2, \\ldots, p_n]$ of integers from $1$ to $n$. Let's call th(...TRUNCATED) | "for _ in range(int(input())):\n input()\n nums = [int(x) for x in input().split()]\n new_a(...TRUNCATED) | 0.768165 | "for _ in range(int(input())):\n n = int(input())\n P = list(map(int, input().split()))\n a(...TRUNCATED) | 0.723144 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nT = int(input())\nfor _ in range(T):\n(...TRUNCATED) | 0.703235 | "for _ in range(int(input())):\n\tn=int(input())\n\ts=list(map(int,input().split()))\n\tl=s.index(1)(...TRUNCATED) | 0.689056 | "for _ in range(int(input())):\n n=int(input())\n arr=list(map(int,input().split()))\n d=se(...TRUNCATED) | 0.678003 | "n = int(input())\na = list(map(int, input().split()))\np = [0] * (n + 1)\nans = [1] * (n + 1)\nind (...TRUNCATED) | 0.673073 | "# cook your dish here\ndef index(n,val):\n while(val >= n):\n val = val//2\n return n (...TRUNCATED) | 0.670663 | "for _ in range(int(input().strip())):\n n = int(input().strip())\n lst = []\n for i in ran(...TRUNCATED) | 0.670365 | "input=__import__('sys').stdin.readline\nfor _ in range(int(input())):\n\tn=int(input())\n\ts=list(m(...TRUNCATED) | 0.664866 | "import sys\n\ninput=sys.stdin.readline\n\n#t=1\nt=int(input())\nfor _ in range(t):\n n=int(input(...TRUNCATED) | 0.659751 | "import math\nfrom collections import deque\nfrom sys import stdin, stdout\nfrom string import ascii(...TRUNCATED) | 0.659595 | "from sys import stdin,stderr\ndef rl():\n return [int(w) for w in stdin.readline().split()]\n\nd(...TRUNCATED) | 0.655881 | "t = int(input())\nfor _ in range(t):\n\ts = input()\n\tn = len(s)\n\tif s.count('1') == n or s.coun(...TRUNCATED) | 0.655562 | "# cook your dish here\nfor _ in range(int(input())):\n n=int(input())\n if n==1:\n pri(...TRUNCATED) | 0.651425 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor test in range(t):\n n=int(input())(...TRUNCATED) | 0.649827 | for i in range(int(input())):
n = int(input())
q = "1"+"0"*(n//2)
print(1,q) | 0.649503 | "# ------------------- fast io --------------------\nimport os\nimport sys\nfrom io import BytesIO, (...TRUNCATED) | 0.648528 | "from collections import defaultdict as dd\nfrom collections import deque\nimport bisect\nimport hea(...TRUNCATED) | 0.647435 | "T= int(input());\n\nfor i in range(T):\n n,k = list(map(int,input().split()));\n s=list(map(int,inp(...TRUNCATED) | 0.647078 | "test=int(input())\nfor i in range(test):\n n=int(input())\n a=list(map(int,input().split()))\n b=[0(...TRUNCATED) | 0.647045 | "# cook your dish here\nT=int(input())\nfor _ in range(T):\n n=int(input())\n arr=list(map(int,input(...TRUNCATED) | 0.642524 | "import sys\ninput = lambda: sys.stdin.readline().rstrip(\"\\r\\n\")\ninp = lambda: list(map(int,sys(...TRUNCATED) | 0.642027 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor testcases in range(t):\n n=int(inp(...TRUNCATED) | 0.639324 | "def solve():\n n = int(input())\n lst = list(map(int,input().split()))\n if sum(lst) <= n (...TRUNCATED) | 0.639074 | "# encoding: utf-8\nfrom sys import stdin\n\ndef solve(a):\n\n # root node of tries denotes empty(...TRUNCATED) | 0.63835 | "import sys\nreadline = sys.stdin.readline\n\nT = int(readline())\nAns = [None]*T\nfor qu in range(T(...TRUNCATED) | 0.638016 | "N = int( input() )\nA = list( map( int, input().split() ) )\n\nmaxa = max( A )\n\ndef upd( ftree, x(...TRUNCATED) | 0.637462 | "inf = 10 ** 6\nn = int(input())\na = list(map(int, input().split()))\ndist = [inf] * n\nfor i in ra(...TRUNCATED) | 0.63579 | "for _ in range(int(input())):\n # a, b = map(int, input().split())\n n = int(input())\n # (...TRUNCATED) | 0.635597 | "for _ in range(int(input())):\n n = int(input())\n ls = []\n rs = []\n lrs = []\n\n for i in range((...TRUNCATED) | 0.634666 | "# import numpy as npy\n# idx=sorted(idx,key=functools.cmp_to_key(cmpx))\nimport bisect\nimport arra(...TRUNCATED) | 0.632563 | "pref = []\r\n\r\nfor i in range(10 ** 5 + 10):\r\n b = bin(i)[2:]\r\n if not any(b[j] == b[j+(...TRUNCATED) | 0.6314 | "from math import log,pow\nn=int(input())\na=[]\nfor i in range(n):\n no=int(input())\n if(no%2==0):(...TRUNCATED) | 0.629996 | "t=int(input())\nfor _ in range(t):\n n=int(input())\n l=list(map(int,input().split()))\n if sum(l)!(...TRUNCATED) | 0.629409 | "t = int(input())\nfor _ in range(t):\n n = int(input())\n l = list([int(x)- 1 for x in input((...TRUNCATED) | 0.628104 | "import sys\ninput = sys.stdin.readline\nout = []\n\nt = int(input())\nfor _ in range(t):\n n = i(...TRUNCATED) | 0.627855 | "t=int(input())\nfor t in range(t):\n\tn=int(input())\n\ts=input()\n\ta=[int(x) for x in s]\n\tp=a[n(...TRUNCATED) | 0.62785 | "from sys import stdout\n\nn = int(input())\n\n\nclass Person:\n\n num = n - 1\n\n def __init_(...TRUNCATED) | 0.627294 | "for _ in range(int(input())):\n\tn = int(input())\n\tnum = \"\"\n\tval = 1\n\tfor i in range(n):\n\(...TRUNCATED) | 0.626949 | "import sys\ninput = sys.stdin.readline\n\nT = int(input())\nfor _ in range(T):\n n = int(input()(...TRUNCATED) | 0.626492 | "t=int(input())\nfor q in range(t):\n n=int(input())\n x=list(map(int,input().split()))\n dic={}\n d(...TRUNCATED) | 0.625542 | "for __ in range(int(input())):\n a = list(map(int, input()))\n ar1 = []\n ar2 = []\n fo(...TRUNCATED) | 0.622414 | "# cook your dish here\n# cook your dish here\nimport math\ntest=int(input())\nfor _ in range(test):(...TRUNCATED) | 0.622393 | "from itertools import permutations\n\ndef solve(n,a):\n ans=[]\n \n for des in desire:\n check=1\n(...TRUNCATED) | 0.62025 | "from math import gcd\nfrom itertools import groupby\n\ndef gcd_split(seq):\n gcds= [int(gcd(a,b)==1(...TRUNCATED) | 0.618279 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n n=int(input())\n if n<101:\n l1=[]\n (...TRUNCATED) | 0.617669 | "t=int(input())\nfor i in range(0,t):\n n=int(input())\n lis=list(map(int,input().split()))\n lis2=[(...TRUNCATED) | 0.617282 | "# cook your dish here\nfor _ in range(int(input())):\n n = int(input())\n count = 1\n l = (...TRUNCATED) | 0.615879 | "# cook your dish here\na = int(input())\nfor i in range(a):\n n = int(input())\n if n%2==0:\n prin(...TRUNCATED) | 0.615635 | "# cook your dish here\nfrom sys import stdin\nimport functools\ndef gcd(a, b): \n if (a == 0): \n (...TRUNCATED) | 0.614586 | "t = int(input())\n\ndef conv(n):\n k = bin(n)\n k = k[2:]\n z = len(k)\n c = '1'*z\n (...TRUNCATED) | 0.612912 | "import sys\n\ndef myargsort(a):\n b = list(zip(a, list(range(0, len(a)))))\n b.sort()\n r (...TRUNCATED) | 0.612352 | "#!/usr/bin/env python3\nn = int(input())\narr = []\n\nfor i in range(n):\n arr.append(1)\n wh(...TRUNCATED) | 0.612323 | "for __ in range(int(input())):\n n = int(input())\n ar = list(map(int, input().split()))\n (...TRUNCATED) | 0.612101 | "'''Author- Akshit Monga'''\nfrom sys import stdin, stdout\ninput = stdin.readline\nt=int(input())\n(...TRUNCATED) | 0.611486 | "# cook your dish here\na=int(input())\np=list(map(int,input().split()))\nfor n in p:\n # n=int(i(...TRUNCATED) | 0.611348 | "for _ in range(int(input())):\n n=int(input())\n s=input()\n a=\"\"\n b=\"\"\n flag=(...TRUNCATED) | 0.611136 | "from sys import stdin\n\ntt = int(stdin.readline())\n\nfor loop in range(tt):\n\n n = int(stdin.(...TRUNCATED) | 0.610973 | "# cook your dish here\n\nt = int(input())\n\nfor _ in range(t):\n s = ''\n n = int(input())\n(...TRUNCATED) | 0.610842 | "from sys import stdin, stdout\nfrom math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log\n(...TRUNCATED) | 0.610595 | "import sys\ninput = sys.stdin.readline\n\nfrom math import gcd\n\nt = int(input())\nfor _ in range((...TRUNCATED) | 0.609397 | "# cook your dish here\nfor a0 in range(int(input())):\n n = int(input())\n l = []\n for i (...TRUNCATED) | 0.609248 | "# cook your dish here\ndef mergeSort(arr, n): \n # A temp_arr is created to store \n # sorted(...TRUNCATED) | 0.606632 | "# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!\n# TAIWAN NUMBER ONE!!!!!!!!!!!!!!!!!!!\n# TAIWAN NUMBER ONE(...TRUNCATED) | 0.605487 | "tests = int(input())\r\nfor t in range(tests):\r\n n = int(input())\r\n permut='2'\r\n permut_li(...TRUNCATED) | 0.602424 | "# cook your dish here\n# cook your dish here\nfrom math import log2;\nimport sys;\n\nsys.setrecursi(...TRUNCATED) | 0.602331 | "d = [-1] * 1000001\nfor t in range(int(input())):\n n, a = int(input()), list(map(int, input().s(...TRUNCATED) | 0.601584 | "n = int(input())\r\nl = [0] * n\r\nfor x in range(n):\r\n l[x] = int(input())\r\nfor i in range((...TRUNCATED) | 0.600727 | "def fun(a,cur,n,cnt):\n if cur>=n-1:\n return\n for i in range(cur,n-1):\n if i(...TRUNCATED) | 0.599938 | "def ugcd(n):\r\n ans = [[1]]\r\n if(n==1):\r\n return ans\r\n elif(n%2==1):\r\n ans = [[1,(...TRUNCATED) | 0.59892 | "(lambda R:(lambda N:(lambda n:any((lambda z,r:all((lambda p:all(p==k for k in n[j:j+i]))(n[j])for j(...TRUNCATED) | 0.598501 | "t=int(input())\nfor t in range(t):\n n=int(input())\n for i in range(0,n):\n for j in (...TRUNCATED) | 0.598499 | "from sys import setrecursionlimit\nsetrecursionlimit(10 ** 9)\n\ndef solve(i, j, c=0):\n if i > j:\(...TRUNCATED) | 0.598196 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\n\nn=int(input())\nb=list(map(...TRUNCATED) | 0.598075 | "n=int(input())\na=[]\nfor i in range(n):\n a.append(list(map(int,input().split())))\nans = [0]*n\n(...TRUNCATED) | 0.597078 | "# for _ in range(1):\nfor _ in range(int(input())):\n # a, b = map(int, input().split())\n n (...TRUNCATED) | 0.596612 | "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: map(int, input((...TRUNCATED) | 0.596204 | "mod=10**9+7\ndef pow2(x):\n p,n=1,2\n while(x):\n if(x & 1): p=((p%mod) * (n%mod))%mod\n\n n=((n%(...TRUNCATED) | 0.595443 | "n = int(input())\npos,tree,ans,sz = list(map(int,input().split())) if n > 1 else [],[],[],[]\nfor i(...TRUNCATED) | 0.595242 | "t = int(input())\nfor faw in range(t):\n n = int(input())\n a = [0] + list(map(int,input().sp(...TRUNCATED) | 0.595133 | "\n\n\ndef powerset(s):\n n = len(s)\n masks = [1 << j for j in range(n)]\n for i in range((...TRUNCATED) | 0.594638 | "def det(s, i, j):\n ans = 0\n curr = i\n for a in s:\n if a == curr:\n a(...TRUNCATED) | 0.594626 | "m=int(input())\nwhile m:\n m-=1\n n=int(input())\n t=[i for i in input().split()]\n pri(...TRUNCATED) | 0.594246 | "import sys\nimport math\nfrom collections import defaultdict\nfrom itertools import combinations\nf(...TRUNCATED) | 0.592574 | "T = int(input())\nfor test in range(T):\n n,t = list(map(int,input().split()))\n a = list(map(...TRUNCATED) | 0.59248 | "for i in range(int(input())):\n n = int(input())\n c = list(map(int, input().split()))\n d(...TRUNCATED) | 0.590921 | "import math\ndef findnumber(l,n):\n l.sort()\n x = l[0] * l[-1]\n vec = []\n i = 2\n (...TRUNCATED) | 0.59088 | "import sys\nimport string\nfrom math import gcd\nimport getpass\nimport math\nfrom decimal import D(...TRUNCATED) | 0.590855 | "from collections import deque\nn = int(input())\ns = input()\ngraph = {}\nfor i in range(n):\n g(...TRUNCATED) | 0.590518 | "# cook your dish here\nfor _ in range(int(input())):\n n = int(input())\n a = list(map(int,in(...TRUNCATED) | 0.589764 | "t=int(input())\nx=[1,2,3,4,5,6,7]\nfor i in range(t):\n N=int(input())\n a=list(map(int,input().spl(...TRUNCATED) | 0.589343 | "# cook your dish here\nfrom collections import Counter,defaultdict\n\nfor i in range(int(input())):(...TRUNCATED) | 0.589008 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n \n a = {}\n \n for i in (...TRUNCATED) | 0.588397 | "import sys\nn,m=list(map(int,sys.stdin.readline().split()))\n\nA=list(map(int,sys.stdin.readline().(...TRUNCATED) | 0.587986 | "def main():\n while True:\n [n, m] = [int(i) for i in input().split()]\n (...TRUNCATED) | 0.586723 | "# cook your dish here\nt=int(input())\nfor i in range(0,t):\n p=input()\n l=list(p)\n for (...TRUNCATED) | 0.586406 | "# cook your dish here\nimport math;\nfrom math import gcd,sqrt,floor,factorial,ceil\nfrom bisect im(...TRUNCATED) | 0.585518 | "from math import *\n\ndef r1(t):\n return t(input())\n\ndef r2(t):\n return [t(i) for i in in(...TRUNCATED) | 0.585385 | "n = int(input())\np = [int(i) for i in input().split()]\nfor i in range(n):\n tmp = [0] * n\n (...TRUNCATED) | 0.585157 | "import sys\ninput = sys.stdin.readline\nimport bisect\n\nt=int(input())\nfor tests in range(t):\n (...TRUNCATED) | 0.584549 | "# cook your dish here\nimport math\nN = 10**6\nsum_arr = [0] * (N + 1) \ndef lprime():\n arr = [(...TRUNCATED) | 0.583983 |
"The sequence of $m$ integers is called the permutation if it contains all integers from $1$ to $m$ (...TRUNCATED) | "def possible(a):\n ans = set()\n s = set()\n lmax = 0\n for i in range(len(a)):\n (...TRUNCATED) | 0.836696 | "# cook your dish here\nfrom operator import itemgetter\nt=int(input())\nfor _ in range(t):\n n=i(...TRUNCATED) | 0.754793 | "t=int(input())\nfor i in range(t):\n n=int(input())\n print(2)\n print(n-1,n)\n for i i(...TRUNCATED) | 0.704121 | "def read_int():\n return int(input())\n\n\ndef read_ints():\n return list(map(int, input().sp(...TRUNCATED) | 0.700031 | "import sys\n\ninput=sys.stdin.readline\n\n#t=1\nt=int(input())\nfor _ in range(t):\n n=int(input(...TRUNCATED) | 0.691134 | "import sys\n\ndef Is_arth(L):\n D=L[1]-L[0]\n p=L[1]\n for i in range(2,len(L)):\n (...TRUNCATED) | 0.685326 | "def ugcd(n):\r\n ans = [[1]]\r\n if(n==1):\r\n return ans\r\n elif(n%2==1):\r\n ans = [[1,(...TRUNCATED) | 0.683294 | "import sys\ninput = sys.stdin.readline\nfrom collections import deque\n\nt=int(input())\nfor tests (...TRUNCATED) | 0.683044 | "from collections import deque\nimport sys\n\ndef input():\n return sys.stdin.readline()[:-1]\n\n(...TRUNCATED) | 0.683 | "t=int(input())\nfor q in range(t):\n n=int(input())\n x=list(map(int,input().split()))\n dic={}\n d(...TRUNCATED) | 0.677707 | "T = int(input())\n\nfor t in range(T):\n n = int(input())\n s = 1\n nxt = 2\n x = [1]\n while (...TRUNCATED) | 0.677205 | "#!/usr/bin/env python3\nimport sys\ninput = sys.stdin.readline\n\nt = int(input())\nfor _ in range((...TRUNCATED) | 0.674122 | "# from bisect import bisect_left\n\n# (n) = (int(x) for x in input().split())\nn = int(input())\na (...TRUNCATED) | 0.673921 | "def main():\n t = int(input())\n s1 = \"one\"\n s2 = \"two\"\n for i in range(t):\n (...TRUNCATED) | 0.672508 | "for nt in range(int(input())):\n\tn=int(input())\n\tl=list(map(int,input().split()))\n\ts=sum(l)\n\(...TRUNCATED) | 0.670161 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nT = int(input())\nfor _ in range(T):\n(...TRUNCATED) | 0.668825 | "for _ in range(int(input())):\n n = int(input())\n a = list(map(int,input().split()))\n ans = 0\n c(...TRUNCATED) | 0.667576 | "def solve():\n n = int(input())\n lst = list(map(int,input().split()))\n if sum(lst) <= n (...TRUNCATED) | 0.666465 | "def solve():\n n = int(input())\n a = list(map(int, input().split()))\n c = [0] * (n + 1)\(...TRUNCATED) | 0.663691 | "# cook your dish here\nn=int(input())\nfor _ in range(n):\n a=int(input())\n if(a%2==0):\n f=(a//2(...TRUNCATED) | 0.659163 | "tst = int(input())\nfor i in range(0, tst):\n n = int(input())\n ans = 1\n l = 1\n p = (...TRUNCATED) | 0.658873 | "for test in range(int(input())):\n n = int(input())\n a = list(map(int, input().split()))\n (...TRUNCATED) | 0.656483 | "from fractions import Fraction\nimport bisect\nimport os\nfrom collections import Counter\nimport b(...TRUNCATED) | 0.655198 | "# cook your dish here\nfrom sys import stdin, stdout\n\nfor _ in range(int(stdin.readline())):\n n,(...TRUNCATED) | 0.649747 | "import sys\ninput = sys.stdin.readline\nfrom collections import Counter\n\nt=int(input())\nfor test(...TRUNCATED) | 0.647122 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor test in range(t):\n n=int(input())(...TRUNCATED) | 0.646709 | "# fast io\nimport sys\ndef fop(s): sys.stdout.write(str(s)+'\\n')\ndef fip(): return sys.stdin.read(...TRUNCATED) | 0.64359 | "n = int(input())\narr = []\nfor i in range(n):\n l,r = map(int, input().split())\n arr.append(...TRUNCATED) | 0.64351 | "#import set\nt = eval(input()) \nwhile(t):\n s = input()\n set1 = set()\n j = 0\n for (...TRUNCATED) | 0.64213 | "n=int(input())\r\narr=[0]+[int(x) for x in input().split()]\r\nused=[]\r\nans=[]\r\nfor i in range (...TRUNCATED) | 0.641296 | "T = int(input())\nfor _ in range(T):\n n,m = map(int,input().split())\n completed = list(map(int,in(...TRUNCATED) | 0.638871 | "import itertools\ns = input().strip()\ns_unique_element = list(set(s))\ngroup = []\nkey = []\nfor k(...TRUNCATED) | 0.638255 | "# encoding: utf-8\nfrom sys import stdin\n\ndef solve(a):\n\n # root node of tries denotes empty(...TRUNCATED) | 0.638088 | "n, m = list(map(int, input().split()))\ncolor_pairs = [list(map(int, input().split())) for i in ran(...TRUNCATED) | 0.637579 | "n = int(input())\n\nline = input().split()\nlst = []\nfor num in line:\n lst.append(int(num))\n\(...TRUNCATED) | 0.637199 | "import sys\nimport collections\nrlines = sys.stdin.readlines()\nlines = (l.strip() for l in rlines)(...TRUNCATED) | 0.637016 | "t = int(input())\nfor tt in range(t):\n n,k=list(map(int,input().split()))\n s = input()\n (...TRUNCATED) | 0.635422 | "t=int(input())\nfor tt in range(t):\n n,p=map(int,input().split())\n now=1\n ans=0\n wh(...TRUNCATED) | 0.635186 | "import sys\ninput = sys.stdin.readline\nT = int(input())\nfor _ in range(T):\n N, M = list(map(i(...TRUNCATED) | 0.634287 | "buck = [[0, 0] for i in range(2201)]\nm = int(input())\nfor i in range(m):\n a = int(input())\n (...TRUNCATED) | 0.633709 | "\n\n\ndef powerset(s):\n n = len(s)\n masks = [1 << j for j in range(n)]\n for i in range((...TRUNCATED) | 0.632525 | "t = int(input())\n\nfor i in range(t):\n n, c = list(map(int,input().split()))\n\n pts = {}\n moves(...TRUNCATED) | 0.631878 | "for _ in range(int(input())):\n n=int(input())\n a=[]\n b=[]\n for i in range(4*n-1):\n c,d=list(m(...TRUNCATED) | 0.631694 | "\r\n\r\nz = int(input())\r\ni = 0\r\nwhile i < z:\r\n n = int(input())\r\n p = int(n**(0.5))\r\n (...TRUNCATED) | 0.631004 | "#list(map(int,input().split()))\nt=int(input())\nfor _ in range(t):\n n=int(input())\n aa=lis(...TRUNCATED) | 0.62839 | "for _ in range(int(input())):\n n = int(input())\n arr = [list(input()) for _ in range(n)]\n (...TRUNCATED) | 0.628225 | "from math import sqrt\ndef solve():\n n = int(input())\n for i in range(2, int(sqrt(n)) + 1):(...TRUNCATED) | 0.62782 | "import sys\n\nsys.setrecursionlimit(10 ** 5)\nint1 = lambda x: int(x) - 1\np2D = lambda x: print(*x(...TRUNCATED) | 0.627786 | "# cook your dish here\ndef solve(edges,ans):\n n = len(edges)\n visited = set()\n parents = [-1]*(n(...TRUNCATED) | 0.6276 | "for _ in range(int(input())):\n n,m=input().split()\n n,m=int(n),int(m)\n x=y=c=0\n l=list(map(int,(...TRUNCATED) | 0.626516 | "for _ in range(int(input())):\n n,k=list(map(int, input().split()))\n l=list(map(int, input().split(...TRUNCATED) | 0.625441 | "#!/usr/bin/env python3\n\nfrom collections import defaultdict\n\nDEBUG = False\n\n\ndef main():\n (...TRUNCATED) | 0.625331 | "import sys\nfrom collections import deque\n\ninput=sys.stdin.readline\n\nt=1\nt=int(input())\nfor _(...TRUNCATED) | 0.624625 | "# @author \n\nimport sys\n\nclass GCandyBoxHardVersion:\n def solve(self):\n q = int(inpu(...TRUNCATED) | 0.624578 | "def fact(n):\n if n<2:\n return 1\n return n * fact(n-1)\n \ndef ncr(n, r):\n return fact(n)// (fa(...TRUNCATED) | 0.622609 | "import sys\ninput = sys.stdin.readline\nfor f in range(int(input())):\n n,m=list(map(int,input()(...TRUNCATED) | 0.621914 | "tests = int(input())\r\nfor t in range(tests):\r\n n = int(input())\r\n permut='2'\r\n permut_li(...TRUNCATED) | 0.621773 | "\n\nimport fractions\nimport sys\n\nf = sys.stdin\n\nif len(sys.argv) > 1:\n f = open(sys.argv[1], (...TRUNCATED) | 0.621153 | "n = int(input())\n\ndef pr(x):\n\tfor i in range(2, x):\n\t\tif x % i == 0:\n\t\t\treturn False\n\t(...TRUNCATED) | 0.62006 | "# python3\n\n\ndef readline(): return list(map(int, input().split()))\n\n\ndef solve(d):\n while(...TRUNCATED) | 0.620022 | "# cook your dish here\nfor u in range(int(input())):\n n=int(input())\n l=list(map(int,input().spli(...TRUNCATED) | 0.619972 | "t=int(input())\nfor i in range(t):\n n,m=list(map(int,input().split()))\n l=[0]+list(map(int,input((...TRUNCATED) | 0.618856 | "from sys import stdin\n\nfor _ in range(int(stdin.readline())):\n m, n = list(map(int, stdin.readli(...TRUNCATED) | 0.617644 | "def main():\n n = int(input())\n teams = [input().split() for _ in range(n)]\n ans = [list(...TRUNCATED) | 0.616775 | "import sys\ninput = sys.stdin.readline\n\nt=int(input())\nfor testcases in range(t):\n n=int(inp(...TRUNCATED) | 0.614406 | "import sys\n\nt = int(sys.stdin.readline())\n\nfor _ in range(t):\n n = int(sys.stdin.readline()(...TRUNCATED) | 0.613942 | "t = int(input())\nfor _ in range(t):\n n = int(input())\n l = list([int(x)- 1 for x in input((...TRUNCATED) | 0.611559 | "import sys\n\nrd = lambda : sys.stdin.readline().rstrip()\n\nt = int(rd())\nfor _ in range(t):\n (...TRUNCATED) | 0.61138 | "for _ in range(int(input())):\n x,y=map(int,input().split())\n if(x==y):\n if(x==1):\n(...TRUNCATED) | 0.610251 | "# cook your dish here\nfor _ in range(int(input())):\n s=input()\n count=0\n i=0\n while i<len(s)-1(...TRUNCATED) | 0.609333 | "d = [-1] * 1000001\nfor t in range(int(input())):\n n, a = int(input()), list(map(int, input().s(...TRUNCATED) | 0.609261 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n n=int(input())\n if n<101:\n l1=[]\n (...TRUNCATED) | 0.607373 | "# cook your dish here\nimport math;\nfrom math import gcd,sqrt,floor,factorial,ceil\nfrom bisect im(...TRUNCATED) | 0.607269 | "line = input()\ntest = 0\n\nwhile line != \"0\":\n test += 1\n d = {'0':0,'1':0,'2':0,'3':0,'(...TRUNCATED) | 0.606997 | "# cook your dish here\na = int(input())\nfor i in range(a):\n b = int(input())\n li = []\n if b == (...TRUNCATED) | 0.605247 | "def det(s, i, j):\n ans = 0\n curr = i\n for a in s:\n if a == curr:\n a(...TRUNCATED) | 0.604844 | "from collections import Counter\nt=int(input())\nfor i in range(t):\n k=int(input())\n l=list(map(i(...TRUNCATED) | 0.603534 | "import bisect\n\n\ndef gen_primes(upper_bound):\n upper_bound += 1\n t = [0] * (upper_bound)\(...TRUNCATED) | 0.603128 | "\ndef interesting_nums(m):\n nums = []\n for x in range(m + 1, 2 * m + 1):\n if x * m % (x - m) ==(...TRUNCATED) | 0.601985 | "import math\ndef divisors(n):\n arr = []\n for i in range(1,1+int(math.ceil(math.sqrt(n)))):\n if (...TRUNCATED) | 0.60169 | "# cook your dish here\nfrom math import pow\nt = int(input())\nfor _ in range(t):\n m,n = map(in(...TRUNCATED) | 0.600532 | "from bisect import bisect_left as bl\nfrom bisect import bisect_right as br\nfrom heapq import heap(...TRUNCATED) | 0.600457 | "for _ in range(int(input())):\n n = int(input())\n s = input()\n t = input()\n\n d = {}(...TRUNCATED) | 0.599578 | "for _ in range(int(input())):\n n,k=[int(x) for x in input().split()]\n if k%4==0:\n f(...TRUNCATED) | 0.599552 | "from collections import defaultdict as dd\nfrom collections import deque\nimport bisect\nimport hea(...TRUNCATED) | 0.599375 | "#list(map(int,input().split()))\nt=int(input())\nfor i in range(t):\n n=int(input())\n it=lis(...TRUNCATED) | 0.598472 | "t=eval(input())\nfor i in range(0,t):\n x=input()\n nm=x.split(' ')\n nm[0]=int(nm[0])\n (...TRUNCATED) | 0.598041 | "import sys\ninput=sys.stdin.buffer.readline\nt=1 \nfor __ in range(t):\n a=[]\n n=int(inpu(...TRUNCATED) | 0.597849 | "from sys import stdin\nfor _ in range(int(input())):\n n = int(input())\n l = list(map(int,in(...TRUNCATED) | 0.597371 | "import sys\n\n\n# inf = open('input.txt', 'r')\n# reader = (map(int, line.split()) for line in inf)(...TRUNCATED) | 0.596585 | "# cook your dish here\nt=int(input())\nfor i in range(t):\n D=int(input())\n P=10**5-2\n ans=[]\n i(...TRUNCATED) | 0.596507 | "import bisect\n\ndef pre(a):\n for p in range(n-1):\n if(a[p]>=a[p+1]):\n return p\n return n-1 (...TRUNCATED) | 0.59564 | "def countSubstr(str, n, x, y): \r\n \r\n tot_count = 0\r\n \r\n count_x = 0\r\n \r\n fo(...TRUNCATED) | 0.595468 | "#! /usr/bin/env python\n\n# http://codeforces.com/problemset/problem/818/F\n# Problem name ::: F. L(...TRUNCATED) | 0.595313 | "corr = lambda x, y: 1 <= x <= n and 1 <= y <= m\n\nT = int(input())\na = []\nwhile T:\n a.append(...TRUNCATED) | 0.595274 | "n, m = map(int, input().split())\nx = list(map(int, input().split()))\n\nfoo = [0 for _ in range(2+(...TRUNCATED) | 0.59514 | "T= int(input());\n\nfor i in range(T):\n n,k = list(map(int,input().split()));\n s=list(map(int,inp(...TRUNCATED) | 0.594607 | "for _ in range(int(input())):\n # n, x = map(int, input().split())\n n = int(input())\n ar(...TRUNCATED) | 0.594462 | "import sys\n\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nns = lambda: readline(...TRUNCATED) | 0.594359 | "from sys import stdin,stderr\ndef rl():\n return [int(w) for w in stdin.readline().split()]\n\nd(...TRUNCATED) | 0.59344 | "from sys import stdin\ndef gt(num):\n if num:\n return num\n return 0\nfor __ in range(int(stdin.r(...TRUNCATED) | 0.593242 |
"Arthur owns a ski resort on a mountain. There are $n$ landing spots on the mountain numbered from $(...TRUNCATED) | "import sys\ninput = sys.stdin.readline\nfor f in range(int(input())):\n n,m=list(map(int,input()(...TRUNCATED) | 0.798209 | "import sys\nimport collections\nrlines = sys.stdin.readlines()\nlines = (l.strip() for l in rlines)(...TRUNCATED) | 0.845039 | "import sys\ninput = sys.stdin.readline\nT = int(input())\nfor _ in range(T):\n N, M = list(map(i(...TRUNCATED) | 0.808389 | "n, m = list(map(int, input().split()))\ncolor_pairs = [list(map(int, input().split())) for i in ran(...TRUNCATED) | 0.73704 | "import math\nn,m=map(int,input().split())\nneigh=[]\nfor i in range(n):\n neigh.append([])\nfor (...TRUNCATED) | 0.728265 | "from sys import stdin\r\nfrom math import ceil, gcd\r\n\r\n# Input data\r\n#stdin = open(\"input\",(...TRUNCATED) | 0.728162 | "for t in range(eval(input())):\n \n n = eval(input())\n \n a = [ [] for i in range(n+1) ]\n \n(...TRUNCATED) | 0.722788 | "from sys import stdin, stdout\nimport functools\nimport sys,os,math\n\n#sys.setrecursionlimit(10**6(...TRUNCATED) | 0.720158 | "import sys\ninput=sys.stdin.readline\nn,m=list(map(int,input().split()))\na=[int(x) for x in input(...TRUNCATED) | 0.719734 | "3\n\nimport array\nimport math\nimport os\nimport sys\n\n\nDEBUG = 'DEBUG' in os.environ\n\n\ndef i(...TRUNCATED) | 0.717254 | "from collections import deque\nimport sys\n\ndef input():\n return sys.stdin.readline()[:-1]\n\n(...TRUNCATED) | 0.716385 | "def main():\n n, m = list(map(int, input().split()))\n l = [[] for _ in range(n + 1)]\n fo(...TRUNCATED) | 0.713123 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\nmii=lambda:list(map(int,inpu(...TRUNCATED) | 0.711759 | "N, M = map(int, input().split())\nEdge = []\nfor i in range(M):\n a, b = map(int, input().split((...TRUNCATED) | 0.708917 | "from collections import defaultdict\ndef count(x):\n c=0\n while x > 0:\n c+=1\n (...TRUNCATED) | 0.701358 | "f = lambda: map(int, input().split())\ng = lambda: (a.i, b.i) if a.i < b.i else (b.i, a.i)\n\nclass(...TRUNCATED) | 0.701212 | "import sys\n\n\n# inf = open('input.txt', 'r')\n# reader = (map(int, line.split()) for line in inf)(...TRUNCATED) | 0.698209 | "t=int(input())\nfor _ in range(t):\n n,m=map(int,input().split())\n mat=[0 for i in range(n)](...TRUNCATED) | 0.696488 | "# cook your dish here\ndef solve(edges,ans):\n n = len(edges)\n visited = set()\n parents = [-1]*(n(...TRUNCATED) | 0.695728 | "t = int(input())\n\nfor _ in range(t):\n\tn, m = map(int, input().split())\n\n\ta = list(map(int, i(...TRUNCATED) | 0.693715 | "n,m = list(map(int,input().split()))\nae = [[] for _ in range(n)]\nfor _ in range(m):\n a,b = li(...TRUNCATED) | 0.69126 | "\ntest=int(input())\nfor t in range(test):\n n= int(input())\n\n adj=[[] for i in range(n+1)]\n\n f(...TRUNCATED) | 0.687428 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\nmii=lambda:list(map(int,inpu(...TRUNCATED) | 0.686628 | "import sys\ninput = sys.stdin.readline\n\nT = int(input())\nfor _ in range(T):\n N, M = list(map(...TRUNCATED) | 0.682768 | "n, m = list(map(int, input().split()))\nmaxN = 2 * (10 ** 5) + 10\nedges = [[] for i in range(0, ma(...TRUNCATED) | 0.680688 | "import sys\ninput = sys.stdin.readline\n\nn,m=list(map(int,input().split()))\nFR=[list(map(int,inpu(...TRUNCATED) | 0.68059 | "import sys\ninput = sys.stdin.readline\n\nn, m = list(map(int, input().split()))\ne = [tuple(map(in(...TRUNCATED) | 0.679839 | "import sys\nimport math\ndef getAndParseInt(num=1):\n string = (sys.stdin.readline()).strip()\n (...TRUNCATED) | 0.676409 | "def detect_triangle(adj): \n for x in range(len(adj)):\n for y in adj[x]:\n if not set((...TRUNCATED) | 0.675282 | "def read_data():\n n, m = list(map(int, input().split()))\n Es = [[] for v in range(n)]\n (...TRUNCATED) | 0.67357 | "def read_int():\n return int(input())\n\n\ndef read_ints():\n return list(map(int, input().sp(...TRUNCATED) | 0.672247 | "import sys\nimport threading\nfrom collections import defaultdict\n\ndef put():\n return map(int(...TRUNCATED) | 0.671758 | "import sys\ninput = sys.stdin.readline\n\nfrom collections import deque\n\nt=int(input())\nfor test(...TRUNCATED) | 0.664445 | "t=int(input())\nfor i in range(t):\n n,m=list(map(int,input().split()))\n l=[0]+list(map(int,input((...TRUNCATED) | 0.663238 | "import sys\nfrom math import ceil\ninput = sys.stdin.readline\n \nn, m, req = map(int, input().s(...TRUNCATED) | 0.658322 | "import sys\nimport math\ninput = sys.stdin.readline\n\nn,m=map(int,input().split())\narr=[0]*n\nfor(...TRUNCATED) | 0.658172 | "n, m = map(int, input().split())\ng = []\nfor i in range(n):\n g.append([])\nfor i in range(m):\(...TRUNCATED) | 0.655977 | "m, k = [int(x) for x in input().split()]\n\nseen = 0\nusers = set()\nfriendsof = {}\nfor i in range(...TRUNCATED) | 0.652645 | "T = int(input())\n\nM = 10 ** 9 + 7\n\nfor _ in range(T):\n N = int(input())\n\n A = list(map(int, (...TRUNCATED) | 0.652098 | "n, m = list(map(int, input().split()))\ntable = [False] * (n + 1)\nfor _ in range(m):\n a, b = l(...TRUNCATED) | 0.648667 | "import sys\nfrom collections import deque as dq\nn = int(input())\n\nind = 0\ninp = [int(x)-1 for l(...TRUNCATED) | 0.647645 | "import sys\nfrom collections import deque\ndef solve():\n sys.setrecursionlimit(10**6)\n read(...TRUNCATED) | 0.645751 | "class Dsu:\n def __init__(self, v, s):\n self.par = s\n self.v = v\n self.d(...TRUNCATED) | 0.641233 | "# cook your dish here\nfrom collections import defaultdict\n\nclass sol():\n def __init__(self,n(...TRUNCATED) | 0.640168 | "import random\nimport math\n\ndef set_color(game, color):\n color_count[game[0]][game[2]] -= 1\n(...TRUNCATED) | 0.638914 | "from collections import deque\n\ndef solve(adj, m, k, uv):\n n = len(adj)\n nn = [len(a) for (...TRUNCATED) | 0.638003 | "\n\nclass Graph:\n def __init__(self, n_vertices, edges, directed=True, weighted=False):\n (...TRUNCATED) | 0.637235 | "\ndef __starting_point():\n\tn, m, t = map(int, input().split())\n\tedge = {i:{} for i in range(n)}(...TRUNCATED) | 0.634872 | "import os\nfrom io import BytesIO\nimport sys\nimport threading\n\n\nsys.setrecursionlimit(10 ** 9)(...TRUNCATED) | 0.63452 | "from heapq import heappush, heappop\nqueue = []\ndegree = []\ns = []\nans = []\nn = int(input())\nu(...TRUNCATED) | 0.633283 | "#!/usr/bin/env python3\n\nfrom collections import defaultdict\n\nDEBUG = False\n\n\ndef main():\n (...TRUNCATED) | 0.633189 | "def f():\n n, m, k = map(int, input().split())\n p = [[] for i in range(n + 1)]\n for i in(...TRUNCATED) | 0.630677 | "#!/usr/bin/env python3\nimport sys\nimport bisect\ninput = sys.stdin.readline\nsys.setrecursionlimi(...TRUNCATED) | 0.63045 | "from collections import Counter, defaultdict\nimport heapq\nfrom sys import stdin, stdout\nraw_inpu(...TRUNCATED) | 0.62685 | "import sys\n\n# sys.stind.readline lee datos el doble de\n# rápido que la funcion por defecto inpu(...TRUNCATED) | 0.626331 | "mod=998244353\nimport sys\ninput = sys.stdin.readline\nfrom collections import deque\nfrom collecti(...TRUNCATED) | 0.623973 | "import sys\n\nn, m = list(map(int, sys.stdin.readline().strip().split()))\nL = [0 for i in range (0(...TRUNCATED) | 0.622625 | "import sys\ninput = sys.stdin.readline\n\nNEGINF = -1000000\n\nn = int(input())\nadj = [[] for i in(...TRUNCATED) | 0.62238 | "l=input().strip().split(\" \");\nn=int(l[0]);\nm=int(l[1]);\nt=m;\nv=[];\nfor i in range(n+1):\n v(...TRUNCATED) | 0.619578 | "__author__ = 'Gleb'\n\nfrom time import time\nfrom collections import defaultdict\nfrom bisect impo(...TRUNCATED) | 0.616001 | "import sys\nn,m=list(map(int,sys.stdin.readline().split()))\nP={}\nfor i in range(m):\n a,b=list(...TRUNCATED) | 0.615882 | "import sys\nsys.setrecursionlimit(10**8)\n\nMOD = 10**9+7\n\nfac = [0]*(10**5+1)\ndef pre() :\n fac(...TRUNCATED) | 0.61408 | "# cook your dish here\nfor _ in range(int(input())):\n N, M = [int(x) for x in input().split()]\(...TRUNCATED) | 0.613597 | "# \nimport collections, atexit, math, sys, bisect \n\nsys.setrecursionlimit(1000000)\ndef getI(...TRUNCATED) | 0.613225 | "from bisect import bisect_left as bl\nfrom bisect import bisect_right as br\nfrom heapq import heap(...TRUNCATED) | 0.613059 | "import sys\ninput = sys.stdin.readline\n\nfrom collections import deque\n\nn, m = list(map(int, inp(...TRUNCATED) | 0.612558 | "n, m = map(int, input().split())\nsum = n ** 2\ncolx = n\ncoly = n\nusedx = [False] * n\nusedy = [F(...TRUNCATED) | 0.612252 | "import sys\ninput = sys.stdin.readline\n\nn=int(input())\nP=[list(map(int,input().split())) for i i(...TRUNCATED) | 0.610746 | "# cook your dish here\r\nfrom collections import defaultdict\r\nd=defaultdict(list)\r\ndef dfs(i):\(...TRUNCATED) | 0.610143 | "n, m = list(map(int, input().split()))\nedges_from = [[] for _ in range(n)]\nedges_to = [[] for _ i(...TRUNCATED) | 0.609681 | "def bfs(source):\n q = [0] * (n + 1);\n fa = [-1] * n\n l, r = [1] * 2\n fa[source] = s(...TRUNCATED) | 0.609632 | "import sys\nimport os\n\nclass Path():\n def __init__(self, idx, s, d):\n self.idx = idx\(...TRUNCATED) | 0.606831 | "from __future__ import division, print_function\npy2 = round(0.5)\n\nif py2:\n from future_built(...TRUNCATED) | 0.605963 | "from collections import defaultdict as dd,deque as dq\ndef opbfs(u,vis,ll,parr):\n q=dq([(u,0)])\n (...TRUNCATED) | 0.605255 | "from collections import deque\nn,m = [int(x) for x in input().split()]\nadj = [[] for x in range(n+(...TRUNCATED) | 0.603374 | "buck = [[0, 0] for i in range(2201)]\nm = int(input())\nfor i in range(m):\n a = int(input())\n (...TRUNCATED) | 0.602231 | "n, m = map(int, input().split())\nev = [tuple(map(int, input().split())) for _ in range(m)]\n\ng = (...TRUNCATED) | 0.602227 | "import sys\ninput = sys.stdin.readline\nt = int(input())\nfor _ in range(t):\n n = int(input())\n (...TRUNCATED) | 0.601007 | "from operator import itemgetter\nfrom numpy import delete\n\ndef make_spanning_tree(edges, t):\n (...TRUNCATED) | 0.60009 | "dt, a = None, None\ndef dfs(z):\n r = [{}, {}];ln = len(dt[z])\n if ln == 0:r[0][0] = 0;r[1][(...TRUNCATED) | 0.599255 | "def connected_components(neighbors):\n seen = set()\n def component(node):\n nodes = s(...TRUNCATED) | 0.599137 | "corr = lambda x, y: 1 <= x <= n and 1 <= y <= m\n\nT = int(input())\na = []\nwhile T:\n a.append(...TRUNCATED) | 0.598584 | "n, m = list(map(int, input().split()))\nprev_points = [[] for _ in range(n)]\nfor _ in range(m):\n (...TRUNCATED) | 0.597897 | "import sys\n\nn, m = list(map(int, sys.stdin.readline().split()))\nd = list(map(int, sys.stdin.read(...TRUNCATED) | 0.595639 | "import collections\nN, M, K = map(int, input().split())\nfriend = [[] for i in range(N)]\nblock = [(...TRUNCATED) | 0.595262 | "import sys\n\nn = int(sys.stdin.readline())\nedges = [[] for _ in range(n)]\nfor _ in range(n - 1):(...TRUNCATED) | 0.594876 | "import sys\nfrom collections import deque\n\ninput=sys.stdin.readline\n\nfor _ in range(int(input()(...TRUNCATED) | 0.594363 | "import math\ndef dist(w,x,y,z):\n return math.hypot(y - w, z - x)\n\nt = int(input())\nwhile (t>0):(...TRUNCATED) | 0.594213 | "def dfs(v, x, y, t, l, pr):\n ans[v] = x, y\n nx = [(l, 0), (0, -l), (-l, 0), (0, l)]\n if(...TRUNCATED) | 0.591652 | "T = int(input())\nfor _ in range(T):\n n,m = map(int,input().split())\n completed = list(map(int,in(...TRUNCATED) | 0.591325 | "# python3\n\n\ndef readline(): return tuple(map(int, input().split()))\n\n\ndef readlines(count): r(...TRUNCATED) | 0.589213 | "import sys\nimport heapq\nimport re\nfrom itertools import permutations\nfrom bisect import bisect_(...TRUNCATED) | 0.588954 | "t=int(input())\nfor i in range(t):\n n=int(input())\n print(2)\n print(n-1,n)\n for i i(...TRUNCATED) | 0.585912 | "# problem http://codeforces.com/contest/1100/problem/E\nimport copy\nimport sys\n\n\ndef find_loop((...TRUNCATED) | 0.585685 | "import sys\nsys.setrecursionlimit(200000)\n\nn = int(input())\narr = [[] for i in range(n)]\nfor i (...TRUNCATED) | 0.583445 | "'''input\n1\n3\n1 2\n1 3\n1 2 3\n'''\nimport sys\nsys.setrecursionlimit(1000000)\nfor _ in range(ev(...TRUNCATED) | 0.583207 | "import sys\ninput = lambda: sys.stdin.readline().rstrip()\n\nN, M = list(map(int, input().split()))(...TRUNCATED) | 0.582599 | "import sys\nimport os\nimport random\nimport math\n#nonlocal defs\nn, m, p = list(map(int, input().(...TRUNCATED) | 0.581547 | "\n\"\"\"\n#this code is a precomputation part.\n#it takes about 2 hours.\nclass Graph:\n def __ini(...TRUNCATED) | 0.580127 | "import sys\ninput = sys.stdin.readline\n\nn,m,D=list(map(int,input().split()))\nE=[list(map(int,inp(...TRUNCATED) | 0.579484 | "maxn=50+10\ng=[None]*maxn\ndp=[None]*maxn\nc=[None]*maxn\nsize=[0]*maxn\n\nfor i in range(0,maxn):\(...TRUNCATED) | 0.57917 |
"The only difference between easy and hard versions is constraints.\n\nNow elections are held in Ber(...TRUNCATED) | "import sys\ndef I():\n return sys.stdin.readline().rstrip()\n\nclass Heap:\n def __init__( se(...TRUNCATED) | 0.825806 | "import heapq\n\nfor _ in range(int(input())):\n n = int(input())\n voters = []\n for i in (...TRUNCATED) | 0.794422 | "# cook your dish here\nfor _ in range(int(input())):\n n,m = list(map(int,input().split()))\n (...TRUNCATED) | 0.791199 | "import sys\ninput = sys.stdin.readline\n\nt = int(input())\nfor test in range(t):\n if test:\n (...TRUNCATED) | 0.753501 | "t=eval(input())\nfor i in range(0,t):\n x=input()\n nm=x.split(' ')\n nm[0]=int(nm[0])\n (...TRUNCATED) | 0.73849 | "t=int(input())\nwhile(t):\n n=int(input())\n l=[]\n for i in range(n):\n l.append(list(map(int,inp(...TRUNCATED) | 0.735293 | "try:\n t=int(input())\n for a in range(t):\n l=input().split()\n n=int(l[0])\n m=int(l[1])\n d=(...TRUNCATED) | 0.731963 | "3\n\nimport math\nimport os\nimport sys\n\n\nDEBUG = 'DEBUG' in os.environ\n\n\ndef inp():\n ret(...TRUNCATED) | 0.710929 | "import sys\n\nt = int(sys.stdin.readline())\n\nfor _ in range(t):\n n = int(sys.stdin.readline()(...TRUNCATED) | 0.704695 | "# cook your dish here\nt = int(input())\nfor _ in range(t):\n n = int(input())\n a = []\n b = []\n (...TRUNCATED) | 0.702424 | "T = int(input())\nfor t in range(T):\n n, m = list(map(int, input().split()))\n c = list(map(int, i(...TRUNCATED) | 0.694485 | "# cook your dish here\nt=int(input())\nwhile(t>0):\n n=int(input())\n b=[int(x) for x in input().sp(...TRUNCATED) | 0.682397 | "t=int(input())\nfor i in range(t):\n n,m=list(map(int,input().split()))\n l=[0]+list(map(int,input((...TRUNCATED) | 0.679528 | "N = int(input())\nT = [int(TN) for TN in input().split()]\nSumT = sum(T)\nM = int(input())\nPX = [[(...TRUNCATED) | 0.678971 | "from sys import stdin,stdout\nimport math,bisect\nfrom collections import Counter,deque,defaultdict(...TRUNCATED) | 0.677279 | "from itertools import permutations as p\ndef disc(a,b):\n for ai in a:\n for bi in b:\n if ai==b(...TRUNCATED) | 0.668095 | "import sys\nn,m = [int(x) for x in input().split()]\n\ninp = []\ns = sys.stdin.read()\ni = 0\nwhile(...TRUNCATED) | 0.666774 | "# @author \n\nimport sys\n\nclass GCandyBoxHardVersion:\n def solve(self):\n q = int(inpu(...TRUNCATED) | 0.6653 | "def f(a,n):\n l,r,s1,s2 = [0]*n, [0]*n, [], []\n \n for i in range(n):\n count = 1\n (...TRUNCATED) | 0.663529 | "# cook your dish here\nfor t in range(int(input())):\n n,m=[int(x)for x in input().rstrip().split()(...TRUNCATED) | 0.663359 | "from math import *\r\nfrom collections import *\r\nimport sys\r\ninput=sys.stdin.readline\r\nt=int((...TRUNCATED) | 0.662869 | "import sys\nreadline = sys.stdin.readline\ndef ceil(a, b):\n return -(-a//b)\n\ndef main():\n (...TRUNCATED) | 0.659604 | "import sys\n\n\n# inf = open('input.txt', 'r')\n# reader = (map(int, line.split()) for line in inf)(...TRUNCATED) | 0.659317 | "import sys\n\ndef input(): return sys.stdin.readline().strip()\ndef iinput(): return int(input(...TRUNCATED) | 0.659016 | "class BIT():\n def __init__(self,n):\n self.BIT=[0]*(n+1)\n self.num=n\n\n def (...TRUNCATED) | 0.658899 | "# cook your dish here\np=int(input())\nfor z in range(p):\n n=int(input())\n a=[]\n for i in range((...TRUNCATED) | 0.657586 | "from math import sqrt\nclass pro(object):\n def __init__(self,dif,sc):\n self.dif=dif\n (...TRUNCATED) | 0.657553 | "for _ in range(int(input())):\n n, m = map(int, input().split())\n l1 = list(map(int,input().(...TRUNCATED) | 0.654479 | "# cook your dish here\nt=int(input())\nfor _ in range(t):\n n,m=list(map(int,input().split()))\n r=(...TRUNCATED) | 0.652629 | "n = int(input())\nvs = [int(x) for x in input().split()]\nts = [int(x) for x in input().split()]\n\(...TRUNCATED) | 0.652037 | "from collections import defaultdict\n\n\ndef __starting_point():\n n, T = [int(_) for _ in input(...TRUNCATED) | 0.647978 | "import sys\n\nn, m = list(map(int, sys.stdin.readline().strip().split()))\nL = [0 for i in range (0(...TRUNCATED) | 0.647725 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\nmii=lambda:list(map(int,inpu(...TRUNCATED) | 0.647064 | "from sys import *\nfrom math import *\n\nmod = 1000000000\nf = [0 for i in range(200)]\nf[0] = f[1](...TRUNCATED) | 0.646039 | "n, m = map(int, input().split())\na = list(map(int, input().split()))\nc = list(map(int, input().sp(...TRUNCATED) | 0.644294 | "from math import sqrt\nimport sys\nsys.setrecursionlimit(10**8)\nintMax = 10**18\ndef knapsack(rl,l(...TRUNCATED) | 0.643987 | "import sys\nfrom operator import itemgetter\n\ndef count(a, b, num_a, num_b, cur_time):\n\tcurrent_(...TRUNCATED) | 0.6427 | "Q = int(input())\nqs = [input().split() for i in range(Q)]\n\nimport heapq\nclass Heapq:\n def _(...TRUNCATED) | 0.638694 | "t=int(input())\nwhile t>0 :\n n=int(input())\n a=list(map(int,input().split()))\n an=0\n (...TRUNCATED) | 0.638613 | "for __ in range(int(input())):\n n = int(input())\n ar = []\n for ________ in range(n):\n (...TRUNCATED) | 0.637568 | "class dsu:\n def __init__(self, n=0):\n self._n = n\n self.parent_or_size = [-1] *(...TRUNCATED) | 0.636606 | "from math import sqrt\n\ndef get_distance(x1,y1,x2,y2):\n return sqrt((x1-x2)**2 + (y1-y2)**2)\n(...TRUNCATED) | 0.635235 | "# cook your dish here\nclass node:\n\tdef __init__(self,a,b=0,c=0):\n\t\tself.val=a\n\t\tself.a=b\n(...TRUNCATED) | 0.633319 | "import sys\ninput = sys.stdin.readline\nfrom bisect import bisect_right as br\nP = 10**9+7\nN = int(...TRUNCATED) | 0.633255 | "import collections, re\nn = int(input())\nitem_od = collections.OrderedDict()\nfor i in range(n):\n(...TRUNCATED) | 0.632793 | "t = int(input())\n\nfor i in range(t):\n n, c = list(map(int,input().split()))\n\n pts = {}\n moves(...TRUNCATED) | 0.632185 | "import sys\nfrom collections import deque\n\ninput=sys.stdin.readline\n\nt=1\nt=int(input())\nfor _(...TRUNCATED) | 0.630847 | "# cook your dish here\n# cook your dish here\nt=int(input())\nfor _ in range(t):\n n,p,q=list(map(i(...TRUNCATED) | 0.630019 | "for _ in range(int(input())):\n n=int(input())\n a=list(map(int,input().split()))\n b=list(map(int,(...TRUNCATED) | 0.629807 | "from itertools import permutations\nC = list(permutations(['A','B','C','D']))\nV = list(permutation(...TRUNCATED) | 0.629556 | "import sys\nfrom collections import deque\ninput = sys.stdin.readline\n\nt = int(input())\nfor _ in(...TRUNCATED) | 0.629156 | for i in range(int(input())):
print(2*(sum(list(map(int, input().split())))-1)) | 0.627304 | "import collections\n\n\ndef main():\n from sys import stdin, stdout\n\n def read():\n (...TRUNCATED) | 0.626176 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\nmii=lambda:list(map(int,inpu(...TRUNCATED) | 0.625845 | "# cook your dish here\nfrom operator import itemgetter\nt=int(input())\nfor _ in range(t):\n n=i(...TRUNCATED) | 0.625522 | "n = int(input())\na, b = [0] * (n + 2), [0] * (n + 2)\ns, l = 0, 1\np = [0] * n\nfor i in range(n):(...TRUNCATED) | 0.62551 | "import sys\ninput = sys.stdin.readline\n\nMOD = 10 ** 9 + 7\n\nt = int(input())\nfor _ in range(t):(...TRUNCATED) | 0.624091 | "__author__ = 'Gleb'\n\nfrom time import time\nfrom collections import defaultdict\nfrom bisect impo(...TRUNCATED) | 0.623234 | "import sys\ninput = sys.stdin.readline\n\nq=int(input())\nfor testcase in range(q):\n n=int(inpu(...TRUNCATED) | 0.622948 | "n, m = map(int, input().split())\np, c = list(range(n + 1)), [1] * (n + 1)\nv = [0] + list(map(int,(...TRUNCATED) | 0.622463 | "from sys import stdin\n\nfor _ in range(int(stdin.readline())):\n m, n = list(map(int, stdin.readli(...TRUNCATED) | 0.622379 | "n = int(input())\n\nbestP = 10**9\nsol = 0\nfor i in range(0, n):\n a, p = list(map(int, input()(...TRUNCATED) | 0.621449 | "# cook your dish here\nfor i in range(int(input())):\n N = int(input())\n l = list(map(int, i(...TRUNCATED) | 0.621198 | "for tcase in range(int(input())):\n n=int(input())\n ls = list(map(int, input().split()))\n (...TRUNCATED) | 0.620063 | "import sys\ndef input():\n\treturn sys.stdin.readline()[:-1]\n\nt = int(input())\nfor _ in range(t)(...TRUNCATED) | 0.619912 | "for _ in range(int(input())):\n n=int(input())\n f=list(map(int,input().split()))\n sum1=f[0]\n d=0(...TRUNCATED) | 0.619828 | "class BIT():\n \"\"\"区間加算、一点取得クエリをそれぞれO(logN)で応えるデ(...TRUNCATED) | 0.619784 | "from sys import stdin\ndef gt(num):\n if num:\n return num\n return 0\nfor __ in range(int(stdin.r(...TRUNCATED) | 0.618555 | "# cook your dish here\nfor tc in range(int(input())):\n \n n = int(input())\n \n li1 = list(map(int(...TRUNCATED) | 0.617027 | "import sys\ninput=sys.stdin.readline\nfor _ in range(int(input())):\n n = int(input())\n t = (...TRUNCATED) | 0.616971 | "# cook your dish here\ndef __starting_point():\n try:\n for _ in range (int(input())):\n element(...TRUNCATED) | 0.616375 | "import sys\nfrom collections import deque\n\ninput=sys.stdin.readline\n\nfor _ in range(int(input()(...TRUNCATED) | 0.615703 | "from fractions import Fraction\nimport bisect\nimport os\nfrom collections import Counter\nimport b(...TRUNCATED) | 0.615366 | "def ans(l):\n s = \"\"\n i = 0\n while (i < len(l)):\n temp = l[i]\n k = temp[1]\n if (k != 0):\(...TRUNCATED) | 0.615124 | "from collections import defaultdict\nfrom itertools import product\n\ndef solve(mouse,n,m):\n \n # (...TRUNCATED) | 0.614541 | "for tc in range(int(input())):\n n,m = list(map(int, input().split()))\n al = list(map(int, i(...TRUNCATED) | 0.614131 | "import sys\n\nrl=sys.stdin.readline\nT=int(rl())\nfor t in range(T):\n P=int(rl())\n T=(P+1)//2\n F(...TRUNCATED) | 0.614061 | "class Dsu:\n def __init__(self, v, s):\n self.par = s\n self.v = v\n self.d(...TRUNCATED) | 0.613907 | "for _ in range(int(input())):\n n = int(input())\n r1 = list(map(int, input().split()))\n (...TRUNCATED) | 0.613813 | "\n\n#==============================================================================================(...TRUNCATED) | 0.613105 | "from collections import deque\nt=int(input())\n\nfor i in range(t):\n n=int(input())\n N=[i for i i(...TRUNCATED) | 0.612489 | "n=eval(input())\ngrades=list(map(int,input().split()))\nm=eval(input())\nfor df in range(m):\n x,y=(...TRUNCATED) | 0.612111 | "def main():\n import sys\n from array import array\n input = sys.stdin.readline\n\n cla(...TRUNCATED) | 0.610782 | "for _ in range(int(input())):\n n=int(input())\n s=list(input())\n coord=list(map(int,input().split(...TRUNCATED) | 0.61063 | "# cook your dish here\n# cook your dish here\nfor _ in range(int(input())):\n n=int(input())\n l=li(...TRUNCATED) | 0.609443 | "\"\"\"This code was written by\nRussell Emerine - linguist,\nmathematician, coder,\nmusician, and m(...TRUNCATED) | 0.608692 | "\nimport sys\n#sys.stdin=open(\"data.txt\")\ninput=sys.stdin.readline\n\nd={}\n\nn=int(input())\nfo(...TRUNCATED) | 0.608153 | "from sys import stdin,stdout\nimport sys\nimport math\n\nt=int(stdin.readline())\nfor i in range(t)(...TRUNCATED) | 0.607804 | "p, n = [], int(input())\na = b = 0\nfor i in range(n):\n t = list(map(int, input().split()))\n (...TRUNCATED) | 0.607567 | "from sys import *\n\nT = int(stdin.readline())\nt = [int(s) for s in stdin.readline().split(' ')]\n(...TRUNCATED) | 0.607338 | "import sys\nn,m=list(map(int,sys.stdin.readline().split()))\n\nL=list(map(int,sys.stdin.readline().(...TRUNCATED) | 0.6068 | "try:\n for _ in range(int(input())):\n N, K = map(int, input().split())\n cell = []\n count = 0\(...TRUNCATED) | 0.606105 | "# cook your dish here\nfor _ in range(int(input())):\n d=dict()\n ls=[]\n for i in range(int(input((...TRUNCATED) | 0.605146 | "\"\"\"\nCodeforces Round 241 Div 1 Problem B\n\nAuthor : chaotic_iak\nLanguage: Python 3.3.4\n\"\"(...TRUNCATED) | 0.60472 | "T = int(input())\nfor _ in range(T):\n n = int(input())\n arr = list(map(int, input().split()))\n a(...TRUNCATED) | 0.604434 | "# cook your dish here\n# cook your dish here\nfrom math import log2;\nimport sys;\n\nsys.setrecursi(...TRUNCATED) | 0.604024 | "for _ in range(int(input())):\n n = int(input())\n a = list(map(int,input().split()))\n ans = 0\n c(...TRUNCATED) | 0.60391 | "# cook your dish here\n\nt = int(input())\nwhile t:\n t -= 1\n n = int(input())\n arr = list(map(in(...TRUNCATED) | 0.603656 | "l=input().strip().split(\" \");\nn=int(l[0]);\nm=int(l[1]);\nt=m;\nv=[];\nfor i in range(n+1):\n v(...TRUNCATED) | 0.603632 | "# cook your dish here\n# cook your dish here\nfor _ in range(int(input())):\n n,m=list(map(int,inpu(...TRUNCATED) | 0.60351 | "t = int(input())\nfor _ in range(t):\n n,m = list(map(int, input().split()))\n l = []\n fo(...TRUNCATED) | 0.603008 |
"You like playing chess tournaments online.\n\nIn your last tournament you played $n$ games. For the(...TRUNCATED) | "import sys\ninput = sys.stdin.readline\n\ndef main():\n n, k = map(int, input().split())\n st(...TRUNCATED) | 0.786122 | "# cook your dish here\nimport bisect\n\nfor _ in range(int(input())):\n w,k=map(str, input().split((...TRUNCATED) | 0.667338 | "for i in range(int(input())):\n n,k=map(int,input().split())\n m=[]\n for j in range(n):\n l=list((...TRUNCATED) | 0.641897 | "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: map(int, input((...TRUNCATED) | 0.632936 | "import itertools\nimport numpy as np\nb = np.zeros((100001), dtype=np.int)\ndef power2(a):\n\tb[0] (...TRUNCATED) | 0.630535 | "import sys\ninput = sys.stdin.readline\nfrom collections import defaultdict\n\nclass Unionfind:\n (...TRUNCATED) | 0.626864 | "import numpy as np\n\nN=10**6+1\nt=eval(input())\ninp = ()\n\nt1=ord('z')\n#bag=[[0 for _ in xrang(...TRUNCATED) | 0.619359 | "import numpy as np\r\n\r\ndef solve(n,k,a,l,r):\r\n shape = (n,n)\r\n mat = np.zeros(shape, d(...TRUNCATED) | 0.615198 | "T= int(input());\n\nfor i in range(T):\n n,k = list(map(int,input().split()));\n s=list(map(int,inp(...TRUNCATED) | 0.611662 | "#code snippet reference:http://www.geeksforgeeks.org/searching-for-patterns-set -2-kmp-algor(...TRUNCATED) | 0.610809 | "from sys import stdin\nimport math\n\nrgb = 'RGB'\n\nfor query in range(int(stdin.readline())):\n (...TRUNCATED) | 0.589008 | "try:\r\n t=int(input())\r\n for i in range(t):\r\n n,k=map(int,input().split())\r\n (...TRUNCATED) | 0.578464 | "def main():\n T = int(input())\n for t in range(T):\n N,K = map(int, input().split())\n W = list((...TRUNCATED) | 0.577824 | "#!/usr/bin/env python3\n# 598D_Igor.py - Codeforces.com/problemset/problem/598/D by Sergey 2015\n\n(...TRUNCATED) | 0.573783 | "import sys\nINF = 10**20\nMOD = 10**9 + 7\nI = lambda:list(map(int,input().split()))\nfrom math imp(...TRUNCATED) | 0.571153 | "import sys\ndef input():\n\treturn sys.stdin.readline()[:-1]\n\nt = int(input())\nfor _ in range(t)(...TRUNCATED) | 0.569989 | "q=int(input())\nfor t in range(q):\n n,k=map(int,input().split())\n a=input()\n ko=0\n (...TRUNCATED) | 0.567133 | "t=eval(input())\nfor i in range(0,t):\n x=input()\n nm=x.split(' ')\n nm[0]=int(nm[0])\n (...TRUNCATED) | 0.56328 | "# cook your dish here\nt = int(input())\nwhile t>0:\n x = input().split()\n n = int(x[0])\n k = int(...TRUNCATED) | 0.563165 | "from itertools import permutations\n\ndef solve(s,k):\n return sum(not v%k for v in map(int, map(...TRUNCATED) | 0.561885 | "import sys\ninput = sys.stdin.readline\nfrom collections import deque\ndef slidemax(X, k):\n q =(...TRUNCATED) | 0.561152 | "def put():\n return list(map(int, input().split()))\ndef diff(x,y):\n ans = 0\n for i in r(...TRUNCATED) | 0.555583 | "# cook your dish here\n# cook your dish here\nn=0;m=0;\nA=[];B=[];\nanscount=0;k=0;\n\ndef generate(...TRUNCATED) | 0.555006 | "import sys\n \ndef findRoom(x,y,i):\n R = [(x,y)]\n GRID[x][y] = i\n for n in R:\n GRID[n[0]][n[1](...TRUNCATED) | 0.550943 | "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: list(map(int, i(...TRUNCATED) | 0.550937 | "#!/usr/bin/env python3\n# coding=utf-8\n\nimport sys\n\nimport numpy as np\n\nn, k = list(map(int, (...TRUNCATED) | 0.549405 | "from sys import stdin,stdout\r\nfrom math import gcd\r\nfor _ in range(int(stdin.readline())):\r\n (...TRUNCATED) | 0.54635 | "import sys\nimport math\n\ndef main(arr,k):\n \n \n x=[]\n y=[]\n \n \n \n for e in arr:\n if e%2=(...TRUNCATED) | 0.545043 | "import sys\n\nq = int(sys.stdin.readline().strip())\nfor t in range(0, q):\n n, m = list(map(int(...TRUNCATED) | 0.54483 | "from bisect import *\nfor x in range(eval(input())):\n n,k = list(map(int,input().split()))\n arr =(...TRUNCATED) | 0.544451 | "t = int(input())\n\nfor _ in range(t):\n n, k = [int(x) for x in input().split()]\n l1, r1 = (...TRUNCATED) | 0.542389 | "for _ in range(int(input())):\n\n n, k = map(int, input().split())\n l = [*map(int, input())]\n\n c(...TRUNCATED) | 0.541544 | "import sys\nfrom random import choice,randint\ninp=sys.stdin.readline\nout=sys.stdout.write\nflsh=s(...TRUNCATED) | 0.540722 | "for i in range(int(input())):\n n,k=input().split()\n laddus=0\n for j in range(int(n)):\n t=input(...TRUNCATED) | 0.537773 | "# cook your dish here\nt=int(input())\nwhile t:\n n=int(input())\n r1=input()\n r2=input()\n r1coun(...TRUNCATED) | 0.535699 | "import sys\nt = int(sys.stdin.readline())\n\ndef identify(x, y):\n rows[x][y] = '2'\n\n r = 0(...TRUNCATED) | 0.534234 | "# cook your dish here\ndef decode(L,S):\n str_2=\"\"\n lst=[]\n for i in range(L//4):\n str_1 = \"(...TRUNCATED) | 0.533703 | "def fact(n):\n if n<2:\n return 1\n return n * fact(n-1)\n \ndef ncr(n, r):\n return fact(n)// (fa(...TRUNCATED) | 0.533294 | "import sys\n\n\n# inf = open('input.txt', 'r')\n# reader = (map(int, line.split()) for line in inf)(...TRUNCATED) | 0.532283 | "inp=lambda :map(int,input().split())\ndef sol():\n x,y,on,tw=inp()\n res=0\n for n in rang(...TRUNCATED) | 0.530986 | "t = int(input())\nfrom math import log, ceil, floor\nwhile t:\n t-=1 \n n,k = map(int ,input().spli(...TRUNCATED) | 0.530026 | "def countSubstr(str, n, x, y): \r\n \r\n tot_count = 0\r\n \r\n count_x = 0\r\n \r\n fo(...TRUNCATED) | 0.529506 | "\n\n#==============================================================================================(...TRUNCATED) | 0.529129 | "# cook your dish here\nMOD=10**9+7\nfor _ in range(int(input())):\n s=input()\n ind=1\n le(...TRUNCATED) | 0.529024 | "n = int(input())\n\ndef area(width, height) :\n return (width+1) * (height+1)\n\ndef calcul(s1, (...TRUNCATED) | 0.528926 | "for _ in range(int(input())):\n n=int(input())\n s=list(input())\n coord=list(map(int,input().split(...TRUNCATED) | 0.528413 | "def main():\n for _ in range(int(input())):\n rows,column = map(int,input().split())\n arr = []\n(...TRUNCATED) | 0.528106 | "# cook your dish here\nfrom sys import stdin,stdout\n\na0=0\na1=1\nn,k=stdin.readline().strip().spl(...TRUNCATED) | 0.527111 | "def solve():\n n, k = map(int,input().split())\n lst1 = list(map(int,input().split()))\n l(...TRUNCATED) | 0.52601 | "# cook your dish here\r\nimport bisect\r\nn, k1, *l = map(int, input().split())\r\nv_l, b_l = l[:n](...TRUNCATED) | 0.525373 | "import sys\n\n\ndef count(n, k, field):\n blank = 0\n cnt = [[0] * (n - k + 1) for _ in range(...TRUNCATED) | 0.523647 | "(lambda R:(lambda N:(lambda n:any((lambda z,r:all((lambda p:all(p==k for k in n[j:j+i]))(n[j])for j(...TRUNCATED) | 0.522642 | "def robot_transfer(matrix, k):\n c = 0\n for l, i in enumerate(matrix):\n for o, j in (...TRUNCATED) | 0.522124 | "import sys\ndef countR(ip):\n c=0\n for i in ip:\n if(i=='R'):\n c+=1\n (...TRUNCATED) | 0.522085 | "import sys\n\ndef spaces(a,n,m,k,visit1,visit2,dist,position):\n queue = [position]\n lastedit = [](...TRUNCATED) | 0.521952 | "import sys\nreadline = sys.stdin.readline\n\nT = int(readline())\nAns = [None]*T\nfor qu in range(T(...TRUNCATED) | 0.519302 | "#!/usr/bin/env python\n\nfrom math import sqrt\n\ndef process(S):\n P = [0,0,'S']\n for i in S:\n (...TRUNCATED) | 0.518503 | "s = input().strip()\nk = int(input())\nw = list(map(int, input().split()))\nf = 0\nm = max(w)\nfor (...TRUNCATED) | 0.517976 | "t=int(input())\nwhile t>0 :\n\ta=int(input())\n\tb=int(input())\n\tl=int(input())\n\tx=0\n\ty=0\n\t(...TRUNCATED) | 0.517951 | "for j in range(int(input())):\n a=input()\n b=input()\n c,d=0,0\n a0=a.count(\"0\")\n a1=a.count(\"(...TRUNCATED) | 0.517635 | "def ii():\n return int(input())\ndef mi():\n return list(map(int, input().split()))\ndef li()(...TRUNCATED) | 0.516872 | "for _ in range(int(input())):\n n,s = int(input()),input().strip()\n previ,num,_s,dic = s[0],(...TRUNCATED) | 0.516715 | "for tc in range(int(input())):\n N = int(input())\n a, b = list(map(int, input().split()))\n pr = [(...TRUNCATED) | 0.515118 | "import sys\nimport random\nfrom fractions import Fraction\nfrom math import *\n \ndef input():\n (...TRUNCATED) | 0.513674 | "# Codeforces Round #487 (Div. 2)import collections\nfrom functools import cmp_to_key\n#key=cmp(...TRUNCATED) | 0.513231 | "t =int(input()) #no. of test cases\nwhile t>0:\n t=t-1\n str=input()\n size=len(str)\n pos=str.find(...TRUNCATED) | 0.513135 | "n, m, k = input().split(' ')\nn = int(n)\nm = int(m)\nk = int(k)\nind = []\npre = []\n\nfor _ in ra(...TRUNCATED) | 0.512914 | "for _ in range(int(input())):\n n, a, b = map(int, input().split())\n s = input().strip()\n (...TRUNCATED) | 0.512618 | "from sys import stdin, stdout\n\nK = 20\n\ndef findAllStrings(s):\n n = len(s)\n sDict = {}\n(...TRUNCATED) | 0.512055 | "K = int(input())\nprint((\"-1\" if K & 1 else \"\".join([\"wb\\n\"[2 if k == K else (min(j, k, K - (...TRUNCATED) | 0.51151 | "try:\n for _ in range(int(input())):\n N, K = map(int, input().split())\n cell = []\n count = 0\(...TRUNCATED) | 0.510859 | "from itertools import permutations\n\nfor _ in range(int(input())):\n N,K=list(map(int,input().spli(...TRUNCATED) | 0.509383 | "from collections import Counter\r\nfrom math import factorial\r\ndef nc3(n):\r\n a=factorial(n)\(...TRUNCATED) | 0.508935 | "for t in range(int(input())):\n n, a , b , k = map(int,input().split())\n solvedbychef = 0\n solved(...TRUNCATED) | 0.507843 | "import sys\nfrom math import *\n\ndef minp():\n\treturn sys.stdin.readline().strip()\n\ndef mint():(...TRUNCATED) | 0.506484 | "t=int(input())\n \ndef vsense(val,a,l):\n sense=0\n ctr=a\n for c in range(n):\n if val[c]<=ctr:\n(...TRUNCATED) | 0.505828 | "def max_sum(arr):\n # Finds the maximum sum of sub-arrays of arr\n max_till_now = -1000000 #m(...TRUNCATED) | 0.504519 | "import math\ndef egcd(a, b):\n if a == 0:\n return (b, 0, 1)\n else:\n g, y, x (...TRUNCATED) | 0.504255 | "fact = []\nfact.append(1)\nfor i in range(1,100001):\n fact.append((i*fact[i-1])%1000000007)\n \nde(...TRUNCATED) | 0.504012 | "def solve():\n n, k, z = map(int,input().split())\n lst = list(map(int,input().split()))\n (...TRUNCATED) | 0.503205 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n \n a = {}\n \n for i in (...TRUNCATED) | 0.502008 | "# cook your dish here\nfrom sys import stdin,stdout\na,b=list(map(int,stdin.readline().split()))\nl(...TRUNCATED) | 0.501914 | "s = input()\nL = input()\nk = int(input())\n\n'''from datetime import *\ntime1 = datetime.now()'''\(...TRUNCATED) | 0.501182 | "#include<sdg.h>\nfor _ in range(int(input())):\n s=input()\n n=len(s)\n if n==1:\n (...TRUNCATED) | 0.501095 | "t = int(input())\ndef gcd(a,b):\n if b == 0:\n return a\n return gcd(b,a%b)\nfor _ in (...TRUNCATED) | 0.500639 | "import math\nclass Solution:\n def numMusicPlaylists(self, N: int, L: int, K: int) -> int:\n (...TRUNCATED) | 0.5003 | "# cook your dish here\nfor _ in range(int(input())):\n s=input()\n count=0\n i=0\n while i<len(s)-1(...TRUNCATED) | 0.500115 | "t=int(input())\n\ndef diffe(a,b):\n return int(a-b)\n\nwhile t :\n t=t-1\n \n lia=[]\n lib=[]\n lik(...TRUNCATED) | 0.499676 | "def treeProduct(num, h, root, ch):\n if ch >= h:\n return num[root]\n\n left = (root * 2) + 1\n ri(...TRUNCATED) | 0.499288 | "#import set\nt = eval(input()) \nwhile(t):\n s = input()\n set1 = set()\n j = 0\n for (...TRUNCATED) | 0.498796 | "# cooking dish here\n\nfrom sys import stdin\nfrom collections import Counter\nread = stdin.readlin(...TRUNCATED) | 0.498371 | "from collections import defaultdict as dd\n\ndef find(a, b):\n n = len(a)\n m = len(b)\n\n dp = [[0(...TRUNCATED) | 0.49799 | "def main():\n t= int(input())\n while(t!=0):\n n,k = list(map(int , input().split()))\n arr = lis(...TRUNCATED) | 0.497947 | for _ in range(int(input())):
n,k=map(int,input().split())
print(((2*n*(k-1))+2)/k) | 0.496262 | "for _ in range(int(input())):\n n=int(input())\n s=input()\n a=\"\"\n b=\"\"\n flag=(...TRUNCATED) | 0.496226 | "t = int(input())\nwhile(t>0):\n t-=1;\n n,l,r = list(map(int,input().split()));\n a = bin(l)[2:];\n(...TRUNCATED) | 0.495712 | "from collections import Counter\n\nclass Unionfind():\n def __init__(self, n):\n self.n =(...TRUNCATED) | 0.495711 | "import math as mt \nimport sys,string\ninput=sys.stdin.readline\nprint=sys.stdout.write\nimport ran(...TRUNCATED) | 0.495212 | "import sys\nfrom sys import stdout\nimport random\nfrom fractions import Fraction\nfrom math import(...TRUNCATED) | 0.494652 | "n, k = [int(c) for c in input().split()]\na = []\nfor i in range(k):\n ak = [int(c) for c in inp(...TRUNCATED) | 0.49397 | "def getInput():\n N_k = input().split()\n N =int(N_k[0])\n k =int(N_k[1])\n list = []\n output = [](...TRUNCATED) | 0.493726 |
"Alice and Bob play a game. They have a binary string $s$ (a string such that each character in it i(...TRUNCATED) | "for _ in range(int(input())):\n s = input()\n p = [i for i in s.split(\"0\") if i!=\"\"]\n (...TRUNCATED) | 0.765869 | "import sys\nT = int(sys.stdin.readline().strip())\nfor t in range(T):\n sys.stdin.readline().strip((...TRUNCATED) | 0.824149 | "T = int(input())\n\nfor _ in range(T):\n s = input()\n n = len(s)\n res = 10 ** 100\n f(...TRUNCATED) | 0.805379 | "import sys\nimport math\nfrom collections import defaultdict\nfrom itertools import combinations\nf(...TRUNCATED) | 0.791183 | "LOG = 20\n\ndef solve(s):\n\tn = len(s)\n\tres = 0\n\tz = 0\n\tfor t in range(0, n):\n\t\tif s[t] =(...TRUNCATED) | 0.784439 | "t = int(input())\nfor _ in range(t):\n s = input()\n pref = [0]*len(s)\n if s[0]==\"1\":\n pref[0](...TRUNCATED) | 0.783346 | "# cooking dish here\n\nfrom sys import stdin\nfrom collections import Counter\nread = stdin.readlin(...TRUNCATED) | 0.780897 | "for z in range(int(input())):\n s = input()\n n = len(s)\n i = 0\n while i<n and s[i]==(...TRUNCATED) | 0.768152 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n \n a = {}\n \n for i in (...TRUNCATED) | 0.756558 | "'''\nName : Jaymeet Mehta\ncodechef id :mj_13\nProblem : Avenir Strings\n'''\nfrom sys import stdin(...TRUNCATED) | 0.755107 | "import sys\nreadline = sys.stdin.readline\n\nT = int(readline())\nAns = [None]*T\nfor qu in range(T(...TRUNCATED) | 0.7545 | "def countSubstr(str, n, x, y): \r\n \r\n tot_count = 0\r\n \r\n count_x = 0\r\n \r\n fo(...TRUNCATED) | 0.739988 | "for _ in range(int(input())):\n s=input()\n n=len(s)\n t=0\n ans=0\n for i in range(n-1):\n if(s[i(...TRUNCATED) | 0.724256 | t = int(input())
for _ in range(t):
s = input().strip('0')
print(s.count('0'))
| 0.723471 | "for _ in range(int(input())):\n n = int(input())\n s = input()\n\n d = {0: 1}\n summa, (...TRUNCATED) | 0.714608 | "import sys\n\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nns = lambda: readline(...TRUNCATED) | 0.712195 | "def det(s, i, j):\n ans = 0\n curr = i\n for a in s:\n if a == curr:\n a(...TRUNCATED) | 0.708849 | "# cook your dish here\nimport math;\nfrom math import gcd,sqrt,floor,factorial,ceil\nfrom bisect im(...TRUNCATED) | 0.70353 | "# cook your dish here\nfor _ in range(int(input())):\n n=int(input())\n l1=[]\n l2=[]\n \n for i in(...TRUNCATED) | 0.702418 | "from sys import stdin, stdout\r\ninput = stdin.readline\r\nfrom collections import defaultdict as d(...TRUNCATED) | 0.700418 | "#import set\nt = eval(input()) \nwhile(t):\n s = input()\n set1 = set()\n j = 0\n for (...TRUNCATED) | 0.699854 | "# cook your dish here\nfor _ in range(int(input())):\n s=input()\n count=0\n i=0\n while i<len(s)-1(...TRUNCATED) | 0.697918 | "# cook your dish here\r\ntest=int(input())\r\nfor _ in range(test):\r\n n=int(input())\r\n n=(...TRUNCATED) | 0.689951 | "for _ in range(int(input())):\n l=list(map(int,input().strip()))\n for j in range(len(l)-1,-1,-1):\(...TRUNCATED) | 0.688595 | "# cook your dish here\n# cook your dish here\ntest=int(input())\nfor _ in range(test):\n n=int(inpu(...TRUNCATED) | 0.686151 | "t = int(input())\nfor i in range(t):\n n = int(input())\n s = input()\n ans = 0\n for y(...TRUNCATED) | 0.685653 | "import sys\ninput = sys.stdin.readline\nrInt = lambda: int(input())\nmInt = lambda: map(int, input((...TRUNCATED) | 0.685373 | "import sys\ninput = sys.stdin.readline\n\nt = int(input())\nfor _ in range(t):\n n = int(input()(...TRUNCATED) | 0.679392 | "from itertools import groupby\ndef main():\n N = int(input())\n S = input()\n \n C = [l(...TRUNCATED) | 0.676554 | "import sys\n\ndef GRIG(L):\n\n LENT = len(L)\n MINT = 1\n GOT = 0\n\n DY = [ [{x: 0 for(...TRUNCATED) | 0.671263 | "\n\n\ndef powerset(s):\n n = len(s)\n masks = [1 << j for j in range(n)]\n for i in range((...TRUNCATED) | 0.666785 | "# Contest: Codeforces Round #592 (Div. 2) (https://codeforces.com/contest/1244)\n# Problem: B: Room(...TRUNCATED) | 0.666147 | "def solve(S):\n a = set(S)\n return len(a)\n \n \nt = int(input())\n\nfor _ in range(t):\n s = inpu(...TRUNCATED) | 0.665118 | "import math\nfrom collections import deque\nfrom sys import stdin, stdout\nfrom string import ascii(...TRUNCATED) | 0.665024 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n \n a = list(map(int, input().s(...TRUNCATED) | 0.664269 | "from sys import stdin\nfrom collections import Counter\n\ndef func(arr,n,l):\n count=0\n k=l//n\n i(...TRUNCATED) | 0.663188 | "# cook your dish here\nfor test in range(int(input())):\n n = int(input())\n ar = list(map(in(...TRUNCATED) | 0.66133 | "t=int(input())\nfor i in range(t):\n s=input()\n zeroes=s.count('0')\n ones=s.count('1')\n if (len((...TRUNCATED) | 0.659944 | "import sys\ninput = sys.stdin.readline\n\n\nt = int(input())\nfor _ in range(t):\n n = int(input(...TRUNCATED) | 0.657029 | "def subCount(arr, n, k):\r\n\r\n mod = []\r\n for i in range(k + 1):\r\n mod.append(0)(...TRUNCATED) | 0.656042 | for t in range(int(input())):
n=int(input())
print(bin(n).count("1")) | 0.655306 | "for _ in range(int(input())):\n\tn=int(input())\n\ts=list(map(int,input().split()))\n\tl=s.index(1)(...TRUNCATED) | 0.655182 | "t=int(input())\nno_of_chars = 256\n \n# Function to find smallest window \n# containing all chara(...TRUNCATED) | 0.654338 | "for _ in range(int(input())):\n st=input().replace(\"=\",\"\")\n if not len(st):print(1)\n else:\n (...TRUNCATED) | 0.648488 | "for _ in range(int(input())):\n n,s = int(input()),input().strip()\n previ,num,_s,dic = s[0],(...TRUNCATED) | 0.64476 | "from sys import stdin\ndef gt(num):\n if num:\n return num\n return 0\nfor __ in range(int(stdin.r(...TRUNCATED) | 0.64402 | "for _ in range(int(input())):\r\n S = input()\r\n n = len(S)\r\n a = n - S.count('a')\r\n (...TRUNCATED) | 0.643237 | "# encoding: utf-8\nfrom sys import stdin\n\ndef solve(a):\n\n # root node of tries denotes empty(...TRUNCATED) | 0.638521 | "from sys import stdin,stdout\nimport math,bisect\nfrom datetime import date\nfrom collections impor(...TRUNCATED) | 0.636888 | "t = int(input())\nfor j in range(0, t):\n n = int(input())\n m = 100\n for i in range(0, n):\n str(...TRUNCATED) | 0.636293 | "t = int(input())\n\nfor _ in range(t):\n n = int(input())\n a = input().strip()\n prev = a(...TRUNCATED) | 0.634712 | "import sys\nINF = 10**20\nMOD = 10**9 + 7\nI = lambda:list(map(int,input().split()))\nfrom math imp(...TRUNCATED) | 0.634087 | "for tcase in range(int(input())):\n n=int(input())\n ls = list(map(int, input().split()))\n (...TRUNCATED) | 0.633754 | "from collections import Counter \nfor _ in range(int(input())):\n s = input()\n c = Counter(list(s)(...TRUNCATED) | 0.632971 | "def convertToParitys(s):\r\n \"\"\"\r\n This converts the string s to an int, which is a bitM(...TRUNCATED) | 0.631599 | "# coding: utf-8\n# Your code here!\n\ndef solve(s, c):\n if(len(s)==1):\n if s[0]==c:\n (...TRUNCATED) | 0.630907 | "from sys import stdin\n\ntt = int(stdin.readline())\n\nfor loop in range(tt):\n\n n = int(stdin.(...TRUNCATED) | 0.625422 | "t= int(input())\nwhile(t>0):\n n = int(input())\n m=0\n m=n//(2**11)\n n%=(2**11)\n (...TRUNCATED) | 0.622989 | "import sys\n\ninput=sys.stdin.readline\n\n#t=1\nt=int(input())\nfor _ in range(t):\n n=int(input(...TRUNCATED) | 0.622532 | "def check(s):\n arr=[s[0]]\n l=len(s)\n f1=0\n for i in range(1,l):\n if arr==[]: arr.append(s[i])(...TRUNCATED) | 0.622486 | "def sort_str(s):\n o = []\n for c in s:\n o.append(c)\n o.sort()\n return \"\".j(...TRUNCATED) | 0.621494 | "t = input()\nj = t[0]\nd, s = 0, int(j)\nfor i in t[1: ]:\n if j != i:\n if d == 1: d, s (...TRUNCATED) | 0.619483 | "class Solution:\n def maxScore(self, s: str) -> int:\n maxi=0\n for i in range(1,l(...TRUNCATED) | 0.619222 | "t = int(input())\nfor _ in range(t):\n\ts = input()\n\tn = len(s)\n\tif s.count('1') == n or s.coun(...TRUNCATED) | 0.617693 | "# cook your dish here\nfrom sys import stdin\nimport functools\ndef gcd(a, b): \n if (a == 0): \n (...TRUNCATED) | 0.616337 | "from operator import itemgetter\nimport sys\ninput = sys.stdin.readline\n\nMAX_A = 200\nt = int(inp(...TRUNCATED) | 0.615981 | "# cook your dish here\nfor _ in range(int(input())):\n g=input()\n h=g[::-1]\n if h==g :\n(...TRUNCATED) | 0.615778 | "tests = int(input())\nfor test in range(tests):\n n = int(input())\n a = [int(i) for i in inp(...TRUNCATED) | 0.614653 | "# cook your dish here\nt=int(input())\nj=0\nwhile j<t:\n n=int(input())\n lst=list(map(int,in(...TRUNCATED) | 0.61248 | "for _ in range(int(input())):\n n = int(input())\n arr = list(map(int,input().split()))\n (...TRUNCATED) | 0.609669 | "for i in range(int(input())):\n a=int(input())\n b=input().split()\n if '0' in b:\n (...TRUNCATED) | 0.609569 | "class Solution:\n def findMaxConsecutiveOnes(self, nums):\n \"\"\"\n :type nums(...TRUNCATED) | 0.608242 | "s = list(input())\n\nans = 0\nfor i in range(1, len(s)):\n if s[i] == s[i-1]:\n ans += 1\n i(...TRUNCATED) | 0.605853 | "# cook your dish here\ns=input()\ns1=s[::-1]\narr=[]\ncnt=0\nfor i in range(len(s1)):\n arr.append((...TRUNCATED) | 0.603425 | "# cook your dish here\nfor _ in range(int(input())):\n n=int(input())\n a=list(map(int,input().spli(...TRUNCATED) | 0.60152 | "def solve(l):\r\n m = l.index(max(l))\r\n if m == 0 or m == len(l) - 1:\r\n return 1\r\n (...TRUNCATED) | 0.600561 | "class Solution:\n def numSteps(self, s: str) -> int:\n i, mid_zero = 0 , 0 \n for (...TRUNCATED) | 0.59879 | "n = int(input())\na = input().replace(' ', '')\nans = 0\nfor i in range(n):\n for j in range(i, (...TRUNCATED) | 0.598035 | "def check(l,n):\n m = 0\n for i in range(n-1):\n x = l[i]\n c = 0\n j = (...TRUNCATED) | 0.596278 | "n=int(input())\ns=input()\n\nN=n\n\nN0 = 2**(N-1).bit_length()\ndata = [n]*(2*N0)\nINF = n\n# 区(...TRUNCATED) | 0.596108 | "'''Author- Akshit Monga'''\nfrom sys import stdin, stdout\ninput = stdin.readline\nt=int(input())\n(...TRUNCATED) | 0.595566 | "# cook your dish here\nt = int(input())\n\nres = []\nfor i in range(t):\n n = int(input())\n arr = (...TRUNCATED) | 0.595116 | "for _ in range(int(input())):\n n = int(input())\n digits = list(map(int,list(input())))\n (...TRUNCATED) | 0.595003 | "n=int(input())\ns=[c=='1' for c in input()]\nm=len(s)\nz=[[0,0]]\nfor c in s:\n ind = z[-1][c]\n z[(...TRUNCATED) | 0.592836 | "#include<sdg.h>\nfor _ in range(int(input())):\n s=input()\n n=len(s)\n if n==1:\n (...TRUNCATED) | 0.592538 | "from sys import setrecursionlimit\nsetrecursionlimit(10 ** 9)\n\ndef solve(i, j, c=0):\n if i > j:\(...TRUNCATED) | 0.59245 | "t=int(input())\r\nfor _ in range(t):\r\n size=int(input())\r\n li=list(map(int,input().split((...TRUNCATED) | 0.591959 | "#CF Round 150. Div II Prob. A - Dividing Orange\nimport sys\n\ndp = [[[-1 for j in range(3)] for i (...TRUNCATED) | 0.589986 | "import sys\n\ninput=sys.stdin.readline\n\nfor _ in range(int(input())):\n N=int(input())\n e=(...TRUNCATED) | 0.588064 | "# cook your dish here\nfor i in range(int(input())):\n s = input()\n m = 0\n p = 0\n d = 0\n l = [](...TRUNCATED) | 0.587927 | "# cook your dish here\nfrom sys import stdin, stdout\n\nfor _ in range(int(stdin.readline())):\n n,(...TRUNCATED) | 0.587555 | "a=eval(input())\nwhile(a):\n\n x=eval(input())\n b=list(map(int,input().split()))\n z=[0]*100\n k=1(...TRUNCATED) | 0.587433 | "import sys\ninput = sys.stdin.readline\nimport bisect\n\nt=int(input())\nfor tests in range(t):\n (...TRUNCATED) | 0.587132 | "def mForMaxSeq(arr, n):\r\n eim = dict()\r\n for i in range(n):\r\n if arr[i] in eim:\(...TRUNCATED) | 0.585355 | "def solve():\n s = input()\n pm = 0\n cur = 0\n ans = len(s)\n for i in range(len(s)(...TRUNCATED) | 0.584625 | "for _ in range(int(input())):\n # a, b = map(int, input().split())\n n = int(input())\n # (...TRUNCATED) | 0.584243 | "class Solution:\n def minFlipsMonoIncr(self, S: str) -> int:\n onesSoFar = 0\n par(...TRUNCATED) | 0.583526 | "from sys import stdin\nfor _ in range(int(input())):\n n = int(input())\n l = list(map(int,in(...TRUNCATED) | 0.583005 | "t = [0] * 26\n\n\ndef get_k(c):\n return ord(c) - ord('a')\n\n\ndef analyze(s):\n length_of_s(...TRUNCATED) | 0.582193 | "def frequency(s,n):\n f=[[0 for i in range(26)]for j in range(n+1)]\n count=0\n for i in r(...TRUNCATED) | 0.581449 | "n = int(input())\nfor i in range(n):\n s = input()\n l = len(s)\n n1 = int(s[0])\n n2 =(...TRUNCATED) | 0.580889 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 118