message stringlengths 2 43.5k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 853 107k | cluster float64 24 24 | __index_level_0__ int64 1.71k 214k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp wrote on the board a string s containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input.
After that, he erased some letters from the string... | instruction | 0 | 36,989 | 24 | 73,978 |
Yes | output | 1 | 36,989 | 24 | 73,979 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp wrote on the board a string s containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input.
After that, he erased some letters from the string... | instruction | 0 | 36,990 | 24 | 73,980 |
Yes | output | 1 | 36,990 | 24 | 73,981 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp wrote on the board a string s containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input.
After that, he erased some letters from the string... | instruction | 0 | 36,991 | 24 | 73,982 |
No | output | 1 | 36,991 | 24 | 73,983 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp wrote on the board a string s containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input.
After that, he erased some letters from the string... | instruction | 0 | 36,992 | 24 | 73,984 |
No | output | 1 | 36,992 | 24 | 73,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp wrote on the board a string s containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input.
After that, he erased some letters from the string... | instruction | 0 | 36,993 | 24 | 73,986 |
No | output | 1 | 36,993 | 24 | 73,987 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp wrote on the board a string s containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input.
After that, he erased some letters from the string... | instruction | 0 | 36,994 | 24 | 73,988 |
No | output | 1 | 36,994 | 24 | 73,989 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,443 | 24 | 74,886 |
"Correct Solution:
```
n = int(input())
a = []
for i in range(n):
m, h = input().split(':')
m = int(m)
h = int(h)
a.append(m * 60 + h)
a.sort()
ans = 0
for i in range(n):
ans = max(ans, a[i] - a[i - 1] - 1)
ans = max(ans, 1440 + a[0] - a[-1] - 1)
if n == 1:
print('23:59')
else:
hh = ans // ... | output | 1 | 37,443 | 24 | 74,887 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,444 | 24 | 74,888 |
"Correct Solution:
```
n = int(input())
arr = []
for i in range(n):
h, m = map(int, input().split(':'));
cur = h * 60 + m;
arr.append(cur)
arr.sort()
arr.append(24 * 60 + arr[0])
maxx = 0
for i in range(1, len(arr)):
maxx = max(maxx, arr[i] - arr[i - 1] - 1)
m = maxx % 60
h = maxx // 60
if (h < 10):
... | output | 1 | 37,444 | 24 | 74,889 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,445 | 24 | 74,890 |
"Correct Solution:
```
import sys
n = int(input())
lst = []
p = -1
mx = 0
while n > 0:
str = input()
x = 60 * (10 * int(str[0]) + int(str[1])) + 10 * int(str[3]) + int(str[4])
lst.append(x)
n -= 1
lst.sort()
for i in lst:
if p >= 0:
mx = max(mx, i - p)
p = i
x = lst[0]
y = lst[-1]
mx = m... | output | 1 | 37,445 | 24 | 74,891 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,446 | 24 | 74,892 |
"Correct Solution:
```
n = int(input())
a = []
for i in range(n):
h, m = map(int, input().split(":"))
a.append((h + 24) * 60 + m)
a.append(h * 60 + m)
a.sort()
j = 0
s = 0
ans = 0
for i in range(0, 48 * 60):
if (j < 2 * n and a[j] == i):
ans = max(ans, s)
s = 0
j += 1
continue
else:
s += 1
h = ans // 60... | output | 1 | 37,446 | 24 | 74,893 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,447 | 24 | 74,894 |
"Correct Solution:
```
n = int(input())
A = []
for i in range(n):
s = input()
h = s[:2]
m = s[3:]
A.append((int(h), int(m)))
md = -12341234
A = sorted(A)
for i in range(n - 1):
a, b = A[i]
c, d = A[i + 1]
g = (c - a) * 60
if(b > d):
g += 60 - b + d
g -= 60
else:
g += d - b
if(g > md):
md = g
a, b = A... | output | 1 | 37,447 | 24 | 74,895 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,448 | 24 | 74,896 |
"Correct Solution:
```
b = int(input())
times = []
line = ""
a = b
while a > 0:
a-=1
curr_time = input().split(":")
times.append(int(curr_time[0])*60+int(curr_time[1]))
times.sort()
times.append(times[0]+24*60)
max_delta = 0
if times[0] > max_delta:
max_delta = times[0]
for it in range(1,b+1):
if ti... | output | 1 | 37,448 | 24 | 74,897 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,449 | 24 | 74,898 |
"Correct Solution:
```
def f(x):
if x < 10:
return "0" + str(x)
return str(x)
n = int(input())
times = []
for i in range(0, n):
s = input()
times.append(60 * int(s[0:2]) + int(s[3:5]))
times.append(60 * 24 + 60 * int(s[0:2]) + int(s[3:5]))
times.sort()
ans = times[1] - times[0] - 1
for i in range(1, len(times))... | output | 1 | 37,449 | 24 | 74,899 |
Provide a correct Python 3 solution for this coding contest problem.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It... | instruction | 0 | 37,450 | 24 | 74,900 |
"Correct Solution:
```
n = int(input())
a = []
def mem(kek):
return (int(kek[0])*10 + int(kek[1]))*60 + int(kek[3])*10 + int(kek[4])
def lol(kek):
h = str(kek//60)
m = str(kek%60)
ans = ""
if (len(h)<2): ans+="0"
ans+=h
ans+=":"
if (len(m)<2): ans+="0"
ans+=m
return ans
delt = 60... | output | 1 | 37,450 | 24 | 74,901 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,451 | 24 | 74,902 |
Yes | output | 1 | 37,451 | 24 | 74,903 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,452 | 24 | 74,904 |
Yes | output | 1 | 37,452 | 24 | 74,905 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,453 | 24 | 74,906 |
Yes | output | 1 | 37,453 | 24 | 74,907 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,454 | 24 | 74,908 |
Yes | output | 1 | 37,454 | 24 | 74,909 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,455 | 24 | 74,910 |
No | output | 1 | 37,455 | 24 | 74,911 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,456 | 24 | 74,912 |
No | output | 1 | 37,456 | 24 | 74,913 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,457 | 24 | 74,914 |
No | output | 1 | 37,457 | 24 | 74,915 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.
Determine the longest time segment when Pol... | instruction | 0 | 37,458 | 24 | 74,916 |
No | output | 1 | 37,458 | 24 | 74,917 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,933 | 24 | 77,866 |
Tags: brute force, geometry, implementation
Correct Solution:
```
#import math
n,m=map(int,input().split())
l=[]
for i in range(n):
s=list(input())
#print(s)
k=s.count('*')
c=0
for _ in range(k):
if '*' in s:
j=s.index('*')
l.append([i,j+c])
s=s[:j]+s[j+1:... | output | 1 | 38,933 | 24 | 77,867 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,934 | 24 | 77,868 |
Tags: brute force, geometry, implementation
Correct Solution:
```
nm = input().split()
n = int(nm[0])
m = int(nm[1])
k = 0
for j in range(n):
s = input()
for i in range(m):
if s[i] == '*':
k += 1
if k == 1:
pos1 = [i+1, j+1]
elif k == 2:
... | output | 1 | 38,934 | 24 | 77,869 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,935 | 24 | 77,870 |
Tags: brute force, geometry, implementation
Correct Solution:
```
n, m = map(int, input().split())
l = [input() for i in range(n)]
for i in range(n):
if l[i].count('*') == 2:
a1 = l[i]
if l[i].count('*') == 1:
a2 = l[i]
b2 = i
#print(a1.index('*'), a2.index('*'))
if a1.index('*') == a2.index('*'):
z = a1[::... | output | 1 | 38,935 | 24 | 77,871 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,936 | 24 | 77,872 |
Tags: brute force, geometry, implementation
Correct Solution:
```
a,d=map(int,input().split())
p=0
for b in range(a):
e=input()
if "*" in e:
for n in range(d):
if e[n]=='*':
if p==0:
x1=[b,n]
p+=1
elif p==1:
x2=[b,n]
p+=1
elif p==2:
... | output | 1 | 38,936 | 24 | 77,873 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,937 | 24 | 77,874 |
Tags: brute force, geometry, implementation
Correct Solution:
```
n,m=map(int,input().split()); l=[]
for i in range(n):
l.append(input())
for i in range(len(l)):
if l[i].count('*')==1:
r=i
for i in range(n):
if l[i].count('*')==2:
for j in range(m):
if (l[i][j]=='*' and l[r][j]!='*'):
c=j
print(r+1,c+1,se... | output | 1 | 38,937 | 24 | 77,875 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,938 | 24 | 77,876 |
Tags: brute force, geometry, implementation
Correct Solution:
```
n,m=map(int,input().split())
x=[]
for i in range(n):
x.append(input())
l=[]
t=[]
for i in range(n):
for j in range(m):
if(x[i][j]=='*'):
l.append([i,j])
if(l[0][0]==l[1][0]):
t.append(l[2][0]+1)
elif(l[2][0]==l[1][0]):
... | output | 1 | 38,938 | 24 | 77,877 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,939 | 24 | 77,878 |
Tags: brute force, geometry, implementation
Correct Solution:
```
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 9 21:42:13 2020
@author: odraodE
"""
'''testo dell'esercizio https://codeforces.com/problemset/problem/181/A'''
M=[]
a=input().split()
n=int(a[0])
m=int(a[1])
for x in range(n):
l=[]
for y in ran... | output | 1 | 38,939 | 24 | 77,879 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of the table on the map represents some districts o... | instruction | 0 | 38,940 | 24 | 77,880 |
Tags: brute force, geometry, implementation
Correct Solution:
```
x = list(map(int, input().split(" ")))
y = []
a = []
b = []
for i in range(x[0]):
y.append(input().split(" "))
for i in y:
for j in i:
b.append(list(j))
for i in range(len(b)):
for j in range(len(b[0])):
if b[i][j] == "*":... | output | 1 | 38,940 | 24 | 77,881 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,941 | 24 | 77,882 |
Yes | output | 1 | 38,941 | 24 | 77,883 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,942 | 24 | 77,884 |
Yes | output | 1 | 38,942 | 24 | 77,885 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,943 | 24 | 77,886 |
Yes | output | 1 | 38,943 | 24 | 77,887 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,944 | 24 | 77,888 |
Yes | output | 1 | 38,944 | 24 | 77,889 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,945 | 24 | 77,890 |
No | output | 1 | 38,945 | 24 | 77,891 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,946 | 24 | 77,892 |
No | output | 1 | 38,946 | 24 | 77,893 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,947 | 24 | 77,894 |
No | output | 1 | 38,947 | 24 | 77,895 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
The Berland capital is shaken with three bold crimes committed by the Pihsters, a notorious criminal gang.
The Berland capital's map is represented by an n Γ m rectangular table. Each cell of t... | instruction | 0 | 38,948 | 24 | 77,896 |
No | output | 1 | 38,948 | 24 | 77,897 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,275 | 24 | 78,550 |
Tags: data structures, implementation, sortings
Correct Solution:
```
n = int(input())
s, p = {}, [''] * n
for k in range(n):
p[k] = t = input()
for q in [t[i: j] for i in range(9) for j in range(i + 1, 10)]:
s[q] = -1 if q in s and s[q] != k else k
for q, k in s.items():
if k >= 0 and len(p[... | output | 1 | 39,275 | 24 | 78,551 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,276 | 24 | 78,552 |
Tags: data structures, implementation, sortings
Correct Solution:
```
def podstroki(s):
return sorted(set(s[i: i1] for i in range(9) for i1 in range (i+1, 10)), key=len)
res = {}
spisok = [podstroki(input()) for i in range (int(input()))]
for s in spisok:
for podstr in s:
if podstr in res:
... | output | 1 | 39,276 | 24 | 78,553 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,277 | 24 | 78,554 |
Tags: data structures, implementation, sortings
Correct Solution:
```
import math
from collections import *
a=int(input())
indx=defaultdict(list)
done=defaultdict(list)
for t in range(a):
s=input()
for i in range(len(s)):
for j in range(i,len(s)):
m=s[i:j+1]
if(len(... | output | 1 | 39,277 | 24 | 78,555 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,278 | 24 | 78,556 |
Tags: data structures, implementation, sortings
Correct Solution:
```
import sys
from collections import defaultdict
N = int(input())
S = []
Subs = defaultdict(int)
for i in range(N):
s = input()
S.append(s)
for ff in range(1,10):
for ss in range(10-ff):
Subs[s[ss:ss+ff]] += 1
for i ... | output | 1 | 39,278 | 24 | 78,557 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,279 | 24 | 78,558 |
Tags: data structures, implementation, sortings
Correct Solution:
```
n = int(input())
m = {}
a = []
for i in range(n):
s = input()
sub = set()
for i in range(len(s)):
for j in range(i, len(s)):
k = s[i:j + 1]
if k in sub:
continue
else:
... | output | 1 | 39,279 | 24 | 78,559 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,280 | 24 | 78,560 |
Tags: data structures, implementation, sortings
Correct Solution:
```
n = int(input())
maps = {}
for i in range(n):
string = input()
for j in range(len(string)):
for a in range(0,j + 1):
substr = string[a:j+1]
if substr not in maps:
maps[substr] = {'index' : i, '... | output | 1 | 39,280 | 24 | 78,561 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,281 | 24 | 78,562 |
Tags: data structures, implementation, sortings
Correct Solution:
```
cnt = {}
n = int(input())
ls = [input() for _ in range(n)]
for s in ls:
subs = set()
for end in range(10):
for start in range(end):
subs.add(s[start:end])
for sub in subs:
if sub not in cnt:
cnt[s... | output | 1 | 39,281 | 24 | 78,563 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest version of Berdroid OS installed on Polycarp's phone.... | instruction | 0 | 39,282 | 24 | 78,564 |
Tags: data structures, implementation, sortings
Correct Solution:
```
class CodeforcesTask860BSolution:
def __init__(self):
self.result = ''
self.n = 0
self.phones = []
def read_input(self):
self.n = int(input())
for x in range(self.n):
self.phones.append(inp... | output | 1 | 39,282 | 24 | 78,565 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest versio... | instruction | 0 | 39,283 | 24 | 78,566 |
Yes | output | 1 | 39,283 | 24 | 78,567 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest versio... | instruction | 0 | 39,284 | 24 | 78,568 |
Yes | output | 1 | 39,284 | 24 | 78,569 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest versio... | instruction | 0 | 39,285 | 24 | 78,570 |
Yes | output | 1 | 39,285 | 24 | 78,571 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
There are n phone numbers in Polycarp's contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct.
There is the latest versio... | instruction | 0 | 39,286 | 24 | 78,572 |
Yes | output | 1 | 39,286 | 24 | 78,573 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.