Logo
(追記) (追記ここまで)

11326번 - Coverity Crossword 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB22181386.667%

문제

What is your crossword telling you today? Can you scan your code for patterns, in the time it takes to get a cup of coffee? You have just landed a job at Coverity, and your first challenge is to demonstrate your searching and testing abilities. Can you find and analyze code that looks like random strings? Up to ten secret messages are hidden in a crossword of size 8x8, and your task is to determine if they are all present in the code or not.

Secrets are hidden horizontally, from left to right, vertically, from top to bottom, and diagonally, from top-left to bottom-right.

입력

The first line of the input contains an integer T (1 ≤ T ≤ 100), the number of test cases. Then follow T test cases. Each case starts with an integer N on a line (1 ≤ N ≤ 10), the number of words we are searching for. Each of the next N lines contains a non-empty string of length at most 8 characters over the alphabet [A-Z], the words we are searching for. Then follows 8 lines, each containing a string of exactly 8 characters over the alphabet [A-Z], thei'th horizontal line in the crossword, from left to right, starting from the topmost line down to the bottommost line.

출력

For each test case print on a separate line either "Yes" or "No", the answer to the question "Is it the case that all N messages are present in the crossword?"

제한

예제 입력 1

2
8
BLAST
COVERITY
CPSC
PRIZES
PROBLEMS
PSC
SOLVING
TESTING
SPRIZESS
SROSNPSP
COVERITY
ABLASTIG
NLSVINGC
TESTINGP
EMSPONYS
PSYNPSGC
2
COOL
LOL
OCCOOOCL
OCCLCLOO
OLOOCLOL
LLOOCOOC
LOCCCOLL
COCCOLLO
OLOLOCOL
LLOOCCOO

예제 출력 1

Yes
No

힌트

출처

Contest > Calgary Collegiate Programming Contest > CCPC 2014 C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /