• [1273] So Long the String

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Now, NICOROBIN has arrived at Fishman Island with his friends. So she finds a big secret about Ancient weapon on a stone. Here some words on the stone, she wants to find the secret by a paper with some words when she gets before.

  • 输入
  • Input until EOF.
    First line will a long string, the length of it is no more than 100000.
    Then contains a integer M(1<=M<=10000) about the number of strings on NICOROBIN's paper.
    Next M lines follow. Each line contains a string.
    Each string only consists of 'a' to 'z' and 'A' to 'Z'.
  • 输出
  • If one of strings on her paper that every character can be found on the sne, Print "YES", else print "NO".
  • 样例输入
  • ZerotoHero
    8
    to
    ZH
    zero
    hero
    Z
    ooooooo
    abcdefg
    k
  • 样例输出
  • YES
    YES
    NO
    NO
    YES
    YES
    NO
    NO
  • 提示
  • 来源
  • hungar
  • 操作

显示春菜