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 tags and a correct Python 3 solution for this coding contest problem. Patrick has just finished writing a message to his sweetheart Stacey when he noticed that the message didn't look fancy. Patrick was nervous while writing the message, so some of the letters there were lowercase and some of them were upperca...
instruction
0
16,249
6
32,498
Tags: dp Correct Solution: ``` s=input() n=len(s) if all(i.isupper() for i in s): print(0) exit() if all(i.islower() for i in s): print(0) exit() pres=[0]*n pre=[0]*n if s[0].isupper(): pre[0]=1 else: pres[0]=1 for i in range(1,n): pre[i]=pre[i-1]+(s[i].isupper()) pres[i]=pres[i-1]+(s...
output
1
16,249
6
32,499
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Patrick has just finished writing a message to his sweetheart Stacey when he noticed that the message didn't look fancy. Patrick was nervous while writing the message, so some of the letters the...
instruction
0
16,253
6
32,506
Yes
output
1
16,253
6
32,507
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Patrick has just finished writing a message to his sweetheart Stacey when he noticed that the message didn't look fancy. Patrick was nervous while writing the message, so some of the letters the...
instruction
0
16,256
6
32,512
No
output
1
16,256
6
32,513
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,362
6
32,724
Tags: dfs and similar, graphs, sortings Correct Solution: ``` #http://codeforces.com/contest/510/problem/C #https://www.quora.com/What-is-the-algorithmic-approach-to-solve-the-Codeforces-problem-Fox-and-Names #Great problem, tests for cycles and also involves topological sorting n=int(input()) strings=[] for i in ...
output
1
16,362
6
32,725
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,363
6
32,726
Tags: dfs and similar, graphs, sortings Correct Solution: ``` import string from collections import defaultdict def solve(n, s): g = defaultdict(set) edges = [] for i in range(n - 1): condition = None for ca, cb in zip(s[i], s[i + 1]): if ca == cb: continue ...
output
1
16,363
6
32,727
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,364
6
32,728
Tags: dfs and similar, graphs, sortings Correct Solution: ``` #import sys #sys.stdin = open('in.txt') #sys.setrecursionlimit(10000) def isPrefix(sa, sb): if len(sa) >= len(sb): return False return sa == sb[0:len(sa)] def getOrder(sa, sb): for i in range(min(len(sa), len(sb))): if sa[i] != s...
output
1
16,364
6
32,729
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,365
6
32,730
Tags: dfs and similar, graphs, sortings Correct Solution: ``` # https://codeforces.com/problemset/problem/510/C import heapq def kahn(graph): V = len(graph) in_degree = [0] * V for i in range(V): for j in graph[i]: in_degree[j] += 1 zero_in_degree = [] for i in range(V): ...
output
1
16,365
6
32,731
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,366
6
32,732
Tags: dfs and similar, graphs, sortings Correct Solution: ``` from collections import defaultdict, Counter if __name__ == "__main__": G = defaultdict(set) names = [input() for _ in range(int(input()))] last = names[0] has_in = Counter() total = set([]) impossible = False for name in na...
output
1
16,366
6
32,733
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,367
6
32,734
Tags: dfs and similar, graphs, sortings Correct Solution: ``` from sys import stdin,stdout inp=stdin.readline op=stdout.write n=int(inp()) st=[] for i in range(n): temp=list(inp()[:-1]) st.append(temp) alph=list("abcdefghijklmnopqrstuvwxyz") g={alph[i]:[] for i in range(26)} pos=0 flag=1 for i in range(n-1): ...
output
1
16,367
6
32,735
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,368
6
32,736
Tags: dfs and similar, graphs, sortings Correct Solution: ``` import queue from collections import defaultdict from string import ascii_lowercase n = int(input()) x = [input() for i in range(n)] post = defaultdict(lambda: set()) prior = defaultdict(lambda: set()) for i in range(n): for j in range(i + 1, n): ...
output
1
16,368
6
32,737
Provide tags and a correct Python 3 solution for this coding contest problem. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. After checking some examples, she found out t...
instruction
0
16,369
6
32,738
Tags: dfs and similar, graphs, sortings Correct Solution: ``` import string import sys input = sys.stdin.readline def getInts(): return [int(s) for s in input().split()] def getInt(): return int(input()) def getStrs(): return [s for s in input().split()] def getStr(): return input().strip() def lis...
output
1
16,369
6
32,739
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,370
6
32,740
Yes
output
1
16,370
6
32,741
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,371
6
32,742
Yes
output
1
16,371
6
32,743
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,372
6
32,744
Yes
output
1
16,372
6
32,745
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,373
6
32,746
Yes
output
1
16,373
6
32,747
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,374
6
32,748
No
output
1
16,374
6
32,749
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,375
6
32,750
No
output
1
16,375
6
32,751
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,376
6
32,752
No
output
1
16,376
6
32,753
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. ...
instruction
0
16,377
6
32,754
No
output
1
16,377
6
32,755
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,531
6
33,062
Tags: dp Correct Solution: ``` n = int(input()) dp = [1] + [0] * n p = input() for _ in range(n - 1): if p == 'f': dp = [0] + dp[:n - 1] else: for i in range(n - 2, -1, -1): dp[i] = (dp[i] + dp[i + 1]) % (10**9+7) p = input() print(sum(dp) % (10**9+7)) ```
output
1
16,531
6
33,063
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,532
6
33,064
Tags: dp Correct Solution: ``` import sys if __name__ == '__main__': n = int(input()) statements = [input() for _ in range(n)] if statements[-1] == 'f': print(0) sys.exist(0) if n == 1: print(1) sys.exit(0) max_level = [1] * n idx = 1 for i in range(n): ...
output
1
16,532
6
33,065
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,533
6
33,066
Tags: dp Correct Solution: ``` n = int(input().rstrip()) arr = [] mod = pow(10,9) + 7 indent_num = 0 for i in range(n): arr.append(input().rstrip()) if arr[i] == 'f': indent_num += 1 dp = [0 for i in range(indent_num + 1)] max_indent = 0 #print(dp) cur_indent = 0 pref = [0 for i in range(indent_num + 1...
output
1
16,533
6
33,067
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,534
6
33,068
Tags: dp Correct Solution: ``` def add(a,b): a = a%(1000000000+7) b=b%(1000000000+7) return (a+b)%(1000000000+7) n =int(input()) i=1 statements = [] dp = [[0 for i in range(n)] for i in range(n)] prefix = [[0 for i in range(n)] for i in range(n)] while(i<=n): s = input() statements.append(s) i+=1 dp[0][0]=1 ...
output
1
16,534
6
33,069
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,535
6
33,070
Tags: dp Correct Solution: ``` """ Problem from: http://codeforces.com/problemset/problem/909/C C. Python Indentation time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end ...
output
1
16,535
6
33,071
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,536
6
33,072
Tags: dp Correct Solution: ``` from sys import stdin,stdout,setrecursionlimit stdin.readline def mp(): return list(map(int, stdin.readline().strip().split())) def it():return int(stdin.readline().strip()) from collections import defaultdict as dd,Counter as C,deque from math import ceil,gcd,sqrt,factorial,log2,floor f...
output
1
16,536
6
33,073
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,537
6
33,074
Tags: dp Correct Solution: ``` n = int(input()) s = [0 for _ in range(n)] for i in range(n): s[i] = input() dp = [[0 for _ in range(n+1)] for _ in range(n+1)] dp[0][0] = 1 for i in range(n): if s[i] == "s": sums = 0 for j in reversed(range(n)): sums = (sums + dp[i][j]) % 1000000007 ...
output
1
16,537
6
33,075
Provide tags and a correct Python 3 solution for this coding contest problem. In Python, code blocks don't have explicit begin/end or curly braces to mark beginning and end of the block. Instead, code blocks are defined by indentation. We will consider an extremely simplified subset of Python with only two types of s...
instruction
0
16,538
6
33,076
Tags: dp Correct Solution: ``` n = int(input().rstrip()) arr = [] mod = pow(10,9) + 7 indent_num = 0 for i in range(n): arr.append(input().rstrip()) if arr[i] == 'f': indent_num += 1 dp = [0 for i in range(indent_num + 1)] first_block_index = 0 max_indent = 0 for i in arr: if i != 'f': break...
output
1
16,538
6
33,077
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,844
6
33,688
Tags: hashing, strings Correct Solution: ``` from collections import Counter n = int(input()) mp = Counter({'': 0}) for i in range(n): string = input() occ = [0] * 26 for c in string: occ[ord(c) - ord('a')] += 1 if occ[ord(c) - ord('a')] == 2: occ[ord(c) - ord('a')] = 0 cl...
output
1
16,844
6
33,689
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,845
6
33,690
Tags: hashing, strings Correct Solution: ``` n = int(input()) string_count = {} for _ in range(n): s = str(input()) item_count={} for i,c in enumerate(s): item_count[c]=item_count.get(c,0)+1 s0=[] for i,x in enumerate('abcdefghijklmnopqrstuvwxyz'): if item_count.get(x,0)%2==1: ...
output
1
16,845
6
33,691
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,846
6
33,692
Tags: hashing, strings Correct Solution: ``` from collections import Counter s=[] for i in range(int(input())): x=[0]*26 for j in input().strip(): x[ord(j)-97]^=1 s.append(''.join([str(y) for y in x ])) z=Counter(s) #print(s) an=0 for j in s: x=list(j) for q in range(len(x)): if...
output
1
16,846
6
33,693
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,847
6
33,694
Tags: hashing, strings Correct Solution: ``` def main(): n = int(input()) ans = 0 d = {} for i in range(n): s = input() cur = 0 for c in s: cur ^= (1 << (ord(c) - ord('a'))) ans += d.get(cur, 0) for j in range(26): ans += d.get(cur ^ (1 << ...
output
1
16,847
6
33,695
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,848
6
33,696
Tags: hashing, strings Correct Solution: ``` from collections import * import os, sys from io import BytesIO, IOBase class FastIO(IOBase): newlines = 0 def __init__(self, file): self._fd = file.fileno() self.buffer = BytesIO() self.writable = "x" in file.mode or "r" not in file.mode ...
output
1
16,848
6
33,697
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,849
6
33,698
Tags: hashing, strings Correct Solution: ``` N = int(input()) repo = {} # empty dictionary total_count = 0 for i in range(N): val = input() # we need to convert val into 01010101010101010101010101 # use bit-wise num = 0 for c in val: index = ord(c) - ord('a') num ^= (1 << index) # ...
output
1
16,849
6
33,699
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,850
6
33,700
Tags: hashing, strings Correct Solution: ``` def zamien(S): A = 26*[0] for znak in S: A[ord(znak)-ord('a')] += 1 return ''.join([str(i%2) for i in A]) def mainn(): A = {} wynik = 0 for i in range(int(input())): s = zamien(input()) wynik ...
output
1
16,850
6
33,701
Provide tags and a correct Python 3 solution for this coding contest problem. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). She has learned how to check for a given string ...
instruction
0
16,851
6
33,702
Tags: hashing, strings Correct Solution: ``` n=int(input()) a= {} ans=0 for i in range(n): d=0 st=input() for j in st: d^=1<<(ord(j)-ord("a")) ans+=a.get(d,0) for k in range(26): ans+=a.get(d^(1<<k),0) t=a.get(d,0)+1 a[d]=t print(ans) ```
output
1
16,851
6
33,703
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,852
6
33,704
Yes
output
1
16,852
6
33,705
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,853
6
33,706
Yes
output
1
16,853
6
33,707
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,854
6
33,708
Yes
output
1
16,854
6
33,709
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,855
6
33,710
Yes
output
1
16,855
6
33,711
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,856
6
33,712
No
output
1
16,856
6
33,713
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,857
6
33,714
No
output
1
16,857
6
33,715
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,858
6
33,716
No
output
1
16,858
6
33,717
Evaluate the correctness of the submitted Python 3 solution to the coding contest problem. Provide a "Yes" or "No" response. After learning a lot about space exploration, a little girl named Ana wants to change the subject. Ana is a girl who loves palindromes (string that can be read the same backwards as forward). S...
instruction
0
16,859
6
33,718
No
output
1
16,859
6
33,719
Provide tags and a correct Python 3 solution for this coding contest problem. Ivan wants to play a game with you. He picked some string s of length n consisting only of lowercase Latin letters. You don't know this string. Ivan has informed you about all its improper prefixes and suffixes (i.e. prefixes and suffixes ...
instruction
0
16,862
6
33,724
Tags: strings Correct Solution: ``` def magic(string): str=string for i in range(2*n-2): for j in range(i,2*n-2): if len(str[i])<len(str[j]): temp=string[i] str[i]=string[j] str[j]=temp return str n=int(input()) string=[] for i in range(2*...
output
1
16,862
6
33,725
Provide tags and a correct Python 3 solution for this coding contest problem. We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name s can transform to another superhero with name t if s can be made equal to t by chan...
instruction
0
16,878
6
33,756
Tags: implementation, strings Correct Solution: ``` sup1=input() sup2=input() flag=0 vowel=[ 'a', 'e', 'i', 'o','u' ] if(len(sup1)!=len(sup2)): print("No") else: for i in range(len(sup2)): if((sup1[i] in vowel and sup2[i] in vowel)or (sup1[i] not in vowel and sup2[i] not in vowel)): flag...
output
1
16,878
6
33,757
Provide tags and a correct Python 3 solution for this coding contest problem. We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name s can transform to another superhero with name t if s can be made equal to t by chan...
instruction
0
16,879
6
33,758
Tags: implementation, strings Correct Solution: ``` vowel = ('a', 'e', 'i', 'o', 'u') l, m = input(), input() if len(l) == len(m): print(["Yes", "No"][True in [(x in vowel) ^ (y in vowel) for x, y in zip(l, m)]]) else: print("No") ```
output
1
16,879
6
33,759
Provide tags and a correct Python 3 solution for this coding contest problem. We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name s can transform to another superhero with name t if s can be made equal to t by chan...
instruction
0
16,880
6
33,760
Tags: implementation, strings Correct Solution: ``` a='ueoai' if [s in a for s in input()] == [t in a for t in input()]: print('Yes') else: print('No') ```
output
1
16,880
6
33,761
Provide tags and a correct Python 3 solution for this coding contest problem. We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name s can transform to another superhero with name t if s can be made equal to t by chan...
instruction
0
16,881
6
33,762
Tags: implementation, strings Correct Solution: ``` import sys import math def read_int(): return int(input().strip()) def read_int_list(): return list(map(int,input().strip().split())) def read_string(): return input().strip() def read_string_list(delim=" "): return input().strip().split(delim) ###### Author ...
output
1
16,881
6
33,763
Provide tags and a correct Python 3 solution for this coding contest problem. We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name s can transform to another superhero with name t if s can be made equal to t by chan...
instruction
0
16,882
6
33,764
Tags: implementation, strings Correct Solution: ``` from string import ascii_lowercase if __name__ == "__main__": s = input() t = input() vowels = set(['a', 'e', 'i', 'o', 'u']) consonants = set() for letter in ascii_lowercase: if letter not in vowels: consonants.add(letter) ...
output
1
16,882
6
33,765
Provide tags and a correct Python 3 solution for this coding contest problem. We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name s can transform to another superhero with name t if s can be made equal to t by chan...
instruction
0
16,883
6
33,766
Tags: implementation, strings Correct Solution: ``` s=input() t=input() ns,nt=len(s),len(t) vl=['a','e','i','o','u'] flag=0 if ns!=nt: print('No') else: for i in range(ns): if ((s[i] in vl) and (t[i] in vl)) or ((s[i] not in vl) and (t[i] not in vl)): flag=1 else: flag=0 ...
output
1
16,883
6
33,767