A program for determining that bingo of a word bingo of a game in which each square of a game called a bingo game is arranged into a word (word) instead of a number is achieved (called a winning condition).

Asked 1 years ago, Updated 1 years ago, 392 views

I'm a fledgling engineer.I don't know how to write a program that determines that a word bingo has been achieved (hereinafter referred to as "victory conditions").
 It's not a normal number bingo game, it's a word bingo, so it's very complicated.
 Javescript or python, regardless of language.
 I don't know what kind of program to write, so I'd like your feedback and advice.

Details are as follows.

There is a bingo card with words written on each square in the size of S×S.The words in row i from the top and column j from the left are Ai,j.
Next, N words w1, w2, ..., wN are selected.
If the selected word is in the bingo card, mark the word on the bingo card.
When N words are selected, determine if they meet the winning criteria (bingo or not), i.e., whether the S squares in one column, vertical, horizontal, or lick, are all marked.

Value entered
Inputs are given from standard input in the following format:
S
A1,1 A1,2...A1,S
A2,1 A2,2...A2,S

AS,1 AS,2...AS,S

N
w1
w2

wN

In the first line, enter the size S of the bingo card.
Next, the words on the bingo card are entered in S lines, separated by spaces.
In the next line, enter the number of selected words N.
Next, the selected word is entered in N lines.

Expected Output
If the winning conditions are met, print yes or otherwise no.

Conditions
● Ai, j, and wi are alphanumeric characters only.No spaces or symbols are included.
● 3 SS 10001000
● Ai1,j1=/Ai2,j2
((i1,ij)=/(i2,j2))
● 1 A Ai,j characters 100100
● 1 NN br2000
● 1 wwi characters 数100
● wi=/wj(i=/j)

python javascript

2023-03-13 13:22

1 Answers

The basic idea is to number each word on the bingo card.
For example, dog is 1, cat is 2, and so on.
The rest should be handled in the same way as a normal number bingo.


2023-03-13 15:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.