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 |
|---|---|---|---|---|---|
Provide a correct Python 3 solution for this coding contest problem.
A: Alphabet block
Wakana Nakawa loves palindromes. Because my name is also a palindrome.
Wakana got a set with some alphabet blocks. An alphabet block is a block in which one lowercase alphabet is written for each block, and you can create your fav... | instruction | 0 | 100,289 | 6 | 200,578 |
"Correct Solution:
```
# AOJ 2816: Alphabet Block
# Python3 2018.7.11 bal4u
dic = {}
S = list(input())
for s in S:
if s not in dic: dic[s] = 1
else: dic[s] += 1
ans = 0
for k in list(dic.keys()):
if dic[k] & 1: ans += 1
print(ans>>1)
``` | output | 1 | 100,289 | 6 | 200,579 |
Provide a correct Python 3 solution for this coding contest problem.
A: Alphabet block
Wakana Nakawa loves palindromes. Because my name is also a palindrome.
Wakana got a set with some alphabet blocks. An alphabet block is a block in which one lowercase alphabet is written for each block, and you can create your fav... | instruction | 0 | 100,290 | 6 | 200,580 |
"Correct Solution:
```
import collections
print(sum([v%2 for v in collections.Counter(input()).values()])//2)
``` | output | 1 | 100,290 | 6 | 200,581 |
Provide a correct Python 3 solution for this coding contest problem.
A: Alphabet block
Wakana Nakawa loves palindromes. Because my name is also a palindrome.
Wakana got a set with some alphabet blocks. An alphabet block is a block in which one lowercase alphabet is written for each block, and you can create your fav... | instruction | 0 | 100,291 | 6 | 200,582 |
"Correct Solution:
```
s=input()
cnt=[0 for _ in[0]*26]
for c in s:
cnt[ord(c)-ord('a')]+=1
odd=0
for i in range(26):
if cnt[i] & 1:
odd+=1
print((odd>>1))
``` | output | 1 | 100,291 | 6 | 200,583 |
Provide a correct Python 3 solution for this coding contest problem.
A: Alphabet block
Wakana Nakawa loves palindromes. Because my name is also a palindrome.
Wakana got a set with some alphabet blocks. An alphabet block is a block in which one lowercase alphabet is written for each block, and you can create your fav... | instruction | 0 | 100,292 | 6 | 200,584 |
"Correct Solution:
```
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
from collections import Counter
s = ns()
c = Counter(s)
ans = 0
for i in c.v... | output | 1 | 100,292 | 6 | 200,585 |
Provide a correct Python 3 solution for this coding contest problem.
A: Alphabet block
Wakana Nakawa loves palindromes. Because my name is also a palindrome.
Wakana got a set with some alphabet blocks. An alphabet block is a block in which one lowercase alphabet is written for each block, and you can create your fav... | instruction | 0 | 100,293 | 6 | 200,586 |
"Correct Solution:
```
S = input()
dict = {}
for i in range(len(S)):
if(S[i] in dict):
dict[S[i]] += 1
else:
dict[S[i]] = 1
l = list(dict.values())
cnt = 0
for i in range(len(l)):
if(l[i] % 2 != 0):
cnt += 1
print(cnt // 2)
``` | output | 1 | 100,293 | 6 | 200,587 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
A: Alphabet block
Wakana Nakawa loves palindromes. Because my name is also a palindrome.
Wakana got a set with some alphabet blocks. An alphabet block is a block in which one lowercase alphabe... | instruction | 0 | 100,294 | 6 | 200,588 |
No | output | 1 | 100,294 | 6 | 200,589 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a programming language in which every program is a non-empty sequence of "<" and ">" signs and digits. Let's explain how the interpreter of this programming language works. A program is interpreted using movement of instruction poin... | instruction | 0 | 100,626 | 6 | 201,252 |
Tags: brute force, implementation
Correct Solution:
```
n, q = map(int, input().split())
s = input()
for _ in range(q):
l, r = map(int, input().split())
t = list(s[l-1:r])
p, d = 0, 1
res = [0] * 10
while 0 <= p < len(t):
if '0' <= t[p] <= '9':
k = int(t[p])
res[k] +=... | output | 1 | 100,626 | 6 | 201,253 |
Provide tags and a correct Python 3 solution for this coding contest problem.
There is a programming language in which every program is a non-empty sequence of "<" and ">" signs and digits. Let's explain how the interpreter of this programming language works. A program is interpreted using movement of instruction poin... | instruction | 0 | 100,627 | 6 | 201,254 |
Tags: brute force, implementation
Correct Solution:
```
n,Q = map(int,input().strip().split())
s = input()
d = 1
for q in range(Q):
arr = [0]*(10)
l,r = map(int,input().strip().split())
su = ""
for i in range(l-1,r):
su+=s[i]
su = list(su)
i = 0
d = 1
#print(su)
ll = 0
... | output | 1 | 100,627 | 6 | 201,255 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,720 | 6 | 201,440 |
Tags: implementation, strings
Correct Solution:
```
n,m=map(int,input().split(" "))
a=[input() for x in range(n)]
print(sum(sorted(a[x][y:y+2]+a[x+1][y:y+2])==sorted("face") for x in range(n-1) for y in range(m-1)))
``` | output | 1 | 100,720 | 6 | 201,441 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,721 | 6 | 201,442 |
Tags: implementation, strings
Correct Solution:
```
n, m = map(int, input().split())
table = []
for i in range(n):
table.append(input())
ans = 0
for i in range(n - 1):
for j in range(m - 1):
di = [0, 0, 1, 1]
dj = [0, 1, 0, 1]
d = {}
for k in range(4):
c = table[i + ... | output | 1 | 100,721 | 6 | 201,443 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,722 | 6 | 201,444 |
Tags: implementation, strings
Correct Solution:
```
r, c = map(lambda x: int(x) ,input().split())
img = []
for i in range(r):
img.append([])
line = input()
for j in range(c):
img[i].append(line[j])
count=0
for i in range(r-1):
for j in range(c-1):
test = [img[i][j], img[i+1][j], img[i... | output | 1 | 100,722 | 6 | 201,445 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,723 | 6 | 201,446 |
Tags: implementation, strings
Correct Solution:
```
x = list(map(int, input().split(' ')))
n, m = x[0], x[1]
a = []
for i in range(n):
a.append(input())
def check(x, y):
mp = set()
for i in range(x-1, x+1):
for j in range(y-1, y+1):
mp.add(a[i][j])
return ('f' in mp) and ('a' in mp... | output | 1 | 100,723 | 6 | 201,447 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,724 | 6 | 201,448 |
Tags: implementation, strings
Correct Solution:
```
n,m = map(int,input().split())
a = []
c = 0
for i in range(n):
s = list(input())
a.append(s)
#print(a)
for i in range(m-1):
for j in range(n-1):
s = a[j][i] + a[j+1][i] + a[j][i+1] + a[j+1][i+1]
s = sorted(s)
s = ''.join(s)
#print(s)
if(s == "acef"):
... | output | 1 | 100,724 | 6 | 201,449 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,725 | 6 | 201,450 |
Tags: implementation, strings
Correct Solution:
```
n, m =map(int, input().split())
x=[]
for i in range(n):
x.append(input())
c = 0
for i in range(n-1):
for j in range(m-1):
k = [x[i][j], x[i+1][j], x[i][j+1], x[i+1][j+1]]
if ''.join(sorted(k)) == 'acef':
c += 1
print(c)
'''
iterate through all 2 by... | output | 1 | 100,725 | 6 | 201,451 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,726 | 6 | 201,452 |
Tags: implementation, strings
Correct Solution:
```
from sys import stdin
n, m = map(int, stdin.readline().split())
a = []
for i in range(0, n):
a.append(stdin.readline())
res = 0
for i in range(0, n - 1):
for j in range(0, m - 1):
r = [a[i][j], a[i][j + 1], a[i + 1][j], a[i + 1][j + 1]]
... | output | 1 | 100,726 | 6 | 201,453 |
Provide tags and a correct Python 3 solution for this coding contest problem.
The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them.
In this problem an image is a rectangu... | instruction | 0 | 100,727 | 6 | 201,454 |
Tags: implementation, strings
Correct Solution:
```
n, m = (int(x) for x in input().split())
a = []
for i in range(n):
a.append(input().strip())
ans = 0
for i in range(n-1):
for j in range(m-1):
if sorted([a[i][j], a[i+1][j], a[i][j+1], a[i+1][j+1]]) == sorted(['f', 'a', 'c', 'e']):
ans += 1
print(ans)
``` | output | 1 | 100,727 | 6 | 201,455 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,870 | 6 | 201,740 |
Tags: implementation
Correct Solution:
```
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import... | output | 1 | 100,870 | 6 | 201,741 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,871 | 6 | 201,742 |
Tags: implementation
Correct Solution:
```
import re
n,m=list(map(int,input().split()))
s=input()
for _ in range(m):
l,r,a,b=input().strip().split()
l,r=int(l),int(r)
s=s[:l-1]+re.sub(a,b,s[l-1:r])+s[r:]
print(s)
``` | output | 1 | 100,871 | 6 | 201,743 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,872 | 6 | 201,744 |
Tags: implementation
Correct Solution:
```
n,m=list(map(int,input().split()))
z=list(input())
for i in range(m):
l,r,c1,c2=input().split()
l=int(l)
r=int(r)
for i in range(l-1,r):
if z[i]==c1:
z[i]=c2
print("".join(z))
``` | output | 1 | 100,872 | 6 | 201,745 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,873 | 6 | 201,746 |
Tags: implementation
Correct Solution:
```
n, m = map(int, input().split())
s = input()
for _ in range(m):
l, r, c1, c2 = input().split()
for i in range(int(l)-1, int(r)):
if s[i]==c1:
s=s[:i]+c2+s[i+1:]
print(s)
``` | output | 1 | 100,873 | 6 | 201,747 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,874 | 6 | 201,748 |
Tags: implementation
Correct Solution:
```
n,m = map(int,input().split())
k = list(input())
for i in range(m):
l = input().split()
for j in range(int(l[0])-1,int(l[1])):
if k[j]==l[2]:
k[j]=l[3]
f = ''.join(k)
print(f)
``` | output | 1 | 100,874 | 6 | 201,749 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,875 | 6 | 201,750 |
Tags: implementation
Correct Solution:
```
#Codeforce 897A
n,m = (int(v) for v in input().split())
x=[v for v in input().strip("\n\r")]
ans=""
for i in range(m):
l,r,c_1,c_2 = (v for v in input().split())
for j in range(int(l)-1,int(r)):
if x[j] == c_1:
x[j] = c_2
else:
p... | output | 1 | 100,875 | 6 | 201,751 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,876 | 6 | 201,752 |
Tags: implementation
Correct Solution:
```
n, m = map(int, input().split())
string = list(input())
for i in range(m):
a, b, x, y = input().split()
a = int(a)
b = int(b)
for j in range(a - 1, b):
if string[j] == x:
string[j] = y
print("".join(string))
``` | output | 1 | 100,876 | 6 | 201,753 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building in island No.28, however, neither of them know... | instruction | 0 | 100,877 | 6 | 201,754 |
Tags: implementation
Correct Solution:
```
import bisect
def list_output(s):
print(' '.join(map(str, s)))
def list_input(s='int'):
if s == 'int':
return list(map(int, input().split()))
elif s == 'float':
return list(map(float, input().split()))
return list(map(str, input().... | output | 1 | 100,877 | 6 | 201,755 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building... | instruction | 0 | 100,881 | 6 | 201,762 |
Yes | output | 1 | 100,881 | 6 | 201,763 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
Are you going to Scarborough Fair?
Parsley, sage, rosemary and thyme.
Remember me to one who lives there.
He once was the true love of mine.
Willem is taking the girl to the highest building... | instruction | 0 | 100,882 | 6 | 201,764 |
No | output | 1 | 100,882 | 6 | 201,765 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,384 | 6 | 202,768 |
Tags: implementation, sortings, strings
Correct Solution:
```
a = input
if(sorted(a()+a())==sorted(a())):
print("YES")
else:
print("NO")
``` | output | 1 | 101,384 | 6 | 202,769 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,385 | 6 | 202,770 |
Tags: implementation, sortings, strings
Correct Solution:
```
a=list(input())
b=list(input())
s=a+b
s.sort()
s=' '.join(s)
f=list(input())
f.sort()
f=' '.join(f)
if s==f:
print('YES')
else :
print('NO')
``` | output | 1 | 101,385 | 6 | 202,771 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,386 | 6 | 202,772 |
Tags: implementation, sortings, strings
Correct Solution:
```
g=list(str(i) for i in input())
h=list(str(i) for i in input())
m=list(str(i) for i in input())
g.extend(h)
m.sort()
g.sort()
if m==g:
print("YES")
else:
print("NO")
``` | output | 1 | 101,386 | 6 | 202,773 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,387 | 6 | 202,774 |
Tags: implementation, sortings, strings
Correct Solution:
```
s=input()+input();t=input()
print('YES' if sorted(s)==sorted(t) else 'NO')
``` | output | 1 | 101,387 | 6 | 202,775 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,388 | 6 | 202,776 |
Tags: implementation, sortings, strings
Correct Solution:
```
am=input()
bm=input()
cm=input()
a=[]
b=[]
c=[]
for i in range(len(am)):
a.append(am[i])
for i in range(len(bm)):
b.append(bm[i])
for i in range(len(cm)):
c.append(cm[i])
bo=0
for i in range(len(a)):
if a[i] in c:
c.remove(a[i])
e... | output | 1 | 101,388 | 6 | 202,777 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,389 | 6 | 202,778 |
Tags: implementation, sortings, strings
Correct Solution:
```
q=input()
w=input()
e=input()
r=q+w
if len(e)!=len(w+q):
print('NO')
else:
for i in set(r):
if r.count(i)!=e.count(i):
print('NO')
break
else:
print('YES')
``` | output | 1 | 101,389 | 6 | 202,779 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,390 | 6 | 202,780 |
Tags: implementation, sortings, strings
Correct Solution:
```
n = input()
m = input()
b = input()
n1 = n
m1 = m
b1 =b
k=0
for i in range(len(n)):
for j in range(len(b)):
if n[i]==b[j]:
n1 = b[j]
b = b.replace(n[i], "0", 1)
n = n.replace(n1,"0",1)
for i in r... | output | 1 | 101,390 | 6 | 202,781 |
Provide tags and a correct Python 3 solution for this coding contest problem.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the letters from the guest's name and the host's na... | instruction | 0 | 101,391 | 6 | 202,782 |
Tags: implementation, sortings, strings
Correct Solution:
```
guest = input()
host = input()
initialname = guest + host
pile = input()
error = 0
if len(pile)!=len(initialname):
print('NO')
else:
s = set(initialname)
for x in s:
if initialname.count(x) != pile.count(x):
print('NO')
... | output | 1 | 101,391 | 6 | 202,783 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,392 | 6 | 202,784 |
Yes | output | 1 | 101,392 | 6 | 202,785 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,393 | 6 | 202,786 |
Yes | output | 1 | 101,393 | 6 | 202,787 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,394 | 6 | 202,788 |
Yes | output | 1 | 101,394 | 6 | 202,789 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,395 | 6 | 202,790 |
Yes | output | 1 | 101,395 | 6 | 202,791 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,396 | 6 | 202,792 |
No | output | 1 | 101,396 | 6 | 202,793 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,397 | 6 | 202,794 |
No | output | 1 | 101,397 | 6 | 202,795 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,398 | 6 | 202,796 |
No | output | 1 | 101,398 | 6 | 202,797 |
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response.
So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet, thear assistants cut out of cardboard the ... | instruction | 0 | 101,399 | 6 | 202,798 |
No | output | 1 | 101,399 | 6 | 202,799 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,529 | 6 | 203,058 |
Tags: implementation
Correct Solution:
```
s = input()
if s == s[::-1] and not 'N' in s and not 'L' in s and not'G' in s and not 'F' in s and not 'R' in s and not 'S' in s and not 'C' in s and not 'Q' in s and not 'B' in s and not 'E' in s and not 'D' in s and not 'J' in s and not 'K' in s and not 'Z' in s and not 'P' ... | output | 1 | 101,529 | 6 | 203,059 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,530 | 6 | 203,060 |
Tags: implementation
Correct Solution:
```
cup = set('AHIMOTUVWXY')
s = input()
if not set(s).issubset(cup):
print('NO')
exit()
ls = list(s)
ls.reverse()
t = ''.join(ls)
if s == t:
print('YES')
else:
print('NO')
``` | output | 1 | 101,530 | 6 | 203,061 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,531 | 6 | 203,062 |
Tags: implementation
Correct Solution:
```
def main():
name = input()
s = ('B', 'C', 'D', 'E', 'F', 'G', 'J', 'K', 'L', 'N', 'P', 'Q', 'R', 'S', 'Z')
for ch in s:
if ch in name:
print('NO')
return
if name[:len(name) // 2] != name[::-1][:len(name) // 2]:
print('NO'... | output | 1 | 101,531 | 6 | 203,063 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,532 | 6 | 203,064 |
Tags: implementation
Correct Solution:
```
class CodeforcesTask421BSolution:
def __init__(self):
self.result = ''
self.name = ''
def read_input(self):
self.name = input()
def process_task(self):
symetric = "AHIMOTUVWXY"
origin = self.name[len(self.name) // 2 + len(s... | output | 1 | 101,532 | 6 | 203,065 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,533 | 6 | 203,066 |
Tags: implementation
Correct Solution:
```
i=input()
n=len(i)
d="BCDEFGJKLNPQRSZ"
for x in i:
if x in d:
print("NO")
break
else:
for x in range(n // 2):
if i[x] != i[n - x - 1]:
print("NO")
break
else:
print("YES")
``` | output | 1 | 101,533 | 6 | 203,067 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,534 | 6 | 203,068 |
Tags: implementation
Correct Solution:
```
l=input()
print(["NO","YES"][all([p in "AHIMOTUVWXY"for p in l])and l==l[::-1]])
# Made By Mostafa_Khaled
``` | output | 1 | 101,534 | 6 | 203,069 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,535 | 6 | 203,070 |
Tags: implementation
Correct Solution:
```
# Name : Sachdev Hitesh
# College : GLSICA
user = input()
resu = user[::-1]
s = len(user)
#print(s)
c = 0
if user == resu:
for i in user:
if i == 'A' or i == 'H' or i == 'I' or i == 'O' or i == 'T' or i == 'V' or \
i == 'W' or i == 'X' or i == 'Y' or i == 'M' or i == 'U'... | output | 1 | 101,535 | 6 | 203,071 |
Provide tags and a correct Python 3 solution for this coding contest problem.
Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?
The market analysts came up with a very smart plan: the name of the company sho... | instruction | 0 | 101,536 | 6 | 203,072 |
Tags: implementation
Correct Solution:
```
s = input()
l = {'A', 'H', 'I', 'M', 'O', 'T', 'U', 'V', 'W', 'X', 'Y'}
i = 0
j = len(s) - 1
y = True
while i <= j:
if s[i] != s[j] or s[i] not in l:
y = False
break
i += 1
j -= 1
if y:
print('YES')
else:
print('NO')
``` | output | 1 | 101,536 | 6 | 203,073 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.