编程介的小学生 2019-05-07 16:42 采纳率: 20.5%
浏览 178

俄罗斯方块是否能够填充的判断的一个算法,怎么采用C语言的程序编程的过程来实现的呢?

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
1 1
00000
1 1
00100
1 1
01010
4 1
10000
00101
10010
00000

Sample Output
YES
YES
NO
YES

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 有人会搭建GPT-J-6B框架吗?有偿
    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名