|
||||||||||
Tetris Comes BackTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 482 Accepted Submission(s): 199 Problem Description Working in corporation is toilsome and rest is important. In leisure time, WisKey like to play Tetris. The Tetris game in board is N*5, and there are 8 kinds of blocks. Look that, red mean the area can¡¯t be place. Other colors mean different kinds of blocks. If I give you C grey blocks (the 1st kind), and other infinite color blocks, Can you fulfil the board without any blocks overlap. Input Each case will contain two integers N (1<=N<=1000) and C (0<=C<=100). N*5 grid follow it. The ¡®1¡¯ represent red area, it can¡¯t be place. The ¡®0¡¯ represent normal area. Process cases to end of file. Output If you can full of the Tetris, print ¡°YES¡±, otherwise, print ¡°NO¡±. Sample Input
Sample Output
Source | ||||||||||
|