[BZOJ2228] [Zjoi2011] Gift (gift) (mess up???) ) __orz

Source: Internet
Author: User

First consider the case of long and wide equality.
See the size of the cuboid to be chosen is AXAXB axaxb a\times a\times B,
You may consider preprocessing the first for each (I,J,K) (I, J, K) (I,j,k), in K K K-layer, with (I,J) (I, J) (I,J) as the largest full N square in the lower right corner edges s (i,j,k) s (i, J, K ) s (i,j,k). This can be pretreated by the suspension method O (PQR) O (P q r) O (PQR).
Then enumerate 1≤i≤p,1≤j≤q 1≤i≤p, 1≤j≤q 1\le i\le p,1\le j\le Q, and set the x x x coordinate right boundary of the sub cuboid as I i i, y y y coordinate right boundary is J J J.
At this point, if the z z coordinate range is [x,y] (1≤X,Y≤R) [X, Y] (1≤x, y≤r) [X,y] (1\le x,y\le R), then the maximum 4ab 4 a B 4ab under such a restriction is:
4 (y−x+1) Mink=xys (i,j,k) 4 (y−x + 1) min

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.