message stringlengths 2 23.4k | message_type stringclasses 2
values | message_id int64 0 1 | conversation_id int64 129 108k | cluster float64 6 6 | __index_level_0__ int64 258 216k |
|---|---|---|---|---|---|
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Vladik discovered a new entertainment — coding bots for social networks. He would like to use machine learning in his bots so now he want to prepare some learning data for them.
At fir... | instruction | 0 | 65,325 | 6 | 130,650 |
No | output | 1 | 65,325 | 6 | 130,651 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Vladik discovered a new entertainment — coding bots for social networks. He would like to use machine learning in his bots so now he want to prepare some learning data for them.
At fir... | instruction | 0 | 65,326 | 6 | 130,652 |
No | output | 1 | 65,326 | 6 | 130,653 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Vladik discovered a new entertainment — coding bots for social networks. He would like to use machine learning in his bots so now he want to prepare some learning data for them.
At fir... | instruction | 0 | 65,327 | 6 | 130,654 |
No | output | 1 | 65,327 | 6 | 130,655 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Recently Vladik discovered a new entertainment — coding bots for social networks. He would like to use machine learning in his bots so now he want to prepare some learning data for them.
At fir... | instruction | 0 | 65,328 | 6 | 130,656 |
No | output | 1 | 65,328 | 6 | 130,657 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one can find the solution of the problem of discrete... | instruction | 0 | 65,382 | 6 | 130,764 |
Tags: constructive algorithms, implementation, strings
Correct Solution:
```
n = int(input())
s = input()
t = input()
if sorted(s) != sorted(t):
print(-1)
else:
res = []
for i in range(n):
k = 0
while(s[k] != t[i]):
k += 1
res += [n - k - 1, 1, n]
s = ''.join(rev... | output | 1 | 65,382 | 6 | 130,765 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one can find the solution of the problem of discrete... | instruction | 0 | 65,383 | 6 | 130,766 |
Tags: constructive algorithms, implementation, strings
Correct Solution:
```
n = int(input())
t = input()[:n]
s = input()[:n]
ops =[]
def shift(k, cur):
if k == 0:
return cur
return cur[:-k-1:-1] + cur [:-k]
def move_to_front(k, curst):
if k == n-1:
ops.append(1)
curst = curst[-... | output | 1 | 65,383 | 6 | 130,767 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one can find the solution of the problem of discrete... | instruction | 0 | 65,384 | 6 | 130,768 |
Tags: constructive algorithms, implementation, strings
Correct Solution:
```
n = int(input())
s = input()
t = input()
if sorted(s) != sorted(t):
print(-1)
else:
ans = []
for i in t:
j = 0
for j in range(n):
if i == s[j]:
break
ans.append(n-j-1)
an... | output | 1 | 65,384 | 6 | 130,769 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one can find the solution of the problem of discrete... | instruction | 0 | 65,385 | 6 | 130,770 |
Tags: constructive algorithms, implementation, strings
Correct Solution:
```
n = int(input())
s = input()
t = input()
if sorted(s) != sorted(t):
print(-1)
else:
ans = []
for i in t:
j = 0
for j in range(n):
if i == s[j]:
break
ans.append(n-j-1)
an... | output | 1 | 65,385 | 6 | 130,771 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one can find the solution of the problem of discrete... | instruction | 0 | 65,386 | 6 | 130,772 |
Tags: constructive algorithms, implementation, strings
Correct Solution:
```
n = int(input())
s = input()
t = input()
if sorted(s) != sorted(t):
print(-1)
else:
res = []
for i in range(n):
k = 0;
while(s[k] != t[i]):
k += 1
res += [n-k-1, 1, n]
s = "".join(revers... | output | 1 | 65,386 | 6 | 130,773 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one c... | instruction | 0 | 65,387 | 6 | 130,774 |
No | output | 1 | 65,387 | 6 | 130,775 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one c... | instruction | 0 | 65,388 | 6 | 130,776 |
No | output | 1 | 65,388 | 6 | 130,777 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one c... | instruction | 0 | 65,389 | 6 | 130,778 |
No | output | 1 | 65,389 | 6 | 130,779 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one c... | instruction | 0 | 65,390 | 6 | 130,780 |
No | output | 1 | 65,390 | 6 | 130,781 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,992 | 6 | 131,984 |
Tags: greedy, implementation, strings
Correct Solution:
```
first = input()
second = input()
dicty = {}
for i in first:
if(i not in dicty):
dicty[i] = 1
else:
dicty[i] += 1
yay = 0
whoops = 0
array_bool = [False for x in second]
for i in range(len(second)):
if (second[i] in dicty and dicty[second[i]] ... | output | 1 | 65,992 | 6 | 131,985 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,993 | 6 | 131,986 |
Tags: greedy, implementation, strings
Correct Solution:
```
s = input()
t = input()
oc = {}
yay=0
whoops=0
resto=''
for l1 in t:
oc[l1] = oc.get(l1, 0)+1
for l2 in s:
if oc.get(l2, 0)>0:
oc[l2]-=1
yay+=1
else:
resto+=l2
for l3 in resto:
aux=l3.swapcase()
if oc.get(aux, 0)>0:
oc[aux]-=1
... | output | 1 | 65,993 | 6 | 131,987 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,994 | 6 | 131,988 |
Tags: greedy, implementation, strings
Correct Solution:
```
alth = "abcdefghijklmnopqrstuvwxyz"
alth2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s2 = [[0]*26 for i in range(2)]
s3 = [[0]*26 for i in range(2)]
s = input()
t = input()
num = 0
num2 = 0
for i in s:
temp = alth.find(i)
if temp != -1:
s2[0][temp] += 1
... | output | 1 | 65,994 | 6 | 131,989 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,995 | 6 | 131,990 |
Tags: greedy, implementation, strings
Correct Solution:
```
import math
t=1
for _ in range(t):
msg=input()
news=input()
newsdict=dict()
for i in news:
a=newsdict.get(i,0)
newsdict[i]=a+1
yay=0
remainingdict=dict()
for i in msg:
a=newsdict.get(i,0)
if(a>0):
... | output | 1 | 65,995 | 6 | 131,991 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,996 | 6 | 131,992 |
Tags: greedy, implementation, strings
Correct Solution:
```
s1 = input()
s2 = input()
TAM = 26
a_min = ord("a")
a_mai = ord("A")
ls1_min = [0]*TAM
ls1_mai = [0]*TAM
ls2_min = [0]*TAM
ls2_mai = [0]*TAM
for letra in s1:
if letra.islower():
ls1_min[ord(letra) - a_min] += 1
else:
ls1_mai[ord(let... | output | 1 | 65,996 | 6 | 131,993 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,997 | 6 | 131,994 |
Tags: greedy, implementation, strings
Correct Solution:
```
msg = input()
letters = input()
yays = 0
whoops = 0
alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
rest = []
leaks = []
i= 0
for l in alphabet:
original = msg.count(l)
journal = letters.count(l)
if journal >= original:
ya... | output | 1 | 65,997 | 6 | 131,995 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,998 | 6 | 131,996 |
Tags: greedy, implementation, strings
Correct Solution:
```
def solve():
d={}
s=input()
t=input()
n=len(s)
m=len(t)
for i in range(0,26):
d[chr(ord('a')+i)]=0
d[chr(ord('A')+i)]=0
for i in range(0,m):
d[t[i]]+=1
y=0
w=0
x=[0]*n
for i in range(0,n):
... | output | 1 | 65,998 | 6 | 131,997 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Little Tanya decided to present her dad a postcard on his Birthday. She has already created a message — string s of length n, consisting of uppercase and lowercase English letters. Tanya can't write yet, so she found a newspaper and decided ... | instruction | 0 | 65,999 | 6 | 131,998 |
Tags: greedy, implementation, strings
Correct Solution:
```
s1 = input()
s2 = input()
ms1 = [0]*26
ms2 = [0]*26
ms3 = [0]*26
ms4 = [0]*26
m = 0
n = 0
for i in range (len(s1)):
if ord(s1[i]) <= ord('Z'):
ms1[ord(s1[i])-ord('A')] += 1
else:
ms2[ord(s1[i])-ord('a')] += 1
for i in range (len(s2)):
... | output | 1 | 65,999 | 6 | 131,999 |
Provide a correct Python 3 solution for this coding contest problem.
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
The text includes only alphabetical ch... | instruction | 0 | 66,370 | 6 | 132,740 |
"Correct Solution:
```
x = list(input().split())
print(max(x,key=x.count), max(x,key=len))
``` | output | 1 | 66,370 | 6 | 132,741 |
Provide a correct Python 3 solution for this coding contest problem.
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
The text includes only alphabetical ch... | instruction | 0 | 66,371 | 6 | 132,742 |
"Correct Solution:
```
x=input().split()
longestWord= ""
mostWord=0
currentCount=0
THEmostWord=""
for r in range (len(x)):
if len(x[r])> len(longestWord):
longestWord=x[r]
for j in range (len(x)):
currentCount=x.count(x[j])
if currentCount > mostWord:
mostWord= currentCount
THEmost... | output | 1 | 66,371 | 6 | 132,743 |
Provide a correct Python 3 solution for this coding contest problem.
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
The text includes only alphabetical ch... | instruction | 0 | 66,373 | 6 | 132,746 |
"Correct Solution:
```
from collections import defaultdict as dd
a=dd(int)
freq=0
leng=""
seq=""
b=input().split()
for i in b:
a[i]+=1
if a[seq]<a[i]:
seq=i
if len(leng)<len(i):
leng=i
print(seq,leng)
``` | output | 1 | 66,373 | 6 | 132,747 |
Provide a correct Python 3 solution for this coding contest problem.
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
The text includes only alphabetical ch... | instruction | 0 | 66,374 | 6 | 132,748 |
"Correct Solution:
```
text = input().split()
l = {}
dc = {}
for i in text:
l[i] = len(i)
if i in dc.keys():
dc[i] += 1
else:
dc[i] = 0
print(max(dc, key=dc.get), max(l, key=l.get))
``` | output | 1 | 66,374 | 6 | 132,749 |
Provide a correct Python 3 solution for this coding contest problem.
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
The text includes only alphabetical ch... | instruction | 0 | 66,375 | 6 | 132,750 |
"Correct Solution:
```
from collections import Counter
s = list(input().split())
c = Counter(s)
n,m = 0,0
for e in s:
if n < len(e):
n = len(e)
m = e
print(c.most_common()[0][0],m)
``` | output | 1 | 66,375 | 6 | 132,751 |
Provide a correct Python 3 solution for this coding contest problem.
Your task is to write a program which reads a text and prints two words. The first one is the word which is arise most frequently in the text. The second one is the word which has the maximum number of letters.
The text includes only alphabetical ch... | instruction | 0 | 66,377 | 6 | 132,754 |
"Correct Solution:
```
import collections
x = input().split()
c = collections.Counter(x)
max = 0
for i in range(len(x)):
a = len(x[i])
if a>max:
max = a
M = x[i]
print(c.most_common()[0][0], M)
``` | output | 1 | 66,377 | 6 | 132,755 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,985 | 6 | 133,970 |
Tags: implementation, strings
Correct Solution:
```
e=int(input())
print(len(set([''.join(sorted(list(set(x)))) for x in input().split()])))
``` | output | 1 | 66,985 | 6 | 133,971 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,986 | 6 | 133,972 |
Tags: implementation, strings
Correct Solution:
```
ar = []
n = int(input())
a = list(input().split())
for i in a:
temp = set(i)
temp = "".join(sorted(temp))
if temp not in ar:
ar.append(temp)
print(len(ar))
``` | output | 1 | 66,986 | 6 | 133,973 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,987 | 6 | 133,974 |
Tags: implementation, strings
Correct Solution:
```
import atexit
import io
import sys
# Buffering IO
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER
@atexit.register
def write():
sys.__stdout__.write(_OUTPUT_BUFFER.getval... | output | 1 | 66,987 | 6 | 133,975 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,988 | 6 | 133,976 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
l = list(map(set, input().split(' ')))
s = list()
for i in l:
if not i in s:
s.append(i)
print(len(s))
``` | output | 1 | 66,988 | 6 | 133,977 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,989 | 6 | 133,978 |
Tags: implementation, strings
Correct Solution:
```
n=int(input())
ar=input().split()
z=set()
for x in ar:
x=list(x)
x.sort()
x=''.join(list(set(''.join(x))))
z.add(x)
print(len(z))
``` | output | 1 | 66,989 | 6 | 133,979 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,990 | 6 | 133,980 |
Tags: implementation, strings
Correct Solution:
```
n = int(input())
s = {''.join(sorted(set(s))) for s in input().split()}
print(len(s))
``` | output | 1 | 66,990 | 6 | 133,981 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,991 | 6 | 133,982 |
Tags: implementation, strings
Correct Solution:
```
n = input()
s = input().split()
a = set()
list = []
for i in s:
if set(i) not in list:
list.append(set(i))
print(len(list))
``` | output | 1 | 66,991 | 6 | 133,983 |
Provide tags and a correct Python 3 solution for this coding contest problem.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all its permutations represent the same object.
*... | instruction | 0 | 66,992 | 6 | 133,984 |
Tags: implementation, strings
Correct Solution:
```
def f():
n = int(input())
b = []
x = input().split()
for i in range(n):
a = x[i]
a = list(set([i for i in a]))
b.append(frozenset(a))
b = list(set(b))
print(b.__len__())
f()
``` | output | 1 | 66,992 | 6 | 133,985 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,993 | 6 | 133,986 |
Yes | output | 1 | 66,993 | 6 | 133,987 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,994 | 6 | 133,988 |
Yes | output | 1 | 66,994 | 6 | 133,989 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,995 | 6 | 133,990 |
Yes | output | 1 | 66,995 | 6 | 133,991 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,996 | 6 | 133,992 |
Yes | output | 1 | 66,996 | 6 | 133,993 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,997 | 6 | 133,994 |
No | output | 1 | 66,997 | 6 | 133,995 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,998 | 6 | 133,996 |
No | output | 1 | 66,998 | 6 | 133,997 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 66,999 | 6 | 133,998 |
No | output | 1 | 66,999 | 6 | 133,999 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
In Aramic language words can only represent objects.
Words in Aramic have special properties:
* A word is a root if it does not contain the same letter more than once.
* A root and all i... | instruction | 0 | 67,000 | 6 | 134,000 |
No | output | 1 | 67,000 | 6 | 134,001 |
Provide tags and a correct Python 3 solution for this coding contest problem.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources contain comments, extra whitespace (including t... | instruction | 0 | 67,283 | 6 | 134,566 |
Tags: greedy, implementation
Correct Solution:
```
from collections import defaultdict
n = int(input())
reserved = set(input().split())
m = int(input())
lines = [ input().split('#')[0].split() for _ in range(m) ]
tokens = sum(lines, [])
def isword(t):
return not t[0].isdigit() and all(c.isalnum() or c == '_' or c ... | output | 1 | 67,283 | 6 | 134,567 |
Provide tags and a correct Python 3 solution for this coding contest problem.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources contain comments, extra whitespace (including t... | instruction | 0 | 67,284 | 6 | 134,568 |
Tags: greedy, implementation
Correct Solution:
```
def main():
t = int(input())
reserved = set(input().split())
lines = int(input())
code = ''
for i in range(lines):
code += input() + '\n'
def is_word(suspect):
if suspect[0].isdigit(): return False
for x in suspect:
if (not x.isalpha()) and (not x in {... | output | 1 | 67,284 | 6 | 134,569 |
Provide tags and a correct Python 3 solution for this coding contest problem.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources contain comments, extra whitespace (including t... | instruction | 0 | 67,285 | 6 | 134,570 |
Tags: greedy, implementation
Correct Solution:
```
#!/usr/bin/python3
input()
reserved = input().split(' ')
lines = int(input())
numbers = '0123456789'
let = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890_$'
def wytnij_res(slowo):
r = ''
for res in reserved:
if len(res) > len(r) and slowo.starts... | output | 1 | 67,285 | 6 | 134,571 |
Provide tags and a correct Python 3 solution for this coding contest problem.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources contain comments, extra whitespace (including t... | instruction | 0 | 67,286 | 6 | 134,572 |
Tags: greedy, implementation
Correct Solution:
```
#!/usr/bin/env python3
import sys
n, reserved, m, *lines = sys.stdin.readlines()
n = int(n)
reserved = set(reserved.split())
m = int(m)
#assert len(lines) == m
def strip_comment(line):
return line[:-1].split('#', maxsplit=1)[0]
lines = ' '.join(map(strip_comment,... | output | 1 | 67,286 | 6 | 134,573 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources ... | instruction | 0 | 67,287 | 6 | 134,574 |
No | output | 1 | 67,287 | 6 | 134,575 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources ... | instruction | 0 | 67,288 | 6 | 134,576 |
No | output | 1 | 67,288 | 6 | 134,577 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
International Coding Procedures Company (ICPC) writes all its code in Jedi Script (JS) programming language. JS does not get compiled, but is delivered for execution in its source form. Sources ... | instruction | 0 | 67,289 | 6 | 134,578 |
No | output | 1 | 67,289 | 6 | 134,579 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.