problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p03147 | u941753895 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time\n\nsys.setrecursionlimit(10**7)\ninf=10**20\nmod=10**9+7\n\ndef LI(): return list(map(int,input().split()))\ndef I(): return int(input())\ndef LS(): return input().split()\ndef S(): return input()\n\ndef main():\n n=I()\n l=LI(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s396176793', 's509826298', 's744544149'] | [5420.0, 5420.0, 5420.0] | [43.0, 43.0, 42.0] | [510, 556, 510] |
p03147 | u945181840 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['N = int(input())\nh = list(map(int, input().split()))\nans = 0\nfor i in range(max(h)):\n h.append(0)\n count = 0\n for k in range(N):\n if h[k] != 0 and h[k + 1] == 0:\n count += 1\n ans += count\n print(count, h)\n h = list(map(lambda x: (x - 1, 0)[x == 0], h))\nprint(ans)', 'N =... | ['Wrong Answer', 'Accepted'] | ['s809942551', 's747435382'] | [3064.0, 3064.0] | [23.0, 20.0] | [299, 327] |
p03147 | u945200821 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['import sys\nimport numpy as np\n\n\ndef count_water(np_arr):\n least = min(np_arr)\n div_p = np.where(np_arr == least)[0]\n np_arr -= least\n return least + count_water(np_arr[:div_p]) + count_water(np_arr[div_p + 1:])\n\n\ndef main():\n readline = sys.stdin.readline\n \n n = int(readline().rstirp())\n h = np... | ['Runtime Error', 'Accepted'] | ['s630785871', 's361221358'] | [18504.0, 12388.0] | [247.0, 156.0] | [428, 467] |
p03147 | u953794676 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['def water(flowers, count):\n print(f\'count : {count}\')\n print(f\'flowers : {flowers}\')\n if len(flowers) is 0:\n return count\n count = count + min(flowers)\n flowers = [int(e-min(flowers)) for e in flowers]\n while 0 in flowers:\n count = water(flowers[:flowers.index(0)], count)\n... | ['Runtime Error', 'Accepted'] | ['s687973929', 's964344119'] | [2940.0, 3064.0] | [17.0, 26.0] | [717, 455] |
p03147 | u962197874 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['n = int(input())\nh = list(map(int,input().split()))\na = 0\nwhile sum(h) > 0:\n lst = [i for i, x in enumerate(h) if x > 0]\n mx = min(lst)\n for i in range(len(lst) -1):\n if lst[i] + 1 == lst[i+1]:\n mx += 1\n else:\n break\n h = [x - 1 if i >= min(lst) and i <= mx ... | ['Wrong Answer', 'Accepted'] | ['s531464025', 's424584135'] | [4724.0, 3188.0] | [442.0, 391.0] | [372, 358] |
p03147 | u991567869 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | [' = int(input())\nh = list(map(int, input().split()))\n\nans = 0\ncnt = 0\n\nfor i in range(1, max(h) + 1)[::-1]:\n cnt = 0\n for j in range(n):\n if h[j] == i:\n h[j] -= 1\n cnt += 1\n if j + 1 < n:\n if h[j + 1] == i:\n cnt -= 1\n ans... | ['Runtime Error', 'Accepted'] | ['s695721958', 's731434250'] | [2940.0, 3064.0] | [17.0, 20.0] | [322, 295] |
p03147 | u993435350 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['N = int(input())\n\nheight = list(map(int,input().split()))\n\nans = 0\ninterval = 0\n\nfor i in range(N):\n \n if height[i] > interval:\n\u3000\u3000\n\u3000\u3000\n \n ans += height[i] - interval\n interval += height[i] - interval\n \n else:\n interval = height[i]\n\nprint(ans)', 'N = int(input())\nh... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s473162024', 's665556602', 's458754280'] | [2940.0, 4852.0, 3060.0] | [17.0, 66.0, 17.0] | [574, 440, 568] |
p03147 | u994988729 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['N = int(input())\nH = list(map(int, input().split()))\n\nans = 0\nwhile any(H):\n water = min(h for h in H if h)\n cnt = 0\n for x, y in zip(H[:-1], H[1:]):\n if x > y and y == 0:\n cnt += 1\n elif x < y and x == 0:\n cnt += 1\n ans += water * (cnt // 2 + 1)\n H = [m... | ['Wrong Answer', 'Accepted'] | ['s009332240', 's807391212'] | [3064.0, 3064.0] | [21.0, 21.0] | [344, 381] |
p03147 | u999750647 | 2,000 | 1,048,576 | In a flower bed, there are N flowers, numbered 1,2,......,N. Initially, the heights of all flowers are 0. You are given a sequence h=\\{h_1,h_2,h_3,......\\} as input. You would like to change the height of Flower k to h_k for all k (1 \leq k \leq N), by repeating the following "watering" operation: * Specify intege... | ['n = int(input())\nh = list(map(int, input().split()))\nans = 0\np = 0\nfor i in range(n):\n if p <= h[i]:\n ans += h[i]-p\n p = h[i]\n print(p)\nprint(ans)', 'n = int(input())\nh = list(map(int, input().split()))\nans = 0\np = 0\nfor i in range(n):\n if p <= h[i]:\n ans += h[i]-p\n p = h[... | ['Wrong Answer', 'Accepted'] | ['s961832718', 's132765211'] | [9164.0, 9068.0] | [26.0, 28.0] | [162, 149] |
p03148 | u016128476 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from heapq import heappop, heappush\nN, K = map(int, input().split())\nKMAX = 10 ** 5 + 1\nTD = []\nfor _ in range(N):\n t, d = map(int, input().split())\n TD.append((d, t))\n\nTD.sort(reverse=True)\n\npioneer = []\nsuccessor = []\nappear = [False] * KMAX\ncnt = 0\nnsp = 0 # num of species\nbase = 0\nbest = []... | ['Runtime Error', 'Accepted'] | ['s168351319', 's991525436'] | [24576.0, 24448.0] | [558.0, 579.0] | [842, 840] |
p03148 | u025235255 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n, k = map(int, input().split())\nsushi = []\nfor i in range(n):\n tmp = list(map(int, input().split()))\n sushi.append(tmp)\neaten = set() \nchohuku = [] \nscores = [] \n\nsushi.sort(key=lambda x:x[1])\nsushi.reverse() \n\ntmp = 0 \nfor i in range(k): \n if sushi[i][0] in eaten: \n chohuku.append(sus... | ['Runtime Error', 'Accepted'] | ['s654639588', 's999617244'] | [30792.0, 30396.0] | [502.0, 530.0] | [1061, 1065] |
p03148 | u029169777 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K=map(int,input().split())\n\ntd=sorted([tuple(map(int,input().split())) for _ in range(N)],key=lambda x:-x[1])\nanswer=0\n\nnumber=set()\nafterpop=[]\n\nfor i in range(K):\n answer+=td[i][1]\n if td[i][0] not in number:\n number.append(td[i][0])\n else:\n afterpop.append(td[i][1])\n\nanswer+=(len(number))... | ['Runtime Error', 'Accepted'] | ['s335391404', 's929467953'] | [22148.0, 22160.0] | [374.0, 438.0] | [618, 591] |
p03148 | u043844098 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ["import heapq\n\nfrom typing import List\n\n\ndef main():\n n, k = map(int, input().split())\n v = []\n for _ in range(n):\n t, d = map(int, input().split())\n v.append((t, d))\n\n print(vs(v, k))\n\n\ndef vs(v: List[List[int]], k: int) -> int:\n v.sort(reverse=True)\n\n # Dup type\n ... | ['Wrong Answer', 'Accepted'] | ['s727403069', 's451252954'] | [28068.0, 31048.0] | [297.0, 270.0] | [987, 1028] |
p03148 | u046187684 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ["def solve(string):\n n, k, *td = map(int, string.split())\n td = sorted([(t, d) for t, d in zip(td[::2], td[1::2])], key=lambda x: x[1], reverse=True)\n max_variety = len(set([c[0] for c in td]))\n choice = td[:k]\n r = []\n variety = set([])\n ans = 0\n for _c in choice:\n ans += _c[1]... | ['Runtime Error', 'Accepted'] | ['s223820650', 's187523084'] | [26876.0, 26876.0] | [316.0, 304.0] | [824, 776] |
p03148 | u048004795 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ["\n# -*-coding: utf-8 -*-\n\nimport sys\n\ndef main():\n input = sys.stdin.readline\n n, k = map(int, input().split())\n S = [tuple(map(int, input().split())) for _ in range(n)]\n S.sort(key=lambda x: -x[1])\n y_1, y_0 = [0], [0]\n st = set()\n\n for t, d in S:\n if t in st:\n \n... | ['Wrong Answer', 'Accepted'] | ['s531785780', 's787536212'] | [32896.0, 32876.0] | [223.0, 208.0] | [722, 705] |
p03148 | u058861899 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n,k=map(int,input().split())\nli=[[0,0] for i in range(n)]\nfor i in range(n):\n li[i][0],li[i][1]=map(int,input().split())\n \n\nli.sort(reverse=True,key=lambda x:x[1])\n\ndef find_num_neta(choice,li):\n k=[]\n for i in choice:\n k.append(li[i][0])\n return len(set(k))\n\n\n\n#--------------------... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s356379640', 's720878298', 's741034102', 's403965290'] | [22520.0, 21288.0, 3192.0, 31116.0] | [2105.0, 2105.0, 17.0, 715.0] | [955, 880, 1536, 996] |
p03148 | u062459048 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n, k = map(int, input().split())\nTD = [[] for i in range(n)]\nfor i in range(n):\n TD[i] = list(map(int, input().split()))\n \nTD.sort(key = lambda x:x[1], reverse = True)\n\nans = 0\nhuku = []\nsu = set([])\n\nfor i, j in TD[:k]:\n ans += j\n if i in su:\n huku.append([i,j])\n su.add(i)\nans += len(su)**2\n... | ['Runtime Error', 'Accepted'] | ['s280615946', 's720498130'] | [3064.0, 32964.0] | [17.0, 498.0] | [585, 582] |
p03148 | u099566485 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['def IL(): return list(map(int,input().split()))\ndef SL(): return input().split()\ndef I(): return int(input())\ndef S(): return input()\nimport heapq\nn,k=IL()\nnl=dict()\nfor i in range(n+1):\n nl[i]=0\nl=[]\nans=[]\nf=[]\nel=[]\nheapq.heapify(el)\ns=0\nfor i in range(n):\n t,d=IL()\n l.append([d,t])\nl.so... | ['Runtime Error', 'Accepted'] | ['s164809912', 's752308067'] | [29852.0, 27324.0] | [553.0, 531.0] | [883, 646] |
p03148 | u102367647 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['\n\nINPUT1 = [int(n) for n in input().split()]\n\nN, K = INPUT1[0], INPUT1[1]\nParameters = []\nScore, Test = 0, 0\nflag1, flag2 = 0, 0\n\n\nfor i in range(N):\n INPUT2 = [int(m) for m in input().split()]\n Parameters.append((INPUT2[0], INPUT2[1]))\n\nParameters = sorted(Parameters, key=lambda x: x[1], reverse=... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052605986', 's558610235', 's765825134'] | [19912.0, 25260.0, 21444.0] | [2105.0, 2105.0, 262.0] | [1390, 2042, 691] |
p03148 | u129315407 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N, K = map(int, input().split())\nsushi = []\nfor i in N:\n s = list(map(int, input().split()))\n sushi.append(s)\n\n\nsushi.sort(key=lambda x: x[1], reverse=True)\n\ndef find_next(start, curr, point, tlist, tcount):\n if start == N:\n return [point, curr]\n max_c = curr\n max_p = point\n for... | ['Runtime Error', 'Accepted'] | ['s376318290', 's748895432'] | [3064.0, 31164.0] | [18.0, 1269.0] | [1280, 821] |
p03148 | u160244242 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ["nklist = list(map(int,input().split()))\nn, k= nklist[0], nklist[1]\n\nlst = [tuple(map(int, input().split())) for i in range(n)]\n\nmax_pt = 0\nfor comb in itertools.combinations(lst, k):\n kinds_set = set()\n umami = 0\n for tpl in comb:\n kinds_set.add(tpl[0])\n umami += tpl[1]\n ttl_pt =... | ['Runtime Error', 'Accepted'] | ['s912200099', 's311680640'] | [16604.0, 22164.0] | [315.0, 428.0] | [443, 540] |
p03148 | u181526702 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from itertools import groupby\nfrom heapq import heapify, heappop\n\nN, K = map(int, input().split())\nsushi = [tuple(map(int, input().split())) for _ in range(N)]\n\n\ndef point(sushi):\n t, d = zip(*sushi)\n return sum(d) + len(set(t))**2\n\n\nsrt = sorted(sushi, key=lambda x: x[1], reverse=True)\neat, non_ea... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s465148335', 's848111281', 's983841686'] | [20316.0, 3064.0, 30784.0] | [426.0, 19.0, 452.0] | [792, 644, 537] |
p03148 | u203843959 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K=map(int,input().split())\n\ndtlist = []\ntdlist = []\nfor i in range(N):\n t,d=map(int,input().split())\n dtlist.append((d,t))\n tdlist.append((t,d))\n \ndtlist.sort(reverse=True)\ntdlist.sort(reverse=True)\nprint(dtlist)\nprint(tdlist)\n \nsum_d=0\nset_t=set()\nfor i in range(K):\n d,t=dtlist[i]\n sum_d +... | ['Wrong Answer', 'Accepted'] | ['s387159102', 's641273937'] | [33796.0, 26984.0] | [652.0, 565.0] | [356, 829] |
p03148 | u210440747 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ["#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n\nimport sys\ninput = sys.stdin.readline\n\ndef main():\n N, K = map(int, input().split())\n # sushis = sorted([tuple(map(int, input().split())) for _ in range(N)], key=lambda x:x[1], reverse=True)\n sushis = [tuple(map(int, input().split())) for _ in range(N)]\n su... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s177504646', 's624683649', 's665592466', 's906065103', 's391683653'] | [24824.0, 41136.0, 76124.0, 41136.0, 24836.0] | [2105.0, 569.0, 2106.0, 2105.0, 270.0] | [1068, 989, 992, 981, 978] |
p03148 | u210827208 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n,k=map(int,input().split())\nX=[]\nfor i in range(n):\n t,d=map(int,input().split())\n X.append([t,d])\n \nX.sort(key=lambda x:x[1],reverse=True)\n\nV=set()\nf=0\nS=[]\n\nfor t,d in X[:k]:\n f+=d\n if t in V:\n S.append(t)\n else:\n V.add(t)\n\npoint=f+len(V)**2\n\nans=point\n\nfor t,... | ['Wrong Answer', 'Accepted'] | ['s597724390', 's963146669'] | [22972.0, 22980.0] | [433.0, 505.0] | [449, 451] |
p03148 | u226155577 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from collections import defaultdict\nN, K = map(int, input().split())\nT = defaultdict(list)\nfor i in range(N):\n t, d = map(int, input().split())\n T[t].append(d)\nS = []\nU = []\nfor k, v in T.items():\n v.sort(reverse=1)\n U.append((v[0], k))\n for w in v[1:]:\n S.append((w, k))\nS.sort(reve... | ['Runtime Error', 'Accepted'] | ['s656041119', 's813140567'] | [42324.0, 40224.0] | [942.0, 1035.0] | [802, 825] |
p03148 | u237362582 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from operator import itemgetter\n\nn, k = map(int, input().split(" "))\nsushis = []\nflags = [False for i in range(n+10)]\nsushis2 = []\nsushis22 = []\nsum2 = 0\ncount2 = 0\nfor i in range(n):\n t, d = (map(int, input().split(" ")))\n sushis.append([t, d])\n\n if not flags[t]:\n sushis22.append(d)\n ... | ['Wrong Answer', 'Accepted'] | ['s348803315', 's017837384'] | [26860.0, 32716.0] | [516.0, 522.0] | [1395, 1004] |
p03148 | u259418313 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n, k = map(int, input().split())\nans = []\naru = []\nnai = []\nspe = set()\nf = []\nm = 0\nfor i in range(n):\n t, d = map(int, input().split())\n nai.append([t,d])\nnai = sorted(nai, key=lambda x: x[1], reverse = True)\nfor i in range(k):\n anstmp = nai.pop(0)\n if(anstmp[0] not in spe):\n ans.ap... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015827872', 's228905495', 's793494819'] | [24368.0, 141012.0, 33024.0] | [2105.0, 2105.0, 1972.0] | [639, 679, 593] |
p03148 | u272557899 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['#import collections\nn, k = map(int, input().split())\nc = []\nfor i in range(n):\n c.append([int(m) for m in input().split()])\nc.sort(key=lambda x:(x[0], x[1]))\nf = sorted(c, key=lambda x:(x[1], x[0]), reverse=True)\ndonyoku = 0\ndonset = set()\nfor i in range(k):\n donyoku += f[i][1]\n donset.add(f[i][0]... | ['Wrong Answer', 'Accepted'] | ['s102016225', 's791724375'] | [38808.0, 37264.0] | [2106.0, 748.0] | [1404, 1482] |
p03148 | u332906195 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['# -*- coding: utf-8 -*-\n\ndef popMaxOishisa(sushis):\n t, d = max(sushis["max"].items(), key=lambda i:i[1])\n if len(sushis[t]) == 1:\n sushis.pop(t)\n sushis["max"].pop(t)\n else:\n sushis[t].pop()\n sushis["max"][t] = sushis[t][-1]\n return t, d\n\n\ndef popMinOishisa_nonUni... | ['Runtime Error', 'Accepted'] | ['s337972625', 's011301347'] | [37252.0, 23528.0] | [2105.0, 428.0] | [2273, 477] |
p03148 | u335038698 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['# -*- coding utf-8 -*-\n\nn, k = map(int, input().split())\nsushi = [list(map(int, input().split())) for _ in range(n)]\nsushi.sort(key = lambda x: x[1], reverse = True) # sort by d\n\nmp_max = 0\nop = 0\ntaberu_ind = set()\npop_cands = []\nt_taberu = set()\n\nfor i in range(k):\n op += sushi[i][1]\n\n t = s... | ['Runtime Error', 'Accepted'] | ['s719930122', 's390067308'] | [39632.0, 39632.0] | [543.0, 531.0] | [965, 1035] |
p03148 | u365364616 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from collections import defaultdict\n\nn, k = map(int, input().split())\nsushi = [list(map(int, input().split())) for _ in range(n)]\nsushi.sort(key=lambda x: x[1])\nt = defaultdict(int)\nx = list(range(n - 1, n - k - 1, -1))\nz = [0]\nfor i in range(n - k, n):\n t[sushi[i][0]] += 1\n z[0] += sushi[i][1]\n\ny =... | ['Runtime Error', 'Accepted'] | ['s291524889', 's730905077'] | [36140.0, 32176.0] | [2108.0, 478.0] | [816, 598] |
p03148 | u367130284 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from heapq import*\nn,k=map(int,input().split())\nl=[tuple(map(int,input().split()))for i in range(n)]\nheapify(sorted(l,key=lambda x:x[1])[::-1])\nprint(l[:k])\nprint(l[k:])\n', 'from collections import*\nn,k=map(int,input().split())\nsushi=sorted([tuple(map(int,input().split()))for i in range(n)],key=lambda x:x[1],... | ['Wrong Answer', 'Accepted'] | ['s255039317', 's312990245'] | [23620.0, 31876.0] | [429.0, 598.0] | [170, 792] |
p03148 | u375616706 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nN, K = map(int, input().split())\nsushis = [list(map(int, input().split())) for _ in range(N)]\n\nsushis = sorted(sushis, key=lambda x: (x[1], x[0]), reverse=True)\n\np = 0\n\n\ndef calcPoint(selected_sushis):\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s357596606', 's732378663', 's648192047'] | [38036.0, 37220.0, 41776.0] | [402.0, 2106.0, 500.0] | [943, 959, 975] |
p03148 | u394721319 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n, k = map(int, input().split())\nA = []\nfor _ in range(n):\n t, d = map(int, input().split())\n A.append((d, t))\n\nA.sort(reverse=True)\nX = []\nY = []\nst = set()\n\nprint(A)\n\nfor i in range(k):\n d,t = A[i]\n if t in st:\n X.append(d)\n else:\n Y.append(d)\n st.add(t)\n\npri... | ['Wrong Answer', 'Accepted'] | ['s961700515', 's140617128'] | [22764.0, 19848.0] | [496.0, 448.0] | [553, 533] |
p03148 | u476124554 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import collections\nN,K = map(int,input().split())\nt = []\nd = []\nfor _ in range(N):\n i,j = map(int,input().split())\n t.append(i)\n d.append(j)\ntd1 = list(zip(t,d))\ntd1 = sorted(td1,key=lambda x: x[1], reverse=True)\nt1,d1 = zip(*td1)\nans1 = 0\nfor i in range(K):\n ans1 += d1[i]\nans1 = ans1 + len(... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s479325540', 's790303018', 's312840667'] | [35816.0, 35776.0, 22620.0] | [639.0, 656.0, 487.0] | [623, 611, 1302] |
p03148 | u476604182 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K,*L = map(int, open(0).read().split())\nls = []\nfor i,(t,d) in enumerate(zip(*[iter(L)]*2)):\n ls.append((d,t))\nls.sort()\nS = set()\npre = []\nans = 0\nnum = 0\nfor i in range(K):\n d,t = ls.pop()\n ans += d\n if t not in S:\n S.add(t)\n else:\n pre.append(d)\npre.sort(reverse=True)\nans += num*num\n... | ['Wrong Answer', 'Accepted'] | ['s682639076', 's831701142'] | [25940.0, 25940.0] | [270.0, 255.0] | [514, 527] |
p03148 | u506689504 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import numpy as np\n\nn, k = map(int, input().split())\nmx = {}\nfor _ in range(n):\n t, d = map(int, input().split())\n if t not in mx:\n mx[t] = d\n elif mx[t] < d:\n mx[t] = d\n sushi.append((t,d))\n\n\ntaste_sorted_sushi = sorted(sushi, key=lambda x:x[1], reverse=True)\n\n\nselected_sus... | ['Runtime Error', 'Accepted'] | ['s217585313', 's901682138'] | [3064.0, 39896.0] | [17.0, 758.0] | [937, 1148] |
p03148 | u535907456 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K = list(map(int,input().split()))\nTDlist = []\n\nfor x in range(0,N):\n TDlist.append(list(map(int,input().split())))\n\nTDlist.reverse(key = lambda x: x[1])\nkinds = []\nseconds = []\nanswer = 0\n\nfor x in TDlist[:K]:\n if not x[0] in kinds:\n kinds.append(x[0])\n else:\n seconds.append(x... | ['Runtime Error', 'Accepted'] | ['s802425120', 's949478968'] | [27408.0, 30848.0] | [356.0, 502.0] | [657, 616] |
p03148 | u545368057 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['\n\n# d = sum(di) + x**x\n\n\n\nfrom collections import defaultdict\n\ndi = defaultdict(list)\nn, k = map(int, input().split())\n\nsushi = []\nkinds = []\nfor i in range(n):\n t,d = map(int, input().split())\n sushi.append((d,t))\n kinds.append(t)\nsushi.sort(reverse=True)\nsushidict = defaultdict(int)\nn_k... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s636387366', 's829586507', 's204516573'] | [33076.0, 31136.0, 29804.0] | [618.0, 488.0, 587.0] | [1444, 1521, 1519] |
p03148 | u557494880 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K = map(int,input().split())\nans = [0 for i in range(N+1)]\nfood = {}\nfood1 = []\nfor i in range(1,N+1):\n food[i] = 0\nfor i in range(N):\n t,d = map(int,input().split())\n food1.append((d,t))\nfood1.sort()\nsyurui = 0\nsum = 0\nx = []\nfor i in range(1,N+1):\n d,t = food1[-i]\n sum += d\n if f... | ['Wrong Answer', 'Accepted'] | ['s735096824', 's327718584'] | [30104.0, 29528.0] | [2105.0, 586.0] | [620, 765] |
p03148 | u562935282 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from collections import defaultdict\nfrom operator import itemgetter\nimport sys\n\ninput = sys.stdin.readline\n\nn, k = map(int, input().split())\ne = defaultdict(list)\nfor _ in range(n):\n t, d = map(int, input().split())\n t -= 1\n e[t].append(d)\n\ntops = []\nrests = []\nfor l in e.values():\n for i,... | ['Runtime Error', 'Accepted'] | ['s620507682', 's365550375'] | [27684.0, 18396.0] | [223.0, 244.0] | [787, 1014] |
p03148 | u580502851 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K=map(int,input().split())\ntd=[[int a for a in input().split()]for i in range(N)]\n\ntd=sorted(td,key=lambda x:-x[1])\n\nans=0\neat=[]\nnoteat=[]\nfor t,d in td[:K]:\n ans+=d\n if t not in eat:\n eat.append(t)\n else:\n noteat.append(d)\ntemp_result=ans+sum(eat)**2\nmax_result=temp_result\n\nfor t,d in td... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s354634522', 's542281796', 's572288048'] | [2940.0, 26892.0, 26880.0] | [21.0, 2105.0, 456.0] | [492, 495, 495] |
p03148 | u597374218 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N,K=map(int,input().split())\nTD=[[int(j) for j in input().split()] for i in range(N)]\nTD=sorted(TD,key=lambda x:-x[1])\ndelicious=0\nkind=set()\nstack=[]\nfor t,d in TD[:K]:\n delicious+=d\n if t in kind:stack.append(t)\n else:kind.add(d)\nans1=delicious+len(kind)**2\nans2=ans1\nfor t,d in TD[K:]:\n if ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s641285397', 's853862680', 's329751023'] | [28744.0, 26892.0, 26892.0] | [437.0, 437.0, 489.0] | [444, 436, 432] |
p03148 | u606045429 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from heapq import heappush, heappop\n\nINF = float("inf")\n\nN, K, *TD = map(int, open(0).read().split())\n\nS = [[] for _ in range(N)]\nfor t, d in zip(*[iter(TD)] * 2):\n S[t - 1].append(d)\n\nE = []\nfor s in S:\n if s:\n E.append(sorted(s, reverse=True))\n else:\n E.append([-INF])\nE.sort(r... | ['Runtime Error', 'Accepted'] | ['s577894966', 's796942086'] | [38148.0, 32964.0] | [557.0, 305.0] | [725, 846] |
p03148 | u619819312 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from collections import defaultdict as de\nn,k=map(int,input().split())\na=sorted([list(map(int,input().split()))for i in range(n)],reverse=True)\nt=de(int)\np,q=0,0\nfor i in a[:k]:\n p+=i[1]\n if t[i[0]]==0:\n q+=1\n t[i[0]]+=1\ns=0\nd=p+q*q\nc=a[:k][::-1]\nfor i in a[k:]:\n if t[i[0]]==0:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s549608963', 's897504505', 's981242484'] | [37732.0, 39220.0, 33060.0] | [631.0, 667.0, 491.0] | [495, 495, 544] |
p03148 | u627417051 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from collections import defaultdict\n\ndef getlist():\n\treturn list(map(int, input().split()))\nD = defaultdict(int)\nV = []\n\nN, K = getlist()\nfor i in range(N):\n\tt, d = getlist()\n\tV.append([d, t])\n\nV = sorted(V)\n\nans = []\nex = []\nk = 0\nfor i in range(N):\n\tx = V[-1 - i][1]\n\tif k < K:\n\t\tif D[x] =... | ['Runtime Error', 'Accepted'] | ['s831989514', 's534153575'] | [26540.0, 26540.0] | [634.0, 747.0] | [802, 834] |
p03148 | u627886394 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ["from collections import Counter\nN, K = map(int, (input().split(' ')))\nsushi = [tuple(map(int, input().split(' '))) for _ in range(N)]\nall_sushi = sorted(sushi, key=lambda x: -x[1])\nprint(sushi)\ndefault_sushi = all_sushi[:K]\namari = all_sushi[K:]\ncounter = Counter([i[0] for i in default_sushi])\nresult = []\nd... | ['Wrong Answer', 'Accepted'] | ['s105984676', 's191425236'] | [74272.0, 23992.0] | [2108.0, 451.0] | [1114, 1233] |
p03148 | u634208461 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N, K = map(int, input().split())\nsushi = [list(map(int, input().split())) for _ in range(N)]\nsorted(sushi, key=lambda x: x[1])\nsushi.reverse()\ntyp = []\nlstA = []\nlstB = []\nfor item in sushi:\n if item[0] in typ:\n item[0] = 0\n lstB.append(item[1])\n else:\n typ.append(item[0])\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s026591198', 's253706919', 's592655718'] | [29928.0, 29888.0, 34236.0] | [2105.0, 441.0, 545.0] | [652, 674, 671] |
p03148 | u677267454 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import heapq\n\nN, K = map(int, input().split())\nsushi = []\nfor i in range(N):\n t, d = map(int, input().split())\n heapq.heappush(sushi, (-d, t))\n\ntotal = 0\ntypes = set()\nremain = []\nfor i in range(K):\n d, t = heapq.heappop(sushi)\n total -= d\n if t not in types:\n types.append(t)\n ... | ['Runtime Error', 'Accepted'] | ['s599789205', 's627407862'] | [16688.0, 19332.0] | [353.0, 541.0] | [705, 699] |
p03148 | u681150536 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['def main():\n N, K = map(int, input().split())\n td = []\n for _ in range(N):\n ti, di = map(int, input().split())\n td.append([ti, di])\n td.sort(key=lambda x: -x[1])\n num = 0\n kind = set()\n changable = []\n for i in range(K):\n num += td[i][1]\n if td[i][0] in ... | ['Wrong Answer', 'Accepted'] | ['s870153447', 's343733095'] | [24464.0, 24496.0] | [434.0, 432.0] | [709, 724] |
p03148 | u684120680 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n,k = [int(i) for i in input().split()]\ntd = [[int(i) for i in input().split()] for _ in range(n)]\n\n\ntd.sort(key = lambda x: x[0],reverse=True)\ntd.sort(key = lambda x: x[1],reverse=True)\n\n\n\neated_kind = []\neated_kind_num = 0\neated = []\nfor t,d in td:\n if t not in eated_kind:\n eated_kind.append(t)\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s058721007', 's274302067', 's535766089'] | [24320.0, 23012.0, 24716.0] | [2109.0, 2109.0, 435.0] | [1463, 1491, 1142] |
p03148 | u685263709 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import copy\nfrom collections import defaultdict\nN, K = map(int, input().split())\nTD = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: x[1], reverse=True)\n\ncur = TD[:K]\nbase = sum([x[1] for x in cur])\nvariety = defaultdict(int)\nfor t, d in cur:\n variety[t] += 1\nbonus = len(variet... | ['Wrong Answer', 'Accepted'] | ['s243544751', 's696494979'] | [123368.0, 33024.0] | [2106.0, 494.0] | [802, 489] |
p03148 | u707124227 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from collections import deque\nn,k= map(int,input().split())\ntd=[]\nfor i in range(n):\n td.append(list(map(int,input().split())))\ntd.sort(key=lambda x:x[1],reverse=True)\nselect=[]\nnoselect=[]\ncat=[]\nfor tdi in td:\n if tdi[0] in cat:\n noselect.append(tdi)\n continue\n select.append(tdi)... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052466610', 's781935455', 's783299089', 's961614787', 's305466237'] | [29404.0, 29404.0, 29480.0, 29924.0, 29760.0] | [2109.0, 2105.0, 480.0, 2105.0, 547.0] | [496, 465, 472, 375, 1367] |
p03148 | u708615801 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from math import pow\n\ndef compute_score(target_collection):\n keys = {neta_point[0] for neta_point in target_collection}\n points = [neta_point[1] for neta_point in target_collection]\n cardinality = len(keys)\n score = pow(cardinality, 2) + sum(points)\n return score\n\n# exchange one record and com... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s346974547', 's673089999', 's746440203', 's794561748', 's968905389', 's222904517'] | [32376.0, 49672.0, 21436.0, 52052.0, 50492.0, 22500.0] | [2106.0, 474.0, 2104.0, 444.0, 445.0, 262.0] | [1651, 1645, 1657, 2136, 1647, 1404] |
p03148 | u729133443 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import heapq\nn,k=map(int,input().split())\nz=[0,1]\nfor i in range(1,n):\n z.append(z[i]+2)\ns=sorted([list(map(int,input().split()))for _ in range(n)],key=lambda x:-x[1])\nq=[]\nv=0\nans=0\nl=[0]*-~n\nfor a in s[:k]:\n if not l[a[0]]:\n v+=1\n ans+=z[v]\n else:\n heapq.heappush(q,a[1])... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s278279615', 's552905532', 's561535919'] | [37060.0, 36964.0, 113260.0] | [554.0, 553.0, 818.0] | [500, 362, 277] |
p03148 | u810625173 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n, m = [int(i) for i in input().split()]\ntd = [[int(i) for i in input().split()] for n in range(n)]\ntd.sort(key=lambda x:-x[1])\nmemo = set()\na = []\nfor t, d in td:\n if t in memo:\n a.append((d, 0))\n else:\n a.append((d, 1))\n memo.add(t)\na = [(-x, x, d) for x, d in a]\nimport heapq\nheapq.heapify(a)\... | ['Wrong Answer', 'Accepted'] | ['s668503416', 's093100517'] | [43516.0, 43468.0] | [580.0, 600.0] | [466, 759] |
p03148 | u814781830 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['from heapq import heappush, heappop\nN, K = map(int, input().split())\nTD = [list(map(int, input().split())) for _ in range(N)]\nTD.sort(key=lambda x:x[1], reverse=True)\nmuptiple = set()\n\nfor i in range(len(TD)):\n flg = 0\n if TD[i][0] not in muptiple:\n muptiple.add(TD[i][0])\n flg = 1\n T... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s117297600', 's557461610', 's591162474', 's496681259'] | [34288.0, 411508.0, 7084.0, 34288.0] | [481.0, 2130.0, 221.0, 525.0] | [736, 925, 838, 737] |
p03148 | u864197622 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N, K = map(int, input().split())\nX = []\nfor i in range(N):\n x, y = map(int, input().split())\n X.append([i, x, y])\n\nX = sorted(X, key = lambda x:x[2])[::-1]\n\np = 0\nL = [0] * (N+1)\nbonus = 0\nfor i in range(K):\n p += X[i][2]\n if L[X[i][1]] == 0:\n bonus += 1\n \n L[X[i][1]] += 1... | ['Wrong Answer', 'Accepted'] | ['s696011667', 's633770904'] | [25276.0, 25276.0] | [470.0, 510.0] | [777, 793] |
p03148 | u894258749 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import numpy as np\nN, K = map(int,input().split())\ntd = np.empty((N,2),dtype=np.int64)\nfor i in range(N):\n td[i] = list(map(int,input().split()))\n\nt = td[:,0]-1\nd = td[:,1]\norder1=np.argsort(d)[::-1]\nmins = len(set(t[order1[:K]]))\n\nbest = -np.ones(N,dtype=np.int64)\nfor i in range(N):\n if best[t[i]]... | ['Runtime Error', 'Accepted'] | ['s172595671', 's714976817'] | [34876.0, 34748.0] | [994.0, 1683.0] | [785, 792] |
p03148 | u901098617 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['n, k = map(int, input().split())\nh = []\nfor i in range(n):\n t, d = map(int, input().split())\n h.append((t,d))\nh.sort(key=lambda x: -x[1])\n\ntaste = 0\ntypen = 0\ntypecnt = {}\nbad = []\n\n\nfor i in range(k):\n typecnt[h[i][0]] = typecnt.get(h[i][0], 0) + 1\n if(typecnt[h[i][0]] == 1):\n type... | ['Wrong Answer', 'Accepted'] | ['s434941337', 's782400429'] | [21552.0, 21664.0] | [459.0, 462.0] | [560, 715] |
p03148 | u903948194 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['def seek_dup(s):\n t_list = [t for (t, d) in s]\n #d_list = [d for (t, d) in s]\n \n for t, d in reversed(s):\n if t_list.count(t) > 1:\n return (t, d)\n else:\n continue\n \n return None\n \nN, K = map(int, input().split())\nmenu_ = []\n \nfor i in range(N):\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s001180598', 's260115160', 's291002516', 's407870666', 's525059478', 's965898880', 's993372050', 's940815988'] | [22156.0, 21308.0, 20204.0, 21332.0, 3064.0, 20316.0, 22156.0, 21100.0] | [2105.0, 2105.0, 410.0, 2105.0, 18.0, 428.0, 2105.0, 440.0] | [1020, 1006, 596, 1017, 335, 605, 1056, 629] |
p03148 | u922901775 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['#!/usr/bin/env python3\nimport sys\nfrom collections import defaultdict\nfrom itertools import accumulate\nimport heapq\n\ndef solve(N: int, K: int, t: "List[int]", d: "List[int]"):\n sushi = defaultdict([])\n for i in range(N):\n sushi[t[i]].append(d[i])\n\n A = [] \n B = [] \n \n for v in s... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s175489886', 's615227103', 's593232471'] | [11244.0, 17416.0, 35096.0] | [126.0, 319.0, 301.0] | [1920, 926, 1922] |
p03148 | u924691798 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import sys\ninput = sys.stdin.readline\n\nN, K = map(int, input().split())\nnums = []\nfor i in range(N):\n t, d = map(int, input().split())\n nums.append((d, t))\nnums.sort(reverse=True)\nse = set()\nkind = 0\na1 = []\na2 = []\nrest = []\nfor i, n in nums:\n if i < K:\n if not n[1] in se:\n ... | ['Runtime Error', 'Accepted'] | ['s879834328', 's393319537'] | [17640.0, 19188.0] | [266.0, 312.0] | [731, 670] |
p03148 | u945181840 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['import sys\nfrom operator import itemgetter\nread = sys.stdin.read\n\nN, K, *td = map(int, read().split())\ntd = sorted(zip(*[iter(td)] * 2), key=itemgetter(1), reverse=True)\n\nstack = []\ntaste = 0\nneta_group = set()\nfor t, d in td[:K]:\n taste += d\n if t in neta_group:\n stack.append(d)\n else:\... | ['Wrong Answer', 'Accepted'] | ['s100224112', 's549918148'] | [25316.0, 25316.0] | [226.0, 201.0] | [714, 726] |
p03148 | u947883560 | 2,000 | 1,048,576 | There are N pieces of sushi. Each piece has two parameters: "kind of topping" t_i and "deliciousness" d_i. You are choosing K among these N pieces to eat. Your "satisfaction" here will be calculated as follows: * The satisfaction is the sum of the "base total deliciousness" and the "variety bonus". * The base tota... | ['N, K = [int(x) for x in input().split()]\ntd = [tuple([int(x) for x in input().split()]) for _ in range(N)]\nINF = 10**9\nprint(td)\n\n\ndef score(a):\n kiso = sum([x[1] for x in a])\n # print(a)\n bonus = len(set([x[0] for x in a]))**2\n return kiso + bonus\n\n\ntotal = score(td)\nfor i in range(N, K, -1... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s300221884', 's766947965', 's760649728'] | [29108.0, 22784.0, 25472.0] | [2105.0, 2105.0, 477.0] | [590, 917, 774] |
p03186 | u003928116 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c = map(int, input().split())\nif a + b + 1 >= c:\n c = b + c\n \nelif a + b > c:\n c = a + b + 1 + b\ninput(c) \n ', 'a, b, c = map(int, input().split())\nif a + b + 1 >= c:\n c = b + c\n \nelif a + b < c:\n c = a + b + 1 + b\ninput(c) \n ', 'a, b, c = map(int, input().split())\nif ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s165367210', 's312968499', 's409775278', 's395260565'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [128, 128, 114, 84] |
p03186 | u004025573 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c = map(int, input().split())\n\nif a+b<=c:\n print(a+b+b+1)\nelse:\n print(b+c)', 'a, b, c = map(int, input().split())\n\nif a+b<c:\n print(a+b+b+1)\nelse:\n print(b+c)'] | ['Wrong Answer', 'Accepted'] | ['s484221192', 's719931979'] | [2940.0, 2940.0] | [18.0, 18.0] | [87, 86] |
p03186 | u016282832 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ["print('入力してください')\ninput_list = input().split(' ')\nA = int(input_list[0])\nB = int(input_list[1])\nC = int(input_list[2])\n\nif A + B >= C: \n print(B + C)\nelse: \n print(1 + A + B + B)\n", "input_list = input().split(' ')\nA = int(input_list[0])\nB = int(input_list[1])\nC = int(input_list[2])\n\nif A + B >= ... | ['Wrong Answer', 'Accepted'] | ['s116896899', 's993025848'] | [2940.0, 2940.0] | [18.0, 18.0] | [369, 335] |
p03186 | u018250459 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A, B, C = map(int, input().split())\nif A + B >= C - 1:\n print("{}".format(B+C)\nelse:\n print("{}".format(A+2*B+1))', 'A, B, C = map(int, input().split())\nif A + B >= C - 1:\n print(B+C)\nelse:\n print(A+2*B+1)'] | ['Runtime Error', 'Accepted'] | ['s855982019', 's438757470'] | [2940.0, 3064.0] | [18.0, 17.0] | [119, 94] |
p03186 | u020798319 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c = map(int,input().split())\nif b - 1 >= c:\n print(c+b)\nelif b-1 < c and a+b-1>=c : \n print(b+c)\nelif a+b-1 < c:\n print(b+b+a+1)', 'a,b,c = map(int,input().split())\nif a+b < c:\n print(b+b+a+1)\nelse:\n print(b+c)'] | ['Wrong Answer', 'Accepted'] | ['s658815371', 's909817843'] | [9064.0, 9048.0] | [25.0, 25.0] | [135, 80] |
p03186 | u023229441 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c=map(int,input().split())\nprint(min(a+b+1,c))', 'a,b,c=map(int,input().split())\nif a+b>=c:\n print(b+c)\nelse:\n print(a+b+b+1)\n'] | ['Wrong Answer', 'Accepted'] | ['s285729587', 's081117257'] | [2940.0, 2940.0] | [18.0, 18.0] | [50, 78] |
p03186 | u025329375 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ["a,b,c = input().split(' ')\nif c>a+b:\n return a+b+1+b\nreturn c+b", 'def main():\n a,b,c = input().split(\' \')\n a = int(a)\n b = int(b)\n c = int(c)\n if c>a+b:\n print(a+b+1+b)\n else:\n print(c+b)\n\nif __name__=="__main__":\n main()'] | ['Runtime Error', 'Accepted'] | ['s312492162', 's626094817'] | [2940.0, 2940.0] | [18.0, 18.0] | [64, 168] |
p03186 | u047535298 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['L, N = map(int, input().split())\nX = [0] + [int(input()) for i in range(N)]\nans = 0\nqueue = [(0, 0, X[1], L-X[-1], 1, -1, 0)]\n\nwhile queue:\n q = queue.pop()\n pos, path, l_len, r_len, l, r, cnt = q\n if(l-N-1 == r):\n path += max(l_len, r_len)\n ans = max(ans, path)\n continue\n ... | ['Runtime Error', 'Accepted'] | ['s849324482', 's558653450'] | [3064.0, 2940.0] | [17.0, 17.0] | [535, 61] |
p03186 | u048034149 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c = map(int, input().split())\n\ntakahashi = True\ncount = 0\n\n""" Start eating cookies"""\nwhile a>0 or b>0 or c>0:\n if takahashi:\n if c > 0:\n c -= 1\n takahashi = False\n count += 1\n elif b > 0:\n b -= 1\n takahashi = True\n ... | ['Wrong Answer', 'Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s072782925', 's298892700', 's543061032', 's778548795'] | [3064.0, 3064.0, 2940.0, 2940.0] | [2104.0, 2104.0, 18.0, 18.0] | [578, 853, 108, 109] |
p03186 | u057964173 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['def resolve():\n a,b,c=map(int, input().split())\n cnt=0\n if a+b>=c-1:\n print(b+c)\n else:\n print(a+b+1+)\nresolve()', 'import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n a,b,c=map(int, input().split())\n cnt=0\n if a+b>=c-1:\n print(b+c)\n ... | ['Runtime Error', 'Accepted'] | ['s815203573', 's512085577'] | [2940.0, 2940.0] | [17.0, 17.0] | [138, 200] |
p03186 | u058861899 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c=map(int,input().split())\nanti=a+b\n\nif c+1<= anti:\n print(b+c)\nelse:\n print(anti+1+b)', 'a,b,c=map(int,input().split())\nanti=a+b\n\nif c+1<= anti:\n k= b+c\nelif c+2>=anti:\n k=anti+1+b\n \nprint(k)', 'a,b,c=map(int,input().split())\nanti=a+b\nif c> anti-1:\n print(a+b)\nelse :\n prin... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s264726814', 's278474150', 's324893450', 's456919284', 's660913975', 's870830375', 's895144039', 's749312406'] | [2940.0, 3064.0, 3316.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 19.0, 18.0, 17.0, 17.0, 17.0, 17.0] | [96, 111, 96, 101, 95, 96, 96, 102] |
p03186 | u061984624 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c = map(int, input().split())\nc = max(c, a + b + 1)\nprint(b + c)\n', 'a, b, c = map(int, input().split())\nc = min(c, a + b + 1)\nprint(b + c)\n'] | ['Wrong Answer', 'Accepted'] | ['s406997500', 's323057869'] | [3064.0, 2940.0] | [17.0, 17.0] | [71, 71] |
p03186 | u069602573 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c = map(int, input().split()) \n\nif a + b >= c+1:\n print(b + c)\nelse:\n print(a+b+1+b)\n', 'a, b, c = map(int, input().split()) \n\nif a + b >= c-1:\n print(b + c)\nelse:\n print(a+b+1+b)\n'] | ['Wrong Answer', 'Accepted'] | ['s214653818', 's984352567'] | [2940.0, 2940.0] | [18.0, 18.0] | [118, 118] |
p03186 | u089230684 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a = input("enter : ")\nb = list(a)\nc = [];\nfor i in b:\n if(i != " "):\n c.append(i)\nd = 0;\nif int(c[2])-1>=int(c[0])+int(c[1]):\n d = int(c[0])+int(c[1])+int(c[1])+1\nelse:\n d = int(c[1])+int(c[2])\n\nprint(d)\n \n', 'x=input().split()\na=int(x[0])\nb=int(x[1])\nc=int(x[-1])\nn=0\nif b>=c:\n ... | ['Wrong Answer', 'Accepted'] | ['s678544684', 's802253166'] | [3060.0, 2940.0] | [17.0, 17.0] | [225, 205] |
p03186 | u090994275 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c=map(int,input().split())\nprint(a+min(a+b+1,c))', 'a,b,c=map(int,input().split())\nprint(b+min(a+b+1,c))'] | ['Wrong Answer', 'Accepted'] | ['s211587577', 's097289209'] | [2940.0, 2940.0] | [17.0, 17.0] | [52, 52] |
p03186 | u091051505 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c = map(int, input().split())\n\nif (c+1 > (a+b)):\n ans = a + 2*b + 1\nelse:\n ans = c+b\nprint(ans)', 'a,b,c = map(int, input().split())\n\nif (c > (a+b)):\n ans = a + 2*b + 1\nelse:\n ans = c+b\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s219336592', 's211882689'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 103] |
p03186 | u092926023 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ["input_str = input()\n#input_str = '100 1 8'\n\na, b, c = input_str.split()\na = int(a)\nb = int(b)\nc = int(c)\n\nif a + b >= c:\n print(c * 2 + 1)\nelse:\n print((a + b) * 2 + 1)", "#input_str = input()\ninput_str = '8 8 1'\nA, B, C = input_str.split()\nA = int(A)\nB = int(B)\nC = int(C)\n\nif A + B > C + 1:\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s194773590', 's327877711', 's600081668'] | [3060.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0] | [174, 159, 146] |
p03186 | u095384238 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c = input(int(i) for i in input().split())\nif a + b >= c:\n result = c + b\nelif a + b < c:\n result = a + b + b\nprint(result)', 'a, b, c = input(int(i) for i in input().split())\nif a + b >= c:\n result = c + b\nelif a + b < c:\n result = a + b\nprint(result)', 'a, b, c = (int(i) for i in input().split()... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s107614419', 's825313875', 's619330395'] | [2940.0, 3060.0, 2940.0] | [18.0, 18.0, 17.0] | [131, 127, 124] |
p03186 | u095426154 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c=map(int,input().split())\nif a+b-1>=c:\n print(c+b)\nelse:\n print(2*b+a+1)', 'a,b,c=map(int,input().split())\nif a+b+1>=c:\n print(c+b)\nelse:\n print(2*b+a+1)'] | ['Wrong Answer', 'Accepted'] | ['s605216343', 's816478080'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 83] |
p03186 | u102242691 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['\na,b,c = map(int,input().split())\n\nif a + b >= c:\n print(a + b)\nelse:\n print(a + b + b + 1)\n', '\na,b,c = map(int,input().split())\n\nif a + b >= c:\n print(b+c)\nelse:\n print(b+(a+b+1))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s930700535', 's293966134'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 93] |
p03186 | u102461423 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A,B,C = map(int,input().split())\n\nC = min(C, A+B+1)\nanswer = A+C\nprint(answer)', 'import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nA,B,C = map(int,read().split())\n\nanswer = 0\n# C,B,C,B,...\nx = min(B,C)\nanswer += x + x\nB -= x\nC -= x\ni... | ['Wrong Answer', 'Accepted'] | ['s116849969', 's362424623'] | [2940.0, 3064.0] | [17.0, 17.0] | [78, 309] |
p03186 | u111365959 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c = [int(x) for x in input().split()]\nco = b*2 if c-b>0 else c*2+b-c\nif c<b: print(co)\nc -= b\nco += c if c-a<=0 else a+1\nif c+b==0 or c+a==0: print(co)', 'a,b,c = [int(x) for x in input().split()]\nco = b*2 if c>b else c*2+b-c\nc -= b\nif c>0: co += c if c <=a else a+1\nprint(co)\n'] | ['Wrong Answer', 'Accepted'] | ['s583703069', 's273587746'] | [2940.0, 2940.0] | [17.0, 17.0] | [155, 122] |
p03186 | u111652094 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A,B,C = map(int,input().split())\n\nif A+B>=C:\n print(B+C)\nprint(A+2*B+1)', 'A,B,C = map(int,input().split())\n\nif A+B>=C:\n print(B+C)\nelse:\n print(A+2*B+1)'] | ['Wrong Answer', 'Accepted'] | ['s352281044', 's804125303'] | [2940.0, 2940.0] | [17.0, 17.0] | [74, 84] |
p03186 | u117193815 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a, b, c= map(int, input().split())\nif b<c:\n print((c-(b*2))*2)\nelse:\n print(b+c)', 'a, b, c= map(int, input().split())\nif c-1<=b:\n print(c+b)\nelif a+b<=c-1:\n print(a+b+b+1)\nelif a+b>=c:\n print(b+c)'] | ['Wrong Answer', 'Accepted'] | ['s880725384', 's344002447'] | [2940.0, 2940.0] | [17.0, 17.0] | [86, 122] |
p03186 | u126300147 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ["nums = input().split(' ')\n\nBadCookie = int(nums[0])\nGoodCookie = int(nums[1])\nGoodPoson = int(nums[2])\n\nprint(GoodCookie+(GoodPoson-(GoodCookie+BadCookie)))", 'line = list(input())\nnums = [int(n) for n in line]\nBadCookie = nums[0]\nGoodCookie = nums[1]\nGoodPoson = nums[2]\n\nprint(GoodCookie+(GoodPoson-(Good... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s048561929', 's162919855', 's241627641', 's382321145', 's257520285'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 20.0, 17.0, 17.0] | [156, 165, 215, 226, 298] |
p03186 | u126348486 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A, B, C = map(int, input().split())\n\nif C < A+B:\n print(C+B)\nelse:\n print(A+2*B+1)', 'A, B, C = map(int, input().split())\n\nif C <= A+B:\n print(C+B)\nelse:\n print(A+2*B+1)'] | ['Wrong Answer', 'Accepted'] | ['s679968577', 's098238466'] | [2940.0, 3060.0] | [17.0, 19.0] | [84, 85] |
p03186 | u129836004 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A, B, C = map(int, input().split())\nif C <= B:\n print(B+C)\nelse:\n print((min(A+B, C)+1) + B)', 'A, B, C = map(int, input().split())\nif C <= B:\n print(B+C)\nelif A+B<C:\n print((min(A+B, C)+1) + B)\nelse:\n print(B+C)'] | ['Wrong Answer', 'Accepted'] | ['s924994142', 's413331969'] | [2940.0, 2940.0] | [17.0, 18.0] | [98, 125] |
p03186 | u130900604 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c=map(int,input().split())\n\nif a+b+1=>c:\n ans=b+c\nelse:\n ans=a+b+1+b\n \nprint(ans)', 'a,b,c=map(int,input().split())\n\nif a+b+1>=c:\n ans=b+c\nelse:\n ans=a+b+1+b\n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s093235749', 's576508256'] | [2940.0, 2940.0] | [18.0, 17.0] | [94, 94] |
p03186 | u131406572 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c=map(int,input().split())\nif a+b<=c:\n print(b+a+b+1)\nelse:\n print(b+c)', 'a,b,c=map(int,input().split())\nif a+b<c:\n print(b+a+b)\nelif a+b==c:\n print(b+a+b+1)\nelse:\n print(b+c)', 'a,b,c=map(int,input().split())\nprint(b+min(a+b+1,c))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s005271135', 's079844461', 's352506251'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [81, 110, 53] |
p03186 | u142415823 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A, B, C = map(int, input().split())\n\nif A + B > C:\n print(B + C)\nelse:\n print(2 * B + A + 1)', 'A, B, C = map(int, input().split())\n\nif A + B >= C:\n print(B + C)\nelse:\n print(2 * B + A + 1)'] | ['Wrong Answer', 'Accepted'] | ['s684429538', 's565715357'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 99] |
p03186 | u158034562 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['A,B,C=(int(i) for i in input().split())\ncounter=0\n\n\nif C>=B:\n counter+=B*2\n B=0\n C=C-B\n if C>A:\n counter+=A+1\n else:\n counter+=C\n \nelse:\n counter+=C*2\n C=0\n B-=C\n counter+=B\n \nprint(counter)\n', 'A,B,C=(int(i) for i in input().split())\ncounter=0\n\n\nif C>=B:\n counter+=B*2\n C=... | ['Wrong Answer', 'Accepted'] | ['s385255231', 's500610776'] | [2940.0, 2940.0] | [18.0, 19.0] | [220, 220] |
p03186 | u161201983 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['a,b,c = map(int,input().split())\nif b<c:\n print(c)\nelse:\n print(b)', 'a,b,c = map(int,input().split())\nif a+b <c:\n C = a+b+1+b\n print(C)\nif a+b >=c:\n print(b+c)'] | ['Wrong Answer', 'Accepted'] | ['s029081804', 's261332051'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 99] |
p03186 | u167908302 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['#coding:utf-8\na, b, c = map(int, input().split())\n\n\nif a+b > c:\n print(b+c)\n\nelse:\n print((a+b+1)+b)', '#coding:utf-8\na, b, c = map(int, input().split())\n\n\nif a+b+1 >= c:\n print(b+c)\n\nelse:\n print((a+b+1)+b)'] | ['Wrong Answer', 'Accepted'] | ['s947728011', 's608064854'] | [2940.0, 2940.0] | [17.0, 17.0] | [207, 293] |
p03186 | u173374079 | 2,000 | 1,048,576 | Takahashi has A untasty cookies containing antidotes, B tasty cookies containing antidotes and C tasty cookies containing poison. Eating a cookie containing poison results in a stomachache, and eating a cookie containing poison while having a stomachache results in a death. As he wants to live, he cannot eat one in su... | ['#!/usr/bin/python\n# coding: UTF-8\n\na, b, c = map(int,input().split("/"))\n\nif a * b == 0:\n print(0)\nelif a + b >= c:\n print(b + c)\nelse:\n print(a + b * 2 + 1)', '#!/usr/bin/python\n# coding: UTF-8\n\na, b, c = map(int,input().split())\n\nif a + b >= c:\n print(b + c)\nelse:\n print(a + b * 2 + 1)'] | ['Runtime Error', 'Accepted'] | ['s098491953', 's841444206'] | [3060.0, 2940.0] | [17.0, 17.0] | [160, 129] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.