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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02991 | u021548497 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['import sys\nfrom collections import deque\n\ndef main():\n input = sys.stdin.readline\n n, m = map(int, input().split())\n roads0 = [[] for _ in range(n)]\n roads1 = [[] for _ in range(n)]\n roads2 = [[] for _ in range(n)]\n \n for i in range(m):\n u, v = map(int, input().split())\n roads0[u-1].append(v-... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s223319550', 's365462926', 's834229266'] | [85580.0, 68828.0, 78292.0] | [719.0, 447.0, 650.0] | [1369, 1368, 1355] |
p02991 | u047816928 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['S, T = [int(c)-1 for c in input().split()]\n\nreach = [[-1 for _ in range(N)] for _ in range(3)]\nreach[0][S] = 0\n\nqueue={S}\n\ntime = 1\nfor _ in range(4*N):\n queue_new = set()\n for q in queue:\n for v in path[q]:\n if reach[time%3][v]==-1:\n reach[time%3][v]=time\n ... | ['Runtime Error', 'Accepted'] | ['s015192294', 's947045675'] | [3064.0, 30036.0] | [18.0, 700.0] | [426, 596] |
p02991 | u059210959 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['# encoding:utf-8\nimport copy\nimport random\nimport bisect \nimport fractions \nimport math\nimport sys\nimport numpy as np\nimport queue\n\nmod = 10**9+7\nsys.setrecursionlimit(mod) \n\ndef LI(): return list(map(int, sys.stdin.readline().split()))\nN,M = LI()\n\num = [[] for i in range(M)]\nfor i in range(M):\n ... | ['Runtime Error', 'Accepted'] | ['s511882293', 's625636373'] | [46416.0, 68784.0] | [524.0, 782.0] | [1052, 1065] |
p02991 | u061984624 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['n, m = map(int, input().split())\nuv = [list(map(int, input().split())) for _ im range(m)]\nalist = [[] for _ in range(n)]\nfor u, v in uv:\n alist[u].append(v)\ns, t = map(int, input().split())\n\nalist3 = [set([]) for _ in range(n)]\nfor u, v in uv:\nfor v in range(n):\n for v1 in alist[v]:\n for v2 in... | ['Runtime Error', 'Accepted'] | ['s166743635', 's957156750'] | [2940.0, 79668.0] | [17.0, 1645.0] | [620, 520] |
p02991 | u075595666 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['import heapq\nimport sys\ninput = sys.stdin.readline\nn,m = map(int,input().split())\nINF = 10**18\nedge = [[] for i in range(n)]\nfor i in range(m):\n x,y = map(int,input().split())\n edge[x-1].append(y-1)\n edge[y-1].append(x-1)\ns,t = map(int,input().split())\n\ndef dijkstra_heap(s,g,p):\n d = [[INF] *... | ['Wrong Answer', 'Accepted'] | ['s049356270', 's916762616'] | [46296.0, 41676.0] | [1721.0, 807.0] | [1038, 1016] |
p02991 | u102461423 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['\n\n\nimport sys\nimport numpy as np\nfrom scipy.sparse import *\ninput = sys.stdin.readline\nN,M = map(int,input().split())\nif M == 0:\n print(-1)\n exit()\nUV = np.array([input().split() for _ in range(M)], dtype=np.int32)\nU = UV[:,0] * 3\nV = UV[:,1] * 3\nS,T = map(int,input().split())\n\nrows = np.zeros(3*M, ... | ['Wrong Answer', 'Accepted'] | ['s526726159', 's898175468'] | [51760.0, 64648.0] | [351.0, 475.0] | [711, 702] |
p02991 | u111365362 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\nn,m = map(int,input().split())\nuv = [[] for _ in range(n)]\nfor i in range(m):\n u,v = map(lambda x:int(x)-1,input().split())\n uv[u].append(v)\ns,t = map(lambda x:int(x)-1,input().split())\ntime = 0\nnow = deque([s])\nflag = 0\nwhile time < n:\n time += 1\n tmp = deque([])\n for ... | ['Wrong Answer', 'Accepted'] | ['s336016947', 's714163046'] | [190088.0, 28160.0] | [2115.0, 622.0] | [479, 515] |
p02991 | u130900604 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['# coding: utf-8\n# Your code here!\n\ndef MI():return map(int,input().split())\ndef LI():return list(MI())\n\nfrom collections import deque\nn,m=MI()\nG=[[] for i in range(n)]\n# print(G)\nfor i in range(m):\n u,v=MI()\n G[u-1].append(v-1)\n\n \ns,t=MI()\ns=s-1\nt=t-1\n\n\ndq=deque([])\n\nvisited=[False]*n\n... | ['Wrong Answer', 'Accepted'] | ['s941896596', 's989191603'] | [70772.0, 20328.0] | [2108.0, 283.0] | [1157, 814] |
p02991 | u171366497 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["import sys\ninput=sys.stdin.readline\nn,m=map(int,input().split())\nfrom collections import defaultdict\nbranch=defaultdict(set)\nfor i in range(m):\n u,v=map(int,input().split())\n branch[u-1]|={v-1}\ns,t=map(int,input().split())\ns-=1\nt-=1\ndist=[[float('inf')]*3 for i in range(n)]\ncheck={(s,0)}\ndist[s][0]... | ['Runtime Error', 'Accepted'] | ['s812552358', 's328346458'] | [50696.0, 58268.0] | [336.0, 1706.0] | [587, 589] |
p02991 | u176645218 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["from collections import deque\nimport numpy as np\nN,M = map(int,input().split(' '))\n\n\nGM = np.zeros((N,N)).astype(np.int)\n\nfor j in [0]*M:\n\tu,v = map(int,input().split(' '))\n\tGM[u-1,v-1] = 1\n\t#G[u].append(v)\nS,T = map(int,input().split(' '))\n\nG3M = np.dot(np.dot(GM,GM),GM)\n\n#G3 = {i: np.where(G3M[i-1... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s303864319', 's479360367', 's520938282', 's669018474', 's379714110'] | [794560.0, 796096.0, 794572.0, 794572.0, 81152.0] | [2111.0, 2110.0, 2110.0, 2111.0, 699.0] | [733, 730, 675, 676, 567] |
p02991 | u222207357 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\n\nN,M = map(int,input().split())\n\nconnect = [[] for _ in range(3*N)]\n\nfor _ in range(M):\n u,v = map(int,input().split())\n u -= 1\n v -= 1\n connect[u].append(v+N)\n connect[u+N].append(v+2*N)\n connect[u+2*N].append(v)\n\nS,T = map(int,input().split())\nS -= 1\nT... | ['Wrong Answer', 'Accepted'] | ['s303812762', 's963892232'] | [60236.0, 60208.0] | [657.0, 662.0] | [697, 701] |
p02991 | u256315261 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["def BC132_E():\n n, m = list(map(int, input().split(' ')))\n e = [[] for _ in range(n)]\n for _ in range(m):\n u, v = list(map(int, input().split(' ')))\n e[u - 1].append(v - 1)\n s, t = list(map(int, input().split(' ')))\n s, t = s - 1, t - 1\n stack, visited = [(s, 0)], set()\n wh... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s223861939', 's247380631', 's619025329', 's869182548', 's951361463', 's346455665'] | [122808.0, 694804.0, 24240.0, 47408.0, 24240.0, 38672.0] | [2247.0, 2148.0, 382.0, 2106.0, 361.0, 558.0] | [698, 803, 701, 785, 729, 823] |
p02991 | u265506056 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['print(-1)', 'import collections\nN,M=map(int,input().split())\ntree=[[] for _ in range(N)]\nfor _ in range(M):\n u,v=map(int,input().split())\n tree[u-1].append(v-1)\nS,T=map(int,input().split())\ns=S-1\nt=T-1\nischecked=[[0]*3 for _ in range(N)]\nischecked[s][0]=1\nans=-1\nq=collections.deque()\nq.append([s,0]... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s489375127', 's779349803', 's609639004'] | [2940.0, 28560.0, 28208.0] | [17.0, 378.0, 1180.0] | [9, 511, 475] |
p02991 | u350248178 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["from collections import defaultdict\nfrom heapq import heappop, heappush\n\n\nclass Graph(object):\n \n\n def __init__(self):\n self.graph = defaultdict(list)\n\n def __len__(self):\n return len(self.graph)\n\n def add_edge(self, src, dst, weight=1):\n self.graph[src].append((dst, wei... | ['Wrong Answer', 'Accepted'] | ['s385237542', 's741193876'] | [69252.0, 157160.0] | [825.0, 1641.0] | [2367, 2427] |
p02991 | u407311141 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import*\nn, m, *t = map(int, open("test").read().split()) \n*w, s, t = [a-1for a in t] \ne = [[]for _ in range(n)] \nfor u, v in zip(w[::2], w[1::2]): \n e[u].append(v)\n\nINF = 10**10\nf = [[INF]*3for _ in range(n)] \nf[s][0] = 0 \nq = deque([(s, 0)]) ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s214774610', 's536440290', 's339820325'] | [3444.0, 3316.0, 42820.0] | [25.0, 20.0, 437.0] | [598, 592, 593] |
p02991 | u427344224 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['N, M = map(int, input().split())\nfrom collections import defaultdict\n\ngraph = defaultdict(list)\nfor i in range(M):\n u, v = map(int, input().split())\n u -= 1\n v -= 1\n graph[u].append(v + N)\n graph[u + N].append(v + 2 * N)\n graph[u + 2 * N].append(v)\nS, T = map(int, input().split())\nS -= 1... | ['Time Limit Exceeded', 'Accepted'] | ['s225012509', 's678721435'] | [115740.0, 79644.0] | [2110.0, 858.0] | [707, 604] |
p02991 | u480138356 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['class Node:\n def __init__(self, i):\n self.num = i\n self.ken = set()\n self.kenken = set()\n self.kenkenpa = set()\n\nN, M = map(int, input().split())\nnodes = [Node(i+1) for i in range(N)]\n\nfor i in range(M):\n u, v = map(int, input().split())\n u -= 1\n v -= 1\n nodes[... | ['Runtime Error', 'Accepted'] | ['s612237976', 's781351132'] | [933216.0, 20388.0] | [2263.0, 1175.0] | [1019, 621] |
p02991 | u490642448 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["import sys\nimport os\nf = open('../../input.txt', 'r')\nsys.stdin = f\n\nn, m = map(int, input().split())\nuv = [list(map(int, input().split())) for _ in range(m)]\ns,t = map(int, input().split())\n\nbefore_dict = {}\nafter_dict = {}\nafter_3 = {}\n\nfor i in range(1,n+1):\n before_dict[i] =[]\n after_dict[i] ... | ['Runtime Error', 'Accepted'] | ['s389895030', 's570137542'] | [3064.0, 99320.0] | [18.0, 907.0] | [937, 662] |
p02991 | u497046426 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["from heapq import heappush, heappop\n\nclass Dijkstra:\n def __init__(self, N):\n self.N = N # #vertices\n self.E = [[] for _ in range(N)]\n\n def add_edge(self, init, end, weight, undirected=False):\n self.E[init].append((end, weight))\n if undirected: self.E[end].append((init, weig... | ['Wrong Answer', 'Accepted'] | ['s991222610', 's922655170'] | [87016.0, 96124.0] | [822.0, 842.0] | [1627, 1643] |
p02991 | u539367121 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["from scipy.sparse.csgraph import dijkstra\nfrom scipy.sparse import csr_matrix\n\ndef main():\n\n n,m=map(int,input().split())\n d=[[0 for i in range(n)] for i in range(n)]\n to=[[] for i in range(n)]\n for i in range(m):\n u,v=map(lambda x:int(x)-1,input().split())\n to[u].append(v)\n s,t=map(lambda x:int... | ['Wrong Answer', 'Accepted'] | ['s598205516', 's499734743'] | [585396.0, 42612.0] | [2222.0, 413.0] | [734, 623] |
p02991 | u545368057 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\n\nN,M = map(int, input().split())\n\nG = [[] for i in range(3*N)]\nfor i in range(M):\n \n u,v = map(int,input().split())\n G[3*(u-1)].append((3*(v-1)+1))\n G[3*(u-1)+1].append((3*(v-1)+2))\n G[3*(u-1)+2].append((3*(v-1)))\n\nS,T = map(int, input().split())\n\n\nused = [-... | ['Wrong Answer', 'Accepted'] | ['s133788215', 's574110087'] | [60164.0, 61372.0] | [730.0, 523.0] | [743, 588] |
p02991 | u549039890 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN, M, *UV, S, T = map(int, read().split())\n\nit = iter(UV)\nG = [[] for _ in range(1+N+N+N)]\nfor x, y = in zip(it, it):\n x1 = x + N; x2 = x1 + N;\n y1 = y + N; y2 = y1 + N;\n G[x].appe... | ['Runtime Error', 'Accepted'] | ['s072900265', 's754408095'] | [2940.0, 64648.0] | [17.0, 500.0] | [715, 686] |
p02991 | u550061714 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['import sys\nimport numpy as np\nfrom scipy.sparse.csgraph import dijkstra\nfrom scipy.sparse import csr_matrix\n\ninput = sys.stdin.readline\n\nint1 = lambda x: int(x) - 1\nN, M = map(int, input().split())\n\nif M == 0:\n print(-1)\n exit()\n\nUV = np.array([tuple(map(int1, input().split())) for _ in range(M)])... | ['Wrong Answer', 'Accepted'] | ['s652115735', 's192138577'] | [74076.0, 61472.0] | [2207.0, 380.0] | [623, 648] |
p02991 | u588341295 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["# -*- coding: utf-8 -*-\n\nimport sys\nfrom heapq import heappop, heappush\nfrom copy import deepcopy\n\ndef input(): return sys.stdin.readline().strip()\ndef list2d(a, b, c): return [[c] * b for i in range(a)]\ndef list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]\ndef ceil(x, y=1): return i... | ['Wrong Answer', 'Accepted'] | ['s992613974', 's021075271'] | [84928.0, 84696.0] | [969.0, 750.0] | [2015, 1962] |
p02991 | u595289165 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\nn, m = map(int, input().split())\n\ngraph = [[] for _ in range(n+1)]\nfor _ in range(m):\n u, v = map(int, input().split())\n graph[u].append(v)\n\ns, t = map(int, input().split())\n\ninf = 10**10\ndist = [[-3] * 3 for _ in range(n+1)]\ndist[s][0] = 0\n\nq = deque([(s, 0)])\n\nwhi... | ['Wrong Answer', 'Accepted'] | ['s761679913', 's573469306'] | [33196.0, 42656.0] | [256.0, 457.0] | [525, 516] |
p02991 | u612975321 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\nimport numpy as np\nfrom scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson\nfrom scipy.sparse import csr_matrix\n\n\ndef bfs(cnt, p, cn, row, col, data):\n cnt += 1\n if cnt < 3:\n for cg in graph[p]:\n d.appendleft([cnt, ... | ['Wrong Answer', 'Accepted'] | ['s436257591', 's425151499'] | [75720.0, 42408.0] | [2208.0, 328.0] | [1127, 559] |
p02991 | u619458041 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["import sys\nfrom collection import deque\n\ndef main():\n input = sys.stdin.readline\n N, M = map(int, input().split())\n G = [[] for _ in range(3*N)]\n for _ in range(M):\n u, v = map(int, input().split())\n u, v = u-1, v-1\n\n G[3*u].append(3*v+1)\n G[3*u+1].append(3*v+2)\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s092171428', 's479293057', 's149862990'] | [3064.0, 19032.0, 50628.0] | [18.0, 161.0, 461.0] | [893, 978, 899] |
p02991 | u626881915 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['def dfs():\n while len(q) > 0:\n \tp = q.pop()\n \tfor e in g[p]:\n if d[e] < 0 or d[e] > d[p] + 1:\n d[e] = d[p] + 1\n q.append(e)\n \n \nn, m = map(int, input().split())\ng = [[] for i in range(3 * (n+1))]\nfor i in range(m):\n u, v = map(int, input().split())\n g[3*u].append(3*v+1)\n g[3... | ['Runtime Error', 'Accepted'] | ['s343536635', 's187416883'] | [2940.0, 62524.0] | [17.0, 716.0] | [446, 691] |
p02991 | u670180528 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\nN,M,*L,S,T = map(int,open(0).read().split())\nG = [[] for _ in range(N)]\nINF = float("inf")\nstep = [[INF]*3 for _ in range(N)]\nstep[S-1][0] = 0\nfor u,v in zip(*[iter(L)]*2):\n\tG[u-1].append(v-1)\nq = deque([(S-1,0)])\nwhile q:\n\tcur,d = q.popleft()\n\tfor nxt in G[cur]:\n\t\tif nx... | ['Wrong Answer', 'Accepted'] | ['s972265086', 's451765411'] | [36420.0, 28484.0] | [163.0, 293.0] | [442, 479] |
p02991 | u686230543 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from collections import deque\n\nn, m = map(int, input().split())\nadj_list = [[] for _ in range(3 * n)]\nfor _ in range(m):\n u, v = map(int, input().split())\n adj_list[3 * u - 3].append(3 * v - 2)\n adj_list[3 * u - 2].append(3 * v - 1)\n adj_list[3 * u - 1].append(3 * v - 3)\n\ns, t = map(int, input().split()... | ['Runtime Error', 'Accepted'] | ['s512067716', 's406237271'] | [50620.0, 60164.0] | [504.0, 678.0] | [668, 668] |
p02991 | u708255304 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['from heapq import heappush, heappop\nN, M = map(int, input().split()) \ngraph = [[] for _ in range(N)]\n\nfor _ in range(M):\n u, v = map(lambda x: int(x)-1, input().split())\n graph[u].append(v)\n\nS, T = map(lambda x: int(x)-1, input().split())\n\ndist = [[-1]*3 for _ in range(N)]\ndist[S][0] = 0\nq = []\nhe... | ['Runtime Error', 'Accepted'] | ['s488737886', 's292621015'] | [28252.0, 45384.0] | [453.0, 818.0] | [688, 909] |
p02991 | u792670114 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['N, M = map(int, input().split())\na = [[] for i in range(N+1)]\nfor i in range(M):\n u, v = map(int, input().split())\n a[u].append(v)\n\nS, T = map(int, input().split())\ndef main():\n c = [S]\n m = [[False, False, False] for i in range(N+1)]\n for count in range(1, N+1):\n vs = []\n for u in c:\n m[... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s084490120', 's998435617', 's591967848'] | [1139960.0, 1214100.0, 28212.0] | [2216.0, 2228.0, 517.0] | [510, 519, 517] |
p02991 | u884692162 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ["#!/usr/bin/env python3\nimport sys\nimport numpy as np\n\ndef solve(N: int, M: int, edges, S: int, T: int):\n S -= 1\n T -= 1\n now = np.zeros(10**5)\n now[S] = 1\n seen = now > 0\n c = 0\n s = 0\n while s < np.count_nonzero(seen):\n c += 1\n s = np.count_nonzero(seen)\n n... | ['Runtime Error', 'Accepted'] | ['s088157996', 's526555031'] | [12440.0, 93816.0] | [154.0, 602.0] | [1256, 1237] |
p02991 | u921009792 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['N,M = map(int, input().split())\n\ng = {}\nsteps = 3\nfor v in range(1,N*steps+1):\n g[v] = []\n\nfor _ in range(M):\n u,v = map(int, input().split())\n\tg[u + N*0].append(v + N*1)\n g[u + N*1].append(v + N*2)\n g[u + N*2].append(v + N*0)\n\nS,T = map(int, input().split())\n\nvisiting = [(S,0)]\nvisited =... | ['Runtime Error', 'Accepted'] | ['s466640429', 's952051923'] | [2940.0, 97596.0] | [17.0, 1262.0] | [628, 548] |
p02991 | u936985471 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['N,M=map(int,input().split())\nE=[[] for i in range(N)]\nfor i in range(M):\n u,v=map(int,input().split())\n u,v=u-1,v-1\n E[u].append(v)\nS,T=map(int,input().split())\nS,T=S-1,T-1\n\nstack=[]\nseen=[[False for i in range(3)] for j in range(N)]\nstack.append([S,0,1])\nwhile stack:\n node=stack.pop()\n v=node[0]\n... | ['Wrong Answer', 'Accepted'] | ['s710383460', 's707762579'] | [34328.0, 30096.0] | [1199.0, 695.0] | [584, 583] |
p02991 | u945181840 | 2,000 | 1,048,576 | Ken loves _ken-ken-pa_ (Japanese version of hopscotch). Today, he will play it on a directed graph G. G consists of N vertices numbered 1 to N, and M edges. The i-th edge points from Vertex u_i to Vertex v_i. First, Ken stands on Vertex S. He wants to reach Vertex T by repeating ken- ken-pa. In one ken-ken-pa, he does... | ['print(-1)', 'import sys\nfrom collections import deque\n\n\n\nread = sys.stdin.read\nN, M, *uv, S, T = map(int, read().split())\n\ngraph = [[] for _ in range(N + 1)]\nfor u, v in zip(*[iter(uv)] * 2):\n graph[u].append(v)\n\nINF = 10 ** 15\n\ndist = [[INF] * (N + 1) for _ in range(3)]\nstack = deque([(0, S)])\n\nw... | ['Wrong Answer', 'Accepted'] | ['s579422670', 's651663176'] | [2940.0, 34912.0] | [17.0, 355.0] | [9, 687] |
p02992 | u532966492 | 2,000 | 1,048,576 | Find the number of sequences of length K consisting of positive integers such that the product of any two adjacent elements is at most N, modulo 10^9+7. | ['from itertools import accumulate as ac\nN,K=map(int,input().split())\nn=int(N**0.5)\nmod=10**9+7\nlist_a=[1]*n\nlist_b=[N//j-N//(j+1) for j in range(1,N_s)]+[(N//n-n)]\nlist_p=[p for p in list_b]\nlist_aa=list(ac(list_a))\nlist_bb=list(reversed(list(ac(reversed(list_b)))))\n\nfor i in range(K-1):\n temp=sum(list_a... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s256267011', 's930405896', 's897813005'] | [3316.0, 3064.0, 11600.0] | [18.0, 18.0, 1492.0] | [540, 542, 538] |
p02993 | u000085263 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['def split(word): \n return [char for char in word] \ninp=input()\nlist=split(inp)\ncount=0\nx=1\nstr="Good"\nfor i in range(len(3):\n if list[count]==list[count+1]:\n str="Bad"\n count=count+1\nprint(str)', 'def split(word): \n return [char for char in word] \ninp=input()\nlist=split(inp)\ncount=... | ['Runtime Error', 'Accepted'] | ['s569913254', 's068548611'] | [8908.0, 9116.0] | [26.0, 28.0] | [210, 206] |
p02993 | u000212387 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S=int(input())\nif S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:\n print('Bad')\nelse:\n print('Good')", "S=input()\nfor i in range(3):\n if S[i]==S[i+1]:\n print('Bad')\n exit()\nprint('Good')\n \n"] | ['Runtime Error', 'Accepted'] | ['s418717425', 's697840406'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 93] |
p02993 | u003501233 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['a,b,c,d=map(int,input().split())\nif a==b or b==c or c==d:\n print("Bad")\nelse:\n print("Yes")\n', 'a,b,c,d=map(int,input().split())\nif a==b or b==c or c==d:\n print("Bad")\nelse:\n print("Yes")\n', 'a,b,c,d=int(input().split())\nif a==b or b==c or c==d:\n print("Bad")\nelse:\n print("Yes")\n', 's=list(map(in... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s151946513', 's284436174', 's306321390', 's551465491', 's595966874'] | [2940.0, 2940.0, 2940.0, 3064.0, 2940.0] | [17.0, 18.0, 17.0, 18.0, 17.0] | [94, 94, 90, 112, 95] |
p02993 | u006251926 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S = input()\nbad = 0\nfor num in range(2):\n if int(S[num]) == int(S[num + 1]):\n print("Bad")\n break\n bad = 1\nif bad == 0:\n print("Good")', 'S = input()\nbad = 0\nfor num in range(2):\n if S[num] == S[num + 1]:\n print("Bad")\n break\n bad = 1\nif bad == 0:\n print("Good")', 'N = int(input(... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s031202513', 's378766832', 's405636233', 's776654779', 's939751856', 's289651681'] | [3060.0, 2940.0, 3064.0, 3064.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 19.0, 18.0] | [145, 135, 235, 238, 154, 125] |
p02993 | u015187377 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S=int(input())\nif S<100:\n print('Bad')\nelif ((S-(S%100))%1100!=0 or (S-(S-(S%1000))-(S%10))%110!=0 or (S%100)%1100!=0):\n print('Good')\nelse:\n print('Bad')\n\n", "S=int(input())\nif S<100:\n print('Bad')\nelif ((S-(S%100))%1100!=0 and (S-(S-(S%1000))-(S%10))%110!=0 and (S%100)%1100!=0):\n print('G... | ['Wrong Answer', 'Accepted'] | ['s733161758', 's616625525'] | [2940.0, 2940.0] | [20.0, 18.0] | [165, 167] |
p02993 | u016622494 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['A , B , C , D = map(int,input().split())\nlst = []\nlist= [i for i in range(A,B) i % C != 0]\nfor i in list:\n if i % D != 0:\n lst.append(i)\nprint(len(lst))\n', 'N = list(map(int,input()))\nfor i in len(N - 1):\n if N[i] == N[i+1]:\n print("Good")\n else :\n print("Bad")\n', 'N = list... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s057371214', 's154042799', 's642625884', 's685677974', 's699648080', 's788076444'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 19.0] | [164, 125, 132, 158, 159, 182] |
p02993 | u018679195 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = input()\nif s[1] == s[0] or s[2] == s[1] or s[3] == s[2]:\n print("Good")\nelse:\n print("Bad")\n', 's = input()\n\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:\n print("Bad")\nelse:\n print("Good")'] | ['Wrong Answer', 'Accepted'] | ['s598607851', 's912990511'] | [2940.0, 2940.0] | [17.0, 17.0] | [102, 102] |
p02993 | u020959776 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['import io\nimport sys\n\n\ndef IN_S():\n return input()\n\n\ndef IN_I():\n return int(input())\n\n\ndef IN_L_I():\n return list(map(int, input().split()))\n\n\ndef IN_L_S():\n return list(map(str, input().split()))\n\n\ndef STR_SPLIT(s, n):\n for l in range(0, len(s), n):\n yield s[0 + l:n + l]\n\n\ndef T_IN(... | ['Wrong Answer', 'Accepted'] | ['s015931661', 's673862141'] | [3064.0, 3064.0] | [18.0, 18.0] | [635, 637] |
p02993 | u027675217 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = int(input())\ns_list = list(s)\nans="Good"\nfor i in range(len(s))\n\tif s_list[i]==s_list[i+1]:\n\t\tans="Bad"\nprint(ans)', 's = input()\nans="Good"\nfor i in range(len(s)):\n\tif s[i]==s[i+1]:\n\t\tans="Bad"\nprint(ans)', 's = input()\nans="Good"\nfor i in range(len(s))\n\tif s[i]==s[i+1]:\n\t\tans="Bad"\nprin... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s025434986', 's054982855', 's139847686', 's501176180', 's729424390'] | [2940.0, 3064.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [118, 87, 86, 82, 84] |
p02993 | u029000441 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['import sys\ninput = sys.stdin.readline\n\ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\n\ns=input()\ncount=0\nfor i in range(3):\n #print(s[i:i+1])\n if s[i:i+1]==s[i+1:i+2]:\n count+=1\nif count>0:\n print("bad")\nelse:\n ... | ['Wrong Answer', 'Accepted'] | ['s724783499', 's943615622'] | [3060.0, 3060.0] | [17.0, 17.0] | [318, 318] |
p02993 | u032876822 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['import sys\nS = int(input())\n\nfor i in range(3):\n if S[i] == S[i+1]:\n print("Bad")\n sys.exit()\nprint("Good")', 'import sys\nS = input()\n\nfor i in range(3):\n if S[i] == S[i+1]:\n print("Bad")\n sys.exit()\nprint("Good")'] | ['Runtime Error', 'Accepted'] | ['s696902635', 's658731611'] | [2940.0, 2940.0] | [17.0, 17.0] | [114, 109] |
p02993 | u032955959 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s=int(input())\n\nif s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:\n print('Bad')\nelse:\n print('Good')", "s=input()\n\nif s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:\n print('Bad')\nelse:\n print('Good')"] | ['Runtime Error', 'Accepted'] | ['s938908731', 's962056958'] | [2940.0, 2940.0] | [18.0, 17.0] | [95, 90] |
p02993 | u033524082 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s=input()\nfor i in range(3):\n if s[i]==s[i+1]:\n ans=1\n else:\n ans=0\nprint("Bad" if ans==1 else "Good")\n', 's=input()\nfor i in range(3):\n if s[i]==s[i+1]:\n ans=1\n break\n else:\n ans=0\nprint("Bad" if ans==1 else "Good")\n'] | ['Wrong Answer', 'Accepted'] | ['s770765186', 's053458577'] | [2940.0, 2940.0] | [17.0, 17.0] | [123, 137] |
p02993 | u033719192 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["import sys\nN = int(input())\n\nif len(N) <= 1:\n print('Good')\n sys.exit()\n\nfor i in range(1, len(N)):\n if N[i] == N[i-1]:\n print('Bad')\n sys.exit()\n\nprint('Good')", "import sys\nN = input()\n\nif len(N) <= 1:\n print('Good')\n sys.exit()\n\nfor i in range(1, len(N)):\n if N[i... | ['Runtime Error', 'Accepted'] | ['s998755466', 's188028263'] | [2940.0, 2940.0] | [17.0, 18.0] | [183, 178] |
p02993 | u034243122 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S=input()\nfor i in range(len(S)):\n if S[i]==S[i+1]:\n print('Bad')\n else:\n print('Good')", "S=input()\nif S[0]!=S[1] and S[1]!=S[2] and S[2]!=S[3]:\n print('Good')\nelse:\n print('Bad')"] | ['Runtime Error', 'Accepted'] | ['s101406903', 's757622550'] | [2940.0, 2940.0] | [20.0, 17.0] | [107, 95] |
p02993 | u038107109 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S = input()\n\nanswer = "Good"\nprev_s = s[0]\nfor s in S[1:]:\n if prev_s == s:\n answer = "Bad"\n break\n prev_s = s\n\nprint(answer)', 'import math\n\nA, B, C, D = map(int, input().split())\nCD = int(C * D // math.gcd(C, D))\n\nB_in_C = int(B/C)\nB_in_D = int(B/D)\nB_in_CD = int(B/(CD))\nB_con = B - (B_in_... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s816672870', 's857101062', 's968381871'] | [8984.0, 9124.0, 9096.0] | [26.0, 28.0, 28.0] | [133, 329, 135] |
p02993 | u040141413 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['n=int(input())\na=int(n/1000)\nan=n-a*1000\nb=int(an/100)\nbn=an-b*100\nc=int(bn/10)\nd=bn-c*10\n\nif(a==b or b==c or c==d):\n print("bad")\nelse:\n print("good")', 'n=int(input())\na=int(n/1000)\nan=n-a*1000\nb=int(an/100)\nbn=an-b*100\nc=int(bn/10)\nd=bn-c*10\n\nif(a==b or b==c or c==d):\n print("Bad")\nel... | ['Wrong Answer', 'Accepted'] | ['s445270648', 's422511442'] | [3064.0, 3060.0] | [17.0, 18.0] | [157, 157] |
p02993 | u044635590 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = list(input())\n\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:\n print("bad")\nelse:\n print("Good")', 's = list(input())\n\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:\n print("Bad")\nelse:\n print("Good")'] | ['Wrong Answer', 'Accepted'] | ['s545713485', 's587195707'] | [2940.0, 3064.0] | [17.0, 17.0] | [108, 108] |
p02993 | u045707160 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['n, l = map(int, input().split())\n\napples = [l+i for i in range(n)] \nans = sum(apples) - apples[apples.index(min(apples, key=abs))] の合計ーりんごの味の絶対値の最小\nprint(ans)\n', "s = input()\nans = 0\nfor i in range(3):\n if s[i] == s[i + 1]:\n ans = 1\n break\n\nprint('Good' if ans == 0 else 'Bad')\n"] | ['Runtime Error', 'Accepted'] | ['s988689551', 's376238078'] | [2940.0, 2940.0] | [18.0, 17.0] | [223, 132] |
p02993 | u050914494 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['def check_key(S, key_length):\n for i,k in enumerate(S):\n if k == S[i+1]:\n return \'bad\'\n if i == key_length - 1:\n return \'Good\'\n else:\n continue\nS = "3776"\nkey_length = len(S)\nprint(check_key(S, key_length))\n', "a,b,c,d = input()\nif a == b:\n ... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s378715075', 's654129656', 's810519295', 's998042234'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0, 17.0] | [264, 125, 265, 97] |
p02993 | u054471580 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['i = input()\n\nfor j in range(i-1):\n if(j==j+1):\n print("Bad")\n break\n else(j==(len(i)-2)):\n print("Good")', 'i = input()\nk=1\nfor j in range(len(i)-1):\n if(i[j]==i[j+1]):\n print("Bad")\n k=0\n break\n \nif(k==1):\n print("Good")'] | ['Runtime Error', 'Accepted'] | ['s426912862', 's310442418'] | [2940.0, 2940.0] | [17.0, 17.0] | [115, 127] |
p02993 | u054825571 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S=input()\np = a\nfor s in S:\n if p == s:\n p = a\n break\n else:\n p = s\nprint("Bad" if p == a else "Good")', 'S=input()\np = \'a\'\nfor s in S:\n if p == s:\n p = \'a\'\n break\n else:\n p = s\nprint("Bad" if p == \'a\' else "Good")'] | ['Runtime Error', 'Accepted'] | ['s714928287', 's866670369'] | [9032.0, 8900.0] | [19.0, 28.0] | [113, 119] |
p02993 | u058640635 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S=input()\nfor i in range(2):\n if a[i]==a[i+1]:\n print("Bad")\n return\nprint("Good")', 'import math\ndef lcm(x,y):\n return x*y/math.gcd(x,y)\ndef numantidiv(a,b,c):\n r=a-math.floor(a/b)-math.floor(a/c)+math.floor(a/lcm(b,c))\n return r\n\na,b,c,d=(int(x) for x in input().split())\nans=numantidiv(b,... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s068701731', 's215127269', 's700702876', 's292475093'] | [2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [89, 247, 246, 89] |
p02993 | u060569392 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S1,S2,S3,S4=list(map(int,input().split()))\n\nif S1 == S2 or S2 == S3 or S3 == S4:\n print('Bad')\nelse:\n print('Good')", "S = input()\n\nif S[0] == S[1] or S[1] == S[2] or S[2] ==S[3]:\n print('Bad')\nelse:\n print('Good')"] | ['Runtime Error', 'Accepted'] | ['s694447563', 's725583182'] | [2940.0, 2940.0] | [17.0, 19.0] | [121, 101] |
p02993 | u064563749 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S=str(input())\nif S[0]==S[1] or S[1]=S[2] or S[2]=S[3]:\n print('Bad')\nelse:\n print('Good')", "S=str(input())\nif S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:\n print('Bad')\nelse:\n print('Good')"] | ['Runtime Error', 'Accepted'] | ['s772412108', 's948547027'] | [2940.0, 2940.0] | [18.0, 17.0] | [96, 98] |
p02993 | u065079240 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['N = int(input())\nif (N % 100) % 11 == 0:\n print("Bad")\nelif (N - (N % 10)) / 10 % 11 == 0:\n print("Bad")\nelif (N - (N % 100)) / 100 % 11 == 0:\n print("Bad")\nelse:\n print("Good")\n', 'N = int(input())\nN += 10000\nif (N % 100) % 11 == 0:\n print("Bad")\nelif (N - (N % 10)) / 10 % 11 == 0:\n p... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s234625882', 's256981120', 's199342523'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0] | [190, 201, 102] |
p02993 | u066352867 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["#!/usr/bin/env python3\n#import math\nimport fractions\n\ndef lcm(x, y):\n #return (x * y) // math.gcd(x, y)\n return (x * y) // fractions.gcd(x, y)\n\nif __name__ == '__main__':\n a, b, c, d = list(map(int, input().split()))\n bc = b // c\n bd = b // d\n ac = (a - 1) // c\n ad = (a - 1) // d\n ... | ['Runtime Error', 'Accepted'] | ['s721409154', 's066143400'] | [5048.0, 2940.0] | [35.0, 17.0] | [399, 223] |
p02993 | u068142202 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["# _*_ coding: utf-8 _*_ \nS = input()\nif S[0] == S[1] or S[1] == S[2] or S[2] == S[3] :\n print('Bat')\n\nelse:\n print('Good')", "S = input()\nout = 'Good'\nfor i in range(3):\n if S[i] == S[i+1]:\n out = 'Bad'\n\nprint(out)"] | ['Wrong Answer', 'Accepted'] | ['s909961973', 's177209215'] | [2940.0, 2940.0] | [17.0, 17.0] | [128, 98] |
p02993 | u069868839 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s=[int(i) for i in input().split()]\nif s[1]==s[2] or s[2]==s[3] or s[3]==s[4]:\n print("Bad")\nelse:\n print("Good")', 's=input()\nif int(s[0])==int(s[1]) or int(s[1])==int(s[2]) or int(s[2])==int(s[3]):\n print("Bad")\nelse:\n print("Good")'] | ['Runtime Error', 'Accepted'] | ['s373464541', 's120425394'] | [2940.0, 2940.0] | [17.0, 17.0] | [119, 123] |
p02993 | u070246438 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S=int(input())\nn=1\nwhile n>0.01:\n if int(S/1000*n)==int(S/100*n)-10*int(S/1000*n):\n print("Bad")\n break\n else:\n n=n/10\nelse:\n print("Good")', 'S=int(input())\nn=1\nwhile n>0.001:\n if int(S/1000*n)==int(S-1000*n)/(100*n):\n print("Bad")\n break\n else:\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s014942561', 's430487652', 's757543646', 's646711635'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [169, 162, 162, 209] |
p02993 | u073139376 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["def hasSequenceElement(password):\n password = str(password)\n length = len(password)\n for i in range(length - 1):\n if password[i] == password[i + 1]:\n return True\n return False\n \npassword = 5456\n\nif hasSequenceElement(password):\n print('Bad')\nelse:\n print('Good')", 'S = input()\n\nfor i i... | ['Wrong Answer', 'Accepted'] | ['s384612018', 's287263604'] | [2940.0, 2940.0] | [17.0, 17.0] | [279, 107] |
p02993 | u073852194 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['def gcd(x,y):\n if y == 0:\n return x\n else:\n return gcd(y,x%y)\na,b,c,d = map(int, input().split())\np = b//c + (-a//c) +1\nq = b//d + (-a//d) +1\nr = b*gcd(c,d)//(c*d) + (-a*gcd(c,d)//(c*d)) +1\nprint(b-a+1-p-q+r)', "s = input()\nfor i in range(0,3):\n if s[i] == s[i+1]:\n print('Bad')\n exit()\npr... | ['Runtime Error', 'Accepted'] | ['s480571098', 's693940336'] | [3064.0, 2940.0] | [17.0, 17.0] | [216, 99] |
p02993 | u075155299 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s=input()\n\nfor i in range(3):\n if s[i]==s[i+1]:\n print("Bad")\n else:\n print("good")', 's=input()\nn="Good"\nfor i in range(3):\n if s[i]==s[i+1]:\n n="Bad"\n \nprint(n)'] | ['Wrong Answer', 'Accepted'] | ['s335842125', 's417572107'] | [2940.0, 2940.0] | [18.0, 17.0] | [91, 80] |
p02993 | u075303794 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s = [x for x in input()]\nans = 'Good'\nfor i in range(3):\n if s[i] == s[i+1]:\n ans = 'Bat'\n break\nprint(ans)\n\n", "s = [x for x in input()]\nfor _ in range(3):\n if s[i] == s[i+1]:\n print('Bat')\n break\n else:\n print('Good')\n\n", "s = [x for x in input()]\nfor i in range(3):\n if s[i] == ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s529367950', 's613272873', 's656489726', 's523744101'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 18.0, 17.0] | [116, 119, 119, 116] |
p02993 | u075532540 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s=input()\nf=-1\nprint(s)\nb=' '\nl=len(s)\nif l==4:\n\tf=0\n\tfor i in range(l):\n\t\tif(s[i]<'0' or s[i]>'9'):\n\t\t\tf=-1\n\t\t\tbreak;\n\t\telif(s[i]==b):\n\t\t\tf=1\n\t\t\tbreak;\n\t\telse:\n\t\t\tb=s[i]\nif(f==-1):\n\tprint('Illegal')\nelif(f==1):\n\tprint('Bad')\nelse:\n\tprint('Good')", "s=input()\nf=-1\nb=' ... | ['Wrong Answer', 'Accepted'] | ['s707651586', 's070879553'] | [3064.0, 3060.0] | [17.0, 17.0] | [246, 238] |
p02993 | u075641289 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S=input()\na = [int(c) for c in s]\n\nif (a[0]-a[1]) * (a[1]-a[2]) * (a[2] - a[3]) ==0:\n print('Bad')\nelse:\n print('Good')", "S=input()\na = [int(c) for c in S]\n\nif (a[0]-a[1]) * (a[1]-a[2]) * (a[2] - a[3]) ==0:\n print('Bad')\nelse:\n print('Good')"] | ['Runtime Error', 'Accepted'] | ['s149631690', 's305244139'] | [2940.0, 2940.0] | [17.0, 17.0] | [125, 125] |
p02993 | u076306174 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['N,L=map(int, input().split()) \n\naji=0\neat=99999\n\nfor i in range(1,N+1):\n aji=aji+i+L-1\n if abs(aji) < abs(eat):\n eat = aji\n \nprint(aji)', 'S=input()\n\nhantei="Good"\n\nfor i in range(3):\n if S[i] == S[i+1]:\n hantei="Bad"\n \nprint(hantei)'] | ['Runtime Error', 'Accepted'] | ['s771776200', 's599446622'] | [3060.0, 2940.0] | [17.0, 18.0] | [235, 111] |
p02993 | u078349616 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S = int(input())\nfor i in range(1, 4):\n if A[i] == A[i-1]:\n print("Bad")\n exit()\nprint("Good")', 'S = input()\nfor i in range(1, 4):\n if S[i] == S[i-1]:\n print("Bad")\n exit()\nprint("Good")'] | ['Runtime Error', 'Accepted'] | ['s527719302', 's533143659'] | [2940.0, 2940.0] | [18.0, 18.0] | [101, 96] |
p02993 | u082861480 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["import sys\ns = input()\npre = ''\nfor i in s:\n if pre == i:\n print('Bad')\n sys.exit()\nprint('Good')", "import sys\ns = input()\npre = ''\nfor i in s:\n if pre == i:\n print('Bad')\n sys.exit()\n pre = i\nprint('Good')"] | ['Wrong Answer', 'Accepted'] | ['s085186997', 's589412603'] | [2940.0, 2940.0] | [17.0, 17.0] | [104, 114] |
p02993 | u084320347 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S = input()\nif S[0]==S[1]||S[1]==S[2]||S[2]==S[3]||S[3]==S[4]:\n print("bad")\nelse:\n print("good")', 'S = input()\nif S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:\n print("bad")\nelse:\n print("good")\n', 'S = input()\nif S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:\n print("Bad")\nelse:\n print("Good")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s394764856', 's856962002', 's904461238'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [99, 92, 91] |
p02993 | u084498522 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['N,L=map(int, input().split())\n \nsum = 0\nlower = 100\nfor i in range(1, N+1):\n sum = sum + L + i -1\nfor i in range(1, N+1):\n s = abs(L + i -1)\n if s < lower:\n lower = s\n ij = i\n \nprint(sum - (L + ij -1))', 'S = list(input())\nS.append("%")\na=0\nfor i in range(4):\n if ( S[i] == S[... | ['Runtime Error', 'Accepted'] | ['s366312115', 's141669881'] | [3060.0, 3060.0] | [17.0, 17.0] | [224, 146] |
p02993 | u085474925 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S=input()\nf=False\nfor i in range(len(S)-1):\n if S[i]==S[i+1]:\n f=True\n break\nif f:\n print("Good")\nelse:\n print("Bad")', 'S=input()\n\nf=False\nfor i in range(len(S)-1):\n if S[i]==S[i+1]:\n f=True\n break\nif f:\n print("Bad")\nelse:\n print("Good")'] | ['Wrong Answer', 'Accepted'] | ['s660205974', 's118178756'] | [2940.0, 2940.0] | [18.0, 17.0] | [140, 141] |
p02993 | u092278825 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['import math\na,b,c,d = map(int, input().split())\n\n\nfirst = [c,d%c]\nfirst.sort()\nif d%c==0:\n cd = c\nelif first[0]==1:\n cd = 1\nelse:\n while first[0]>=2:\n first[1] = first[1]%first[0]\n first.sort()\n if first[0]==0:\n cd = first[1]\n elif first[0]==1:\n cd = 1\nlcm = c*d/cd\n \n... | ['Runtime Error', 'Accepted'] | ['s834478532', 's510530079'] | [3064.0, 2940.0] | [17.0, 17.0] | [498, 172] |
p02993 | u092650292 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = input()\nprint("Good")', "s = input()\nflag = True\nfor i in range(3):\n if s[i] == s[i + 1]:\n flag = False\n\nif flag:\n print('Good')\nelse:\n print('Bad')\n"] | ['Wrong Answer', 'Accepted'] | ['s792548114', 's912975879'] | [2940.0, 2940.0] | [17.0, 17.0] | [25, 140] |
p02993 | u093033848 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = input()\n\nif s[0] == s[1] or s[1] == s[2] or s[2] = s[3] :\n print("Bad")\nelse:\n print("Good")', 's = input()\n\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3] :\n print("Bad")\nelse:\n print("Good")'] | ['Runtime Error', 'Accepted'] | ['s411204729', 's202656565'] | [2940.0, 2940.0] | [17.0, 18.0] | [98, 99] |
p02993 | u098065136 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s=list(input())\n\nans = 'Good'\n\nwhile i-1 < range(s):\n if s[i] == s[i+1]:\n ans = 'Bad'\n print(ans)\n break\n elif :\n i += 1\n \nprint(ans)\n \t", "s=list(input())\n\nans = 'Good'\ni = 0\n\nwhile i+1 < len(s):\n if s[i] == s[i+1]:\n ans = 'Bad'\n break\n else:\n i += 1\n\nprint(ans)... | ['Runtime Error', 'Accepted'] | ['s349274948', 's047728762'] | [2940.0, 2940.0] | [17.0, 18.0] | [154, 134] |
p02993 | u098588273 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s=input()\nans=0\nif t[0]==t[1] or t[1]==t[2] or t[2]==t[3]:\n ans='Bad'\nelse:\n ans='Good'\nprint(ans)", "t=input()\nans=0\nif t[0]==t[1] or t[1]==t[2] or t[2]==t[3]:\n ans='Bad'\nelse:\n ans='Good'\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s184714228', 's042160420'] | [2940.0, 2940.0] | [17.0, 17.0] | [104, 104] |
p02993 | u098982053 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S = input()\nnum = S[0]\nflag = 0\nfor i in range(1,len(S)):\n if num==S[i]:\n print("Bad")\n flag=1\n break\nif flag==0:\n print("Good")', 'S = input()\nnum = S[0]\nflag = 0\nfor i in range(1,len(S)):\n if num==S[i]:\n print("Bad")\n flag=1\n break\n else:\n num=S[i]\nif flag==0:\n ... | ['Wrong Answer', 'Accepted'] | ['s105797048', 's457341503'] | [2940.0, 2940.0] | [18.0, 17.0] | [139, 168] |
p02993 | u100800700 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["A =input()\nprint('Bad' if A[0] == A[1] | A[1] == A[2] | A[2] == A[3] | A[3] == A[4] else 'Good')\n", "A = inout()\nprint('Bad' if A[i] == A[i+1] for i in range(4) else 'Good') ", "S=list(input())\nc=0\nfor i in range(3):\n if S[i]==S[i+1]:\n c+=1\nprint('Bad' if c>0 else 'Good')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s416425579', 's622765522', 's637290646'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [98, 73, 104] |
p02993 | u104442591 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s = input()\nflag = 'Yes'\nfor i in range(len(s)-1):\n if s[i] == s[i+1]:\n flag = 'No'\nprint(flag)\n", "s = input()\nflag = 'Good'\nfor i in range(len(s)-1):\n if s[i] == s[i+1]:\n flag = 'Bad'\nprint(flag)"] | ['Wrong Answer', 'Accepted'] | ['s750394602', 's963486207'] | [2940.0, 2940.0] | [17.0, 18.0] | [100, 101] |
p02993 | u105302073 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['S = list(input())\nprev = S[0]\nans = True\nfor s in range(1, 4):\n if s == prev:\n ans = False\n prev = s\nprint("Good" if ans else "Bad")\n', 'S = list(input())\nprev = S[0]\nans = True\nfor i in range(1, 4):\n if S[i] == prev:\n ans = False\n prev = S[i]\nprint("Good" if ans else "Bad")\n... | ['Wrong Answer', 'Accepted'] | ['s366952095', 's056260870'] | [2940.0, 2940.0] | [19.0, 17.0] | [146, 152] |
p02993 | u106342872 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["s = list(str(input()))\n\nif s[0] == s[1] or a[1] == s[2] or s[2] == s[3]:\n print('Bad')\nelse:\n print('Good')\n", "s = list(str(input()))\n\nif s[0] == s[1] == s[2] == s[3]:\n print('Bad')\nelse:\n print('Good')\n", "s = list(str(input()))\n\nif s[0] == s[1] and a[1] == s[2] and s[2] == s[3]:\n prin... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s013701585', 's049294922', 's492600322', 's832042133'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 24.0, 17.0] | [114, 98, 116, 114] |
p02993 | u107639613 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["S = int(input())\nif S[0]==S[1] or S[1]==S[2] or S[2]==S[3]:\n print('Bad')\nelse:\n print('Good')", "S = input()\n\nif S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:\n print('Bad')\nelse:\n print('Good')"] | ['Runtime Error', 'Accepted'] | ['s894334825', 's538413553'] | [2940.0, 2940.0] | [17.0, 18.0] | [100, 102] |
p02993 | u110656379 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['p=list(input())\nf=0\nfor i in range(len(l)-1):\n if l[i]==l[i+1]:\n f+=1\n break\nif f>0:\n print("Bad")\nelse:\n print("Good")\n ', 'p=list(input())\nf=0\nfor i in range(len(p)-1):\n if p[i]==p[i+1]:\n f+=1\n break\nif f>0:\n print("Bad")\nelse:\n print("Good")'] | ['Runtime Error', 'Accepted'] | ['s215817495', 's429456356'] | [2940.0, 2940.0] | [17.0, 17.0] | [131, 128] |
p02993 | u113255362 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = input()\nflag = False\nfor i in range(3):\n if List[i] == List[i+1]:\n flag = True\nif flag:\n print("Bad")\nelse:\n print("Good")\n ', 's =input()\nflag = False\nfor i in range(3):\n if s[i] == s[i+1]:\n flag = True\nif flag:\n print("Bad")\nelse:\n print("Good") '] | ['Runtime Error', 'Accepted'] | ['s729435316', 's886147799'] | [8868.0, 8872.0] | [23.0, 24.0] | [135, 126] |
p02993 | u114139438 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['import fractions\na,b,c,d=map(int, input().split()) \n\ni = b//c- (a-1)//c\nj = b//d- (a-1)//d\n\nf=fractions.gcd(c,d)\nf2= c * d / f\nk = b//f2 - (a-1)//f2\n\npot = i + j - k\n\nprint(b-(a-1)-pot)', "s=input()\nresult = True\n\nfor i in range(3):\n if s[i]==s[i+1]:\n result = False\nif result:\n print('... | ['Runtime Error', 'Accepted'] | ['s459611335', 's667437237'] | [5052.0, 2940.0] | [35.0, 18.0] | [185, 139] |
p02993 | u114366889 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["def judge(S):\n\tS_list = list(str(S)) \n\t\n\ti_pure = None\n\tfor i in S_list:\n\t\tif i == i_pure:\n\t\t\treturn 'Bad'\n\t\ti_pure = i\n\n\treturn 'Good'\n\n\n# S = ['3776','8080','1333','0024']\n\nS = stdin.readline()\n# for s in S:\n# \tprint(judge(s))\n\nprint(judge(S))", "import re\n\n\ndef judge(S):\n\tS_li... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s162906691', 's486944765', 's673690496', 's972179732'] | [2940.0, 3188.0, 3316.0, 2940.0] | [18.0, 19.0, 22.0, 17.0] | [255, 222, 266, 278] |
p02993 | u115877451 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["a=list(input())\nfor i in range(3):\n if a[i]==a[i+1]:\n print('Bad')\n break\n else:\n print('Good')", "a=list(input())\nfor i in range(3):\n if a[i]==a[i+1]:\n print('Bad')\n break\n else:\n print('Good')\n break\n", "a=list(input())\nb=[]\nfor i in range(3):\n if a[i]==a[i+1]:\n b.ap... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s005557265', 's136780096', 's853572898', 's970761048'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0, 17.0] | [106, 117, 157, 95] |
p02993 | u116233709 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s=input()\nans=0\nfor i in range(0,3):\n if s[i]=s[i+1]:\n ans+=1\n else:\n ans+=0\n\nif ans==0:\n print("Good")\nelse:\n print("Bad")', 's=input()\nans=0\nfor i in range(0,len(s)-1):\n if s[i]=s[i+1]:\n ans+=1\n else:\n ans+=0\n\nif ans==0:\n print("Good")\nelse:\n print("Bad")', 's=input()\nans=... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s595537095', 's987962265', 's115314661'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [133, 140, 135] |
p02993 | u122195031 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['s = list(map(int,input().split()))\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:\n print("Bad")\nelse:\n print("Good")\n ', 's = list(input())\nif s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:\n print("Bad")\nelse:\n print("Good")'] | ['Runtime Error', 'Accepted'] | ['s854846504', 's249519698'] | [2940.0, 3064.0] | [17.0, 17.0] | [125, 103] |
p02993 | u123745130 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['a=list(input())\nfor i in range(len(a)-1):\n\tif a[i]==a[i+1]:\n\t\tprint("Good")\n\telse:print("Bad")', 'a=list(input())\nfor i in range(len(a)-1):\n\tif a[i]==a[i+1]:\n\t\tprint("Good")\n break\nelse:print("Bad")\n', 'a=list(input())\nfor i in range(len(a)-1):\n\tif a[i]==a[i+1]:\n\t\tprint("Good")\n\t\tbrea... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s186507361', 's617798007', 's710864332', 's212880371'] | [2940.0, 3188.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0, 17.0] | [94, 108, 101, 102] |
p02993 | u125845436 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ['import sys\n\nS = input()\n\nS = list(S)\nfor i in range(len(S)-1):\n if S[i] == S[i+1]:\n result = "Bad"\n break\n else:\n result = "Good"', 'import sys\nimport fractions as fl\n\na, b, c, d = list(input().split())\na = int(a)\nb = int(b)\nc = int(c)\nd = int(d)\n\n\nall = b - a + 1\n\ne =... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s013435643', 's500477202', 's660436021', 's714923008'] | [2940.0, 5048.0, 2940.0, 2940.0] | [17.0, 36.0, 17.0, 18.0] | [156, 387, 218, 168] |
p02993 | u128646083 | 2,000 | 1,048,576 | The door of Snuke's laboratory is locked with a security code. The security code is a 4-digit number. We say the security code is _hard to enter_ when it contains two consecutive digits that are the same. You are given the current security code S. If S is hard to enter, print `Bad`; otherwise, print `Good`. | ["n=int(input())\na=[]\nb=[]\ngap=0\ne=0\nf=0\nm=0\nfor i in range(n):\n c,d=map(int,input().split())\n a.append(c)\n b.append(d)\nwhile (gap<=n/9):\n gap=gap*3+1\nwhile (gap>0):\n for i in range(gap,n):\n key=b[i]\n l=a[i]\n if(key<b[i-gap]):\n j=i\n while True... | ['Runtime Error', 'Accepted'] | ['s633576380', 's526532208'] | [3064.0, 2940.0] | [2103.0, 17.0] | [629, 125] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.