diff --git a/hard/day_20/problem.txt b/hard/day_20/problem.txt new file mode 100644 index 0000000..b7c1dfc --- /dev/null +++ b/hard/day_20/problem.txt @@ -0,0 +1,14 @@ +Once Bluemin decided to adorn his living room with a tessellated floor. +The living room boasts dimensions n x m meters. +Bluemin had at his disposal planks of three varieties: +-a planks measuring 1 x 2 meters, +-b planks measuring 2 x 1 meters, +-c planks measuring 2 x 2 meters. + +Your task is to aid Bluemin in determining whether it's feasible to embellish the living room with such a collection of planks. If possible, you should provide one potential arrangement. + +Input: +The initial line presents 5 space-separated integers: n , m , a , b , and c ( 1 ≤ n, m ≤ 100 , 0 ≤ a, b, c ≤ 10^4 ). Here, n and m denote the living room dimensions, while a , b , and c represent the quantities of planks measuring 1 x 2 , 2 x 1 , and 2 x 2 meters respectively. It's imperative not to rotate the planks. + +Output: +If it proves impossible to adorn the room with the given set of planks, you should output "IMPOSSIBLE". Otherwise, you should provide one potential arrangement, consisting of n lines with m lowercase Latin letters each. Adjacent squares containing the same letter signify that they belong to the same plank. If the answer isn't unique, any valid arrangement will suffice. \ No newline at end of file diff --git a/hard/day_20/sample_test_cases.txt b/hard/day_20/sample_test_cases.txt new file mode 100644 index 0000000..d4d7e7a --- /dev/null +++ b/hard/day_20/sample_test_cases.txt @@ -0,0 +1,23 @@ +Examples + +input +2 6 2 2 1 + +output +aabcca +aabdda + +input +1 1 100 100 100 + +output +IMPOSSIBLE + +input +4 4 10 10 10 + +output +aabb +aabb +bbaa +bbaa diff --git a/hard/day_20/solution.cpp b/hard/day_20/solution.cpp new file mode 100644 index 0000000..8d3ad8d --- /dev/null +++ b/hard/day_20/solution.cpp @@ -0,0 +1 @@ +//write your code here \ No newline at end of file