#P11033. 【MX-X3-T0】「RiOI-4」宾果游戏
【MX-X3-T0】「RiOI-4」宾果游戏
Background
Original problem link: https://oier.team/problems/X3A.
The Fifth City. The Fifth Sound.
In a world where “five” seems to be everywhere.
If we can once again connect the five people, whose timelines are in chaos, into one line—
Then it will be a ray of sunlight, a way to lead ourselves out of the darkness.

(Image from Delusion: Deliver Me, please contact for removal if it infringes.)
Problem Description
There is a by board. Each of the cells may or may not contain a piece.
There are lines as shown on the left of the figure below. We call a board Bingo if and only if at least one line has a piece in every cell on that line. Determine whether the given board is Bingo. Some examples are shown on the right of the figure below. (Dark means there is a piece, light means there is no piece.)

You can go to this link to test different cases by yourself.
Input Format
There are lines, each with numbers. If there is a piece at row , column , then the -th number on line is ; otherwise it is .
Output Format
If there is at least one line containing pieces, output Yes; otherwise output No.
1 1 0 1 1
1 1 0 1 1
0 0 0 0 0
1 1 0 1 1
1 1 0 1 1
No
1 1 1 1 0
1 1 1 0 1
1 1 0 1 1
1 0 1 1 1
0 1 1 1 1
No
1 1 1 1 1
0 1 0 1 1
1 0 1 0 1
0 1 0 1 1
1 0 1 0 1
Yes
Hint
Sample Explanation #1
The board in this sample is the one at the top-left in the figure, and it is not Bingo.
Sample Explanation #3
The board in this sample is the one at the bottom-left in the figure, and it is Bingo.
Constraints
For of the testdata, all input numbers are guaranteed to be or .
Translated by ChatGPT 5