Swjtu1762 Imperfect Coverage

Source: Internet
Author: User

Http://acm.swjtu.edu.cn/JudgeOnline/showproblem? Problem_id = 1762


Int main ()
Int n; SCF (n );
F (kk, n)
Printf ("Case # % d:", kk + 1 );
Int a, B, c, d;
Scanf ("% d", & a, & B, & c, & d );
Int sum = abs (a-c) + abs (B-d );
If (! (Sum % 2 ))
Printf ("NO \ n ");
Printf ("YES \ n ");

Check whether an 8*8 floor can be overwritten by a matrix of 1*2, where the floor is hollowed out.

What I came up with when I was doing the question was that it cannot be proved for the time being that the distance between the two Manhattan spaces is odd, that is, YES; otherwise, NO, the intuitive understanding is that if the distance between Manhattan is an even number, there must be a base square in the middle, and the base square cannot be covered by 1*2. This is probably the case. Look back for a detailed proof.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.