6.2 There is an 8x8 chess board in which two diagonally opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly two squares. Can you use the 31 dominos to cover the entire board? Prove your answer (by providing an example or showing why it's impossible).

这道题给我们了一个8x8的国际象棋棋盘,从一个对角线挖去两个格子,应为同一颜色,然后给了我们31个多米诺,每一多米诺可以覆盖两个格子,问我们能不能覆盖整个棋盘。

这题乍看去去好像可以,因为64个格子挖去两个剩62个,31个多米诺正好覆盖62个格子。实际上是不对的,整个棋盘原本有32个黑格子,32个白格子,挖去两个黑格子,还剩30个黑格子,32个白格子。而一个多米诺只能覆盖一个黑格子和一个白格子,31个多米诺只能覆盖31个黑格子和31个白格子,所以总会有1个白格子无法覆盖,所以是不可能的。

[CareerCup] 6.2 Dominos on Chess Board 棋盘上的多米诺的更多相关文章

  1. 419. Battleships in a Board 棋盘上的战舰数量

    [抄题]: Given an 2D board, count how many battleships are in it. The battleships are represented with  ...

  2. NEFU 506&&ZOJ 3353 Chess Board (四种构造的高斯消元)

    题目链接 题意:有四种翻转方式,问是否能使得所有棋子都变为0,求最小步数. 题解:依次构造枚举求出最小值即可. #include <iostream> #include <cstdi ...

  3. CareerCup All in One 题目汇总 (未完待续...)

    Chapter 1. Arrays and Strings 1.1 Unique Characters of a String 1.2 Reverse String 1.3 Permutation S ...

  4. CareerCup All in One 题目汇总

    Chapter 1. Arrays and Strings 1.1 Unique Characters of a String 1.2 Reverse String 1.3 Permutation S ...

  5. Careercup - Microsoft面试题 - 5649647234187264

    2014-05-10 22:17 题目链接 原题: A draw method is given, write a function to draw a chess board. The Draw m ...

  6. Careercup | Chapter 6

    6.2 There is an 8x8 chess board in which two diagonally opposite corners have been cut off. You are ...

  7. Codeforces Round #379 (Div. 2) D. Anton and Chess 水题

    D. Anton and Chess 题目连接: http://codeforces.com/contest/734/problem/D Description Anton likes to play ...

  8. [CareerCup] 9.9 Eight Queens 八皇后问题

    9.9 Write an algorithm to print all ways of arranging eight queens on an 8x8 chess board so that non ...

  9. Codeforces Round #379 (Div. 2) D. Anton and Chess 模拟

    题目链接: http://codeforces.com/contest/734/problem/D D. Anton and Chess time limit per test4 secondsmem ...

随机推荐

  1. 调用iframe中父页面/子页面中的JavaScript方法

    今天做公司的内部流程系统,发现一问题.怎么调用iframe外面的方法呢?于是百度了一下,呵呵,把搜索结果摘抄下来. 转自:http://hi.baidu.com/zh_m_zhou/blog/item ...

  2. [QualityCenter]设置工作流脚本-缺陷字段值发生变化时的处理

    需求:缺陷状态发生不同变化时,系统会的自动处理一些字段值的变化 在脚本编辑器找到Defects_Bug_FieldChange函数,然后填写以下代码: Sub Defects_Bug_FieldCha ...

  3. debian7 请把标有“Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 DVD Binary-1 20130615-23:06”的盘片插入驱动器“/media/cdrom/”再按回车键

    有时候,在通过apt-get install 安装软件的时候,会出现: 更换介质:请把标有“Debian GNU/Linux 7.1.0 _Wheezy_ - Official amd64 DVD B ...

  4. npm报错Error: ENOENT, stat 'D:\NodeLearn\node-global'

    最近想试下当前的当红炸子鸡 Nodejs,在安装配置时,发生了下面的错误: C:\nodejs\npmjs\bin>cd .. C:\nodejs\npmjs>cd .. C:\nodej ...

  5. HDU 4044 GeoDefense(动态规划)

    GeoDefense Time Limit: 12000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Tota ...

  6. spring mvc 配置文件拦截器过滤url

    最近在用spring mvc拦截器,sprin 版本号4.0.6.RELEASE, <mvc:interceptor> <mvc:mapping path="/admin/ ...

  7. centos7下docker 部署javaweb

    LXC linux container 百度百科:http://baike.baidu.com/link?url=w_Xy56MN9infb0hfYObib4PlXm-PW02hzTlCLLb1W2d ...

  8. css中元素居中总结

    很多时候,我们需要让元素居中显示:1. 一段文本的水平居中,2. 一张图片的水平居中,3. 一个块级元素的水平居中:4. 单行文本的竖直居中,5. 不确定高度的一段文本竖直居中,6. 确定高度的块级元 ...

  9. [树莓派]安装node环境

    本文并非node的编译安装,据说这要花很长时间,所以一开始我就是拒绝的.本文展示的是如何部署ndoe的编译好的执行文件. node的官网上下载目录里本身就有针对arm的编译好的执行文件.地址在这里:h ...

  10. CSS3实现气泡效果

    首先定义一个 <p class="speech"></p> 先给外层的容器添加样式: p.speech { position: relative; widt ...