Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

In FRGTNLNG question Which test case is getting failed?

$
0
0
iterations = int(input()) 
while iterations :
    numberOfWords, numberOfLines = map(int, input().split())
    wordsDictionary = {};
    statusString = ""
    for word in input().split():
        wordsDictionary[ word ] = "NO"
    #print( wordsDictionary )
    while numberOfLines :
        sentence = input().split()[ 1: ]
        #print( line )
        for sentenceWords in sentence:
            if sentenceWords in wordsDictionary:
                wordsDictionary[ sentenceWords ] = "YES"
        numberOfLines -= 1
    for word in wordsDictionary:
        statusString += ( wordsDictionary[ word ] + " ")
    print( statusString[ : -1 ] )
    iterations -= 1

Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>