message stringlengths 2 65.1k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 0 108k | cluster float64 14 14 | __index_level_0__ int64 0 217k |
|---|---|---|---|---|---|
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows that in 2001 the company income amounted to a1 ... | instruction | 0 | 65,931 | 14 | 131,862 |
Tags: greedy
Correct Solution:
```
import sys
arr_size = sys.stdin.readline()
while arr_size:
arr_size = int(arr_size)
#print('arr_size', arr_size)
array = sys.stdin.readline().split()
#print('array', array)
array = list(map(int, array))
#print(array)
years = [2000 + i + 1 for ... | output | 1 | 65,931 | 14 | 131,863 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows that in 2001 the company income amounted to a1 ... | instruction | 0 | 65,932 | 14 | 131,864 |
Tags: greedy
Correct Solution:
```
i=input
n=i()
m=list(map(int,i().split()))
t=1
p=[]
for x in range(len(m)):
if(t==m[x]):
p.append(2001+x)
t+=1
print(t-1)
for i in range(len(p)):
print(p[i],end=" ")
``` | output | 1 | 65,932 | 14 | 131,865 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,933 | 14 | 131,866 |
Yes | output | 1 | 65,933 | 14 | 131,867 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,934 | 14 | 131,868 |
Yes | output | 1 | 65,934 | 14 | 131,869 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,935 | 14 | 131,870 |
Yes | output | 1 | 65,935 | 14 | 131,871 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,936 | 14 | 131,872 |
Yes | output | 1 | 65,936 | 14 | 131,873 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,937 | 14 | 131,874 |
No | output | 1 | 65,937 | 14 | 131,875 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,938 | 14 | 131,876 |
No | output | 1 | 65,938 | 14 | 131,877 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,939 | 14 | 131,878 |
No | output | 1 | 65,939 | 14 | 131,879 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Petya works as a PR manager for a successful Berland company BerSoft. He needs to prepare a presentation on the company income growth since 2001 (the year of its founding) till now. Petya knows ... | instruction | 0 | 65,940 | 14 | 131,880 |
No | output | 1 | 65,940 | 14 | 131,881 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,460 | 14 | 132,920 |
Tags: greedy, implementation, sortings
Correct Solution:
```
a=int(input())
l=sorted(list(map(int,input().split())))
k=0
if(len(l)>1):
for i in range(a-1):
k+=l[i+1]-l[i]-1
print(k)
else:
print("0")
``` | output | 1 | 66,460 | 14 | 132,921 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,461 | 14 | 132,922 |
Tags: greedy, implementation, sortings
Correct Solution:
```
n = int(input())
items = list(map(int, input().split()))
maxs=max(items)
mins=min(items)
print((maxs-mins+1)-n)
``` | output | 1 | 66,461 | 14 | 132,923 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,462 | 14 | 132,924 |
Tags: greedy, implementation, sortings
Correct Solution:
```
n=int(input())
l=list(map(int,input().split()))
k=max(l)-min(l)+1
print(k-len(l))
``` | output | 1 | 66,462 | 14 | 132,925 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,463 | 14 | 132,926 |
Tags: greedy, implementation, sortings
Correct Solution:
```
n = int(input())
a = list(map(int, input().split()))
a.sort()
res = a[-1] - a[0] + 1 - n
print(res)
``` | output | 1 | 66,463 | 14 | 132,927 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,464 | 14 | 132,928 |
Tags: greedy, implementation, sortings
Correct Solution:
```
n = eval(input())
x = list(map(int, input().split()))
x.sort()
a = x[0]
b = x[len(x)-1]
count = b-a+1 - len(x)
print(count)
``` | output | 1 | 66,464 | 14 | 132,929 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,465 | 14 | 132,930 |
Tags: greedy, implementation, sortings
Correct Solution:
```
#!/usr/bin/env python3
n = int(input())
a = list(map(int, input().split()))
a.sort()
k = 0 # кол украденного тавара
for i in range(n - 1):
k += a[i + 1] - a[i] - 1
print(k)
``` | output | 1 | 66,465 | 14 | 132,931 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,466 | 14 | 132,932 |
Tags: greedy, implementation, sortings
Correct Solution:
```
n = int(input())
array = input().split(' ')
minv = int(array[0])
maxv = int(array[0])
for i in range(n):
if minv > int(array[i]):
minv = int(array[i])
if maxv < int(array[i]):
maxv = int(array[i])
res = maxv - minv + 1
res = res - n
pr... | output | 1 | 66,466 | 14 | 132,933 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There was an electronic store heist last night.
All keyboards which were in the store yesterday were numbered in ascending order from some integer number x. For example, if x = 4 and there were 3 keyboards in the store, then the devices had... | instruction | 0 | 66,467 | 14 | 132,934 |
Tags: greedy, implementation, sortings
Correct Solution:
```
n=int(input());a=sorted(list(map(int,input().split())));print(sum([a[x]-a[x-1]-1 for x in range(1,n)]))
``` | output | 1 | 66,467 | 14 | 132,935 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,676 | 14 | 133,352 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
mod=998244353
def ans(A):
LEN=len(A)
ANS=0
for i in range(1<<LEN):
X=[0]*LEN
for j in range(LEN):
i... | output | 1 | 66,676 | 14 | 133,353 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,677 | 14 | 133,354 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
n = int(input())
a = list(map(int,input().split()))
ans = 0
tot_sum = sum(a)
p_sum = 0
for i in a:
p_sum += i
if ... | output | 1 | 66,677 | 14 | 133,355 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,678 | 14 | 133,356 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
n = int(input())
a = list(map(int,input().split()))
ans = 0
# case of PPPPPPCCCCCCC
tot_sum = sum(a)
p_sum = 0
for i in a:
... | output | 1 | 66,678 | 14 | 133,357 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,679 | 14 | 133,358 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys,io,os
try:Z=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
except:Z=lambda:sys.stdin.readline().encode()
Y=lambda:map(int,Z().split())
from bisect import bisect
M=998244353
def add(a,b):
v=a+b
if v>=M:v-=M
... | output | 1 | 66,679 | 14 | 133,359 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,680 | 14 | 133,360 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
n = int(input())
a = list(map(int,input().split()))
ans = 0
# case of PPPPPPCCCCCCC
tot_sum = sum(a)
p_sum = 0
for i in a:
... | output | 1 | 66,680 | 14 | 133,361 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,681 | 14 | 133,362 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys
input = sys.stdin.buffer.readline
for _ in range(int(input())):
n = int(input()); a = list(map(int,input().split())); ans = 0; tot_sum = sum(a); p_sum = 0
for i in a:
p_sum += i
if p_su... | output | 1 | 66,681 | 14 | 133,363 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In the 2050 Conference, some people from the competitive programming community meet together and are going to take a photo. The n people form a line. They are numbered from 1 to n from left to right. Each of them either holds a cardboard wit... | instruction | 0 | 66,682 | 14 | 133,364 |
Tags: binary search, data structures, implementation, two pointers
Correct Solution:
```
import sys
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
mod=998244353
def ans(A):
LEN=len(A)
ANS=0
for i in range(1<<LEN):
X=[0]*LEN
for j in range(LEN):
i... | output | 1 | 66,682 | 14 | 133,365 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,771 | 14 | 133,542 |
Tags: *special, implementation
Correct Solution:
```
a = list(input().split())
n, T, c = int(a[0]), int(a[1]), float(a[2])
a = list(map(int, input().split()))
m = int(input())
p = list(map(int, input().split()))
sum_a = sum(a[:T - 1])
mean = 0
for t in range(T - 1):
mean = (mean + a[t]/T) / c
i = 0
for t in range... | output | 1 | 66,771 | 14 | 133,543 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,772 | 14 | 133,544 |
Tags: *special, implementation
Correct Solution:
```
__author__ = 'ruckus'
n, T, c = input().split()
n = int(n)
T = int(T)
c = float(c)
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))
res_a = 0
real = 0
maxi_q = max(q)
q_n = 0
for i in range(q[-1]):
res_a = (res_a + a[i] / T... | output | 1 | 66,772 | 14 | 133,545 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,773 | 14 | 133,546 |
Tags: *special, implementation
Correct Solution:
```
import math
s=input().split(' ')
n,tm,k=int(s[0]),int(s[1]),float(s[2])
rq=[int(c) for c in input().split(' ')]
m=int(input())
cr={int(c) for c in input().split(' ')}
sr,ma=0,0
alv=[]
for c,t in enumerate(rq):
ma=(ma+t/tm)/k
sr+=t
l=c-tm
l=rq[l] if l... | output | 1 | 66,773 | 14 | 133,547 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,774 | 14 | 133,548 |
Tags: *special, implementation
Correct Solution:
```
n, t, c = input().split()
n = int(n)
t = int(t)
c = float(c)
a = list(map(int, input().split()))
m = int(input())
p = list(map(int, input().split()))
sums = [a[0]]
for i in range(1, n):
sums.append(sums[i - 1] + a[i])
approx = [a[0] / (t * c)]
for i in range(1, n... | output | 1 | 66,774 | 14 | 133,549 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,775 | 14 | 133,550 |
Tags: *special, implementation
Correct Solution:
```
__author__ = 'ruckus'
n, T, c = input().split()
n = int(n)
T = int(T)
c = float(c)
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))
res_a = 0
real = 0
maxi_q = max(q)
q_n = 0
for i in range(q[-1]):
res_a = (res_a + a[i] / T... | output | 1 | 66,775 | 14 | 133,551 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,776 | 14 | 133,552 |
Tags: *special, implementation
Correct Solution:
```
def main():
s = input().split()
n,T,c = int(s[0]), int(s[1]), float(s[2])
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))
sumA, approx, mean = [0], [], 0.
for i in range(1, n+1):
mean = (me... | output | 1 | 66,776 | 14 | 133,553 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,777 | 14 | 133,554 |
Tags: *special, implementation
Correct Solution:
```
n, T, c = input().split()
n = int(n)
T = int(T)
c = float(c)
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))
res_a = 0
real = 0
maxi_q = max(q)
q_n = 0
for i in range(q[-1]):
res_a = (res_a + a[i] / T) / c
real += a[i]... | output | 1 | 66,777 | 14 | 133,555 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In this problem you will have to deal with a real algorithm that is used in the VK social network.
As in any other company that creates high-loaded websites, the VK developers have to deal with request statistics regularly. An important ind... | instruction | 0 | 66,778 | 14 | 133,556 |
Tags: *special, implementation
Correct Solution:
```
#!/usr/bin/python3.5
import math
mean=[0.0]*200010
real=[0.0]*200010
n,T,c=input().split()
n=int(n)
T=int(T)
c=float(c)
t=T
a=[0]+[int(x) for x in input().split()]
for i in range(1,n+1):
mean[i]=(mean[i-1]+(a[i]/T))/c
real[i]=real[i-1]+a[i]
m=int(input())
q=... | output | 1 | 66,778 | 14 | 133,557 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,937 | 14 | 133,874 |
Tags: implementation, strings
Correct Solution:
```
n = int( input() )
L = []
m = {}
names = []
for i in range( n ):
a = input().split()
name = a[0]
names.append( a[0] )
a = a[2:]
if name not in m:
m[ name ] = []
for j in a:
m[ name ].append( j )
names = set( names )
for... | output | 1 | 66,937 | 14 | 133,875 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,938 | 14 | 133,876 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
d = {}
for i in range(n):
s = list(str(input()).split(" "))
if s[0] not in d:
d[s[0]] = []
for i in range(2, 2+int(s[1])):
d[s[0]] += [s[i][::-1]]
print(len(d))
for name in d:
ph = sorted(d[name])
ans = []
for i in range(len(ph)-1):... | output | 1 | 66,938 | 14 | 133,877 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,939 | 14 | 133,878 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
friends = {}
for _ in range(n):
data = input().split()
name = data[0]
numbers = set(data[2:])
if name in friends:
friends[name].update(numbers)
else:
friends[name] = numbers
print(len(friends))
for friend, numbers i... | output | 1 | 66,939 | 14 | 133,879 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,940 | 14 | 133,880 |
Tags: implementation, strings
Correct Solution:
```
# c451
n = int(input())
entries = []
for i in range(n):
entries.append(input().split())
book = {}
for e in entries:
if e[0] in book:
numbers = book[e[0]]
for non_org_number in e[2:]:
issuffix = False
isselfsuffix = F... | output | 1 | 66,940 | 14 | 133,881 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,941 | 14 | 133,882 |
Tags: implementation, strings
Correct Solution:
```
phone_book = {}
friends = 0
n = int(input().strip())
for _ in range(n):
record = input().strip().split()
name = record[0]
num = int(record[1])
if name not in phone_book:
phone_book[name] = []
friends += 1
for i in range(num):
... | output | 1 | 66,941 | 14 | 133,883 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,942 | 14 | 133,884 |
Tags: implementation, strings
Correct Solution:
```
def suff(a, b):
if a == b:
return False
else:
return len(b) > len(a) and b[len(b) - len(a):] == a
n = int(input())
a = {}
for i in range(n):
s = input().split()
name = s[0]
nums = s[2:]
if name in a.keys():
a[name].ext... | output | 1 | 66,942 | 14 | 133,885 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,943 | 14 | 133,886 |
Tags: implementation, strings
Correct Solution:
```
def fltr(tels):
ts = list(tels)
for i, t in enumerate(ts):
l = len(t)
for i2, t2 in enumerate(ts):
if i == i2: continue
if t == t2 and i < i2:
tels.remove(t)
break
if t != t2 a... | output | 1 | 66,943 | 14 | 133,887 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about the phone numbers of friends. You will be given... | instruction | 0 | 66,944 | 14 | 133,888 |
Tags: implementation, strings
Correct Solution:
```
def check_suffix(s1, s2): # checks if s1 is suffix of s2
l1 = len(s1)
l2 = len(s2)
if l1 >= l2:
return 0
if s2[-l1 : ] == s1:
return 1
return 0
def no_suffix(ls):
ls2 = []
for i in range(len(ls)):
for j in range(len(ls)):
if i == j:
continue
... | output | 1 | 66,944 | 14 | 133,889 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,945 | 14 | 133,890 |
Yes | output | 1 | 66,945 | 14 | 133,891 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,946 | 14 | 133,892 |
Yes | output | 1 | 66,946 | 14 | 133,893 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,947 | 14 | 133,894 |
Yes | output | 1 | 66,947 | 14 | 133,895 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,948 | 14 | 133,896 |
Yes | output | 1 | 66,948 | 14 | 133,897 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,949 | 14 | 133,898 |
No | output | 1 | 66,949 | 14 | 133,899 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,950 | 14 | 133,900 |
No | output | 1 | 66,950 | 14 | 133,901 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,951 | 14 | 133,902 |
No | output | 1 | 66,951 | 14 | 133,903 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers.
Vasya decided to organize information about ... | instruction | 0 | 66,952 | 14 | 133,904 |
No | output | 1 | 66,952 | 14 | 133,905 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Bob watches TV every day. He always sets the volume of his TV to b. However, today he is angry to find out someone has changed the volume to a. Of course, Bob has a remote control that can change the volume.
There are six buttons (-5, -2, -... | instruction | 0 | 67,389 | 14 | 134,778 |
Tags: math
Correct Solution:
```
ii=lambda:int(input())
kk=lambda:map(int,input().split())
ll=lambda:list(kk())
d=[0,1,1,2,2]
for _ in range(ii()):
a,b=kk()
print(abs(a-b)//5+d[abs(a-b)%5])
``` | output | 1 | 67,389 | 14 | 134,779 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.