编程介的小学生 2019-05-26 08:36 采纳率: 20.5%
浏览 145

计算网格中是否可以用指定的方块填充,怎么使用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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 关于#python#的问题:自动化测试