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. Memcache笔记05-Memcache安全性

    Memcache服务器端都是直接通过客户端连接后直接操作,没有任何的验证过程,这样如果服务器是直接暴露在互联网上的话是比较危险,轻则数据泄露被其他无关人员查看,重则服务器被入侵,因为Mecache是以 ...

  2. js中 字符串与Unicode 字符值序列的相互转换

    一. 字符串转Unicode 字符值序列 var str = "abcdef"; var codeArr = []; for(var i=0;i<str.length;i++ ...

  3. tomcat支持多少并发

    作者:孟男男 来源:https://zhidao.baidu.com/question/1445941399668603020.html Tomcat的最大并发数是可以配置的,实际运用中,最大并发数与 ...

  4. Java递归实现操作系统文件的复制、粘贴和删除功能

    通过Java IO递归实现操作系统对文件的复制.粘贴和删除功能,剪切=复制+粘贴+删除 代码示例: import java.io.BufferedInputStream; import java.io ...

  5. python正则表达式 小例几则

    会用到的语法 正则字符 释义 举例 + 前面元素至少出现一次 ab+:ab.abbbb 等 * 前面元素出现0次或多次 ab*:a.ab.abb 等 ? 匹配前面的一次或0次 Ab?: A.Ab 等 ...

  6. poj 3169 Layout 差分约束模板题

    Layout Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6415   Accepted: 3098 Descriptio ...

  7. Openwrt LuCI模块练习详细步骤

    前言 又到了成胖子^_^每周一博的时间了.最近在学习openwrt luci方面的知识,为了贯穿整个知识体系,练习题目为: 通过页面配置周期性地往/tmp/addtest文件写入内容和时间戳 1.在w ...

  8. Azure 自动化里添加ResourceManager模块

    最近想尝试通过Azure里的自动化功能来控制VM的定时开关机,找到网上的一篇文章,  按照文章操作到"Import Azure Resource manager module"的第 ...

  9. linux中C语言获取高精度时钟gettimeofday函数

    前言:    在开发中,很多时候需要知道各个函数或者是某些设备对命令的操作用时,因此需要用到 gettimeofday 来获取当前时钟. 一,函数说明 #include  int gettimeofd ...

  10. python singleton

    方法一:用元类的方式实现一个singleton. liuxiaoyan@development:~/mysite$ cat Singleton.py class Singleton(type): &q ...