Paper CubeProblem code: DPC104 |
A paper cube can be made up from six paper squares. Given an projection (map) of the cube, you are to determine its correctness. A projection is correct, if a cube can be made up from it.
Input:
First line contains the number of test cases. Each test case contains a projection represented as 6*6 grid containing 6 ones and 30 zeros, separated by spaces. 1s represent the paper squares. All squares are placed immediately to each other, so that each square is connected with at least one other square. Each test case is separated by an empty line.
Output:
For each test case, your program should print correct if cube can be made up from the given projection, or incorrect otherwise.
Sample Input
1
0 0 0 0 0 0
0 0 0 1 0 0
0 0 0 1 0 0
0 0 1 1 1 0
0 0 0 1 0 0
0 0 0 0 0 0
Sample Output
correct
| Author: | rushikesh30 |
| Date Added: | 25-02-2010 |
| Time Limit: | 1 sec |
| Source Limit: | 50000 Bytes |
| Languages: | C, C99 strict, CLOJ, CPP 4.0.0-8, CPP 4.3.2, CS2, F#, GO, JAVA, PERL6, PYTH 3.1.2, TEXT |
Comments

Fetching successful submissions

I am the Organizer. This
I am the Organizer.
This contest is a part of Tech-Days2010 and Microsoft DreamSpark Yatra organized by Microsoft Student Partner India Team and supported by Microsoft Academia Team.
Our UnderConstruction WebSite is at www.tech-days2010.com
Special Thanks to Rushikesh
Special Thanks to
Rushikesh Deshpande (ISMU Dhanbad); Shahzor Khan(BIT Mesra); Kunal Jain(IIIT Hyderabad); Gourab Mitra(MSP BIT Mesra); Subhradip Saha(MSTC BIT Mesra)
@ALL Please mail your
@ALL
Please mail your CodeChef ID, your name, your Institutions Name, Your Address(Where you want Posters, Certis, Goodies to be delivered, (No. of deliveries will depend on our budget)) to dreamsparkyatra@gmail.com For Updates follow http://twitter.com/dreamsparkyatra .
Happy Holi and Happy Coding!
@All Check out the DreamSpark
@All
Check out the DreamSpark Professional Programming Contest #2 on 13th March 18:00 hours IST. We will send Posters to Participants by Post to promote the Contest Series. We'll also Send Participation E-Certis.