6 views

Uploaded by Nadir Mayra Mamani Mamani

save

You are on page 1of 2

Tiling

Analyzing floor tiles is a newly trending hobby for Jakartan school children who are accustomed to decorated floor grids in various buildings, especially in Jakarta shopping malls. A curious child wonders: If she could reduce an infinitely-repeating patterns in a grid into the smallest possible unit, such that, when the unit is repeated without any overlap it could cover all the patterned cells without exception, what is the smallest possible unit size? For simplicity, we assume that each cell in the grid can be either blank or dotted. For example, given a tile pattern as shown in Figure 1. She can deduce that it indeed can be reproduced with a minimal unit of size 5 (Figure 2), such that the unit, if infinitely tiled without overlapping, can cover the whole pattern (Figure 3).

Figure 1

Figure 2

Figure 3

Now we're attempting to solve a more general problem. Suppose you are given the positions of every single dot in the infinite grid, described by: (DX1, DY1), (DX2, DY2), (DX3, DY3) which means: Only the cells at position (X, Y) that satisfies X = i • DX1 + j • DX2 + k • DX3 and Y = i • DY1 + j • DY2 + k • DY3 for some integers i, j, and k are dotted and the rest is blank.

Problem I. Tiling

ACM-ICPC Regional Contest, Jakarta 2012

DY1. hence the minimum tile size is 1. Figure 4 Figure 5 Given the positions of the dotted cells in an infinite grid described by the manner above. DY2. output “Case #X: Y”. These samples demonstrate two different ways to describe the first example in the problem statement. DY3) all point to different directions (no vector is simply a scalar multiple of another vector). DX2. DY1). It is guaranteed that the three vectors (DX1. This sample input corresponds to all cells dotted in the pattern. -5) (DX3. Output For each case. DY3 (each integer is in the range -10000 to 10000. Explanation for 3 sample input. no rotation) without overlaps. and a tile with minimal size of 8 can reproduce the pattern as shown in Figure 5. T (1 ≤ T ≤ 1000). Jakarta 2012 . inclusive). can cover the pattern in the grid without leaving some cells uncovered? Input The first line contains the number of cases. DY3) = (2. where X is case number starts from 1 and Y is the smallest number of cells in a unit that if infinitely repeated without overlap can cover the pattern in the grid. DY2) = (-1. Each case consists of a line containing six integers: DX1. what is the smallest unit size. This sample corresponds to the second example in the problem statement. given (DX1. that. DY2). Explanation for 4 sample input. if repeated as is (no mirroring. and (DX3. Tiling ACM-ICPC Regional Contest. DY1) = (5. 1) (DX2. DX3.For example. Sample Input 4 1 2 5 1 2 4 1 2 2 -1 -5 0 7 4 -3 -1 -1 -5 2 2 2 1 2 2 st nd Output for Sample Input Case Case Case Case #1: #2: #3: #4: 5 5 8 1 Explanation for 1 and 2 sample input. th rd Problem I. (DX2. 2) The pattern will look like Figure 4.

- AddMath1(SBP)Uploaded bySimPor
- class-11 c++Uploaded bydeltaserrapapa
- Chapter 1Uploaded byAkbarDwiSyahputra
- Lesson 2.5 - Subtracting IntegersUploaded byehystad
- algebra 1 first test algebra 1 first testUploaded byapi-356637264
- Bearing Load CalculationUploaded bymhsalih
- R.J. Duffin- Some Problems of Mathematics and ScienceUploaded byKluff5878
- Math 2011Uploaded byHamza1122
- algebra 1 second test algebra 1 second testUploaded byapi-356637264
- Algebra Calculator Step By Step: Brushing Up Your Algebra SkillsUploaded byandrewjhons
- answersUploaded byapi-195130729
- elements - algebra i syllabus 16-17Uploaded byapi-234130682
- Lecture 7 - CS 246hUploaded byjeromeku
- activity_1_sometimes_always_never.pdfUploaded byCésar Augusto
- MAT 100 W4 Clsdsc.doc-3Uploaded byThalia Sanders
- Evaluate Algebraic Expressions Worksheets PDFUploaded byJenny
- Grade 7 Math Challenge QuizUploaded byScott
- Database Algebgra SolutionUploaded byShivaani Aggarwal
- Lecture_2Uploaded byGeologi
- AAIT-N-013Uploaded byttgun
- AlgebraUploaded byrichlog
- Csec 2015 JanuaryUploaded byAnonymous Nzl2xJW
- State and Input Estimation for Descriptor Systems With Unknown InputsUploaded byAmit Shukla
- AO LAP ModelUploaded byMitraș Andra
- Public Rickards 43 10Uploaded byKartikeyJha
- First DraftUploaded byViet Quoc Hoang
- Numerical Reasoning Practice Test.docxUploaded byJundy Duyag
- Math Lect 13Uploaded byDaniel
- Java PrintingUploaded byCemal Abin
- A7GeneralizingNumbersAlgebrapdfUploaded byvi_curl

- Tema1 Intro.aloss.i.g.2013Uploaded byNadir Mayra Mamani Mamani
- Sample Paper R&W KETUploaded byNadir Mayra Mamani Mamani
- Libro-solucionario Acmicpc Bolivia v1Uploaded byNadir Mayra Mamani Mamani
- GuionIntypedia000.pdfUploaded byNadir Mayra Mamani Mamani
- 6042.pdfUploaded byNadir Mayra Mamani Mamani
- formulario combinatoriaUploaded byNadir Mayra Mamani Mamani
- Uso de DebugUploaded byNadir Mayra Mamani Mamani
- ConfigUploaded byNadir Mayra Mamani Mamani
- 4GUploaded byNadir Mayra Mamani Mamani
- Tvgoa12 EspUploaded byNadir Mayra Mamani Mamani
- TutorialUploaded byNadir Mayra Mamani Mamani
- CRONOGRAMAUploaded byNadir Mayra Mamani Mamani