← All problemsSign in

Filling Trominos

CSESConstruction ProblemsOpen on judge ↗

Your task is to fill an n \times m grid using L-trominos (three squares that have an L-shape). For example, here is one way to fill a 4 \times 6 grid: Input The first input line has an integer t: the number of tests. After that, there are t lines that describe the tests. Each line has two integers n and m. Output For each test, print YES if there is a solution, and NO otherwise. If there is

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start