{"problem":{"name":"057. Minecraft Prank","description":{"content":"You are currently playing minecraft with your friends when you get a brilliant idea for a prank, you want to fill his entire house with sand. Given some information that represents the dimensions of y","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269057"},"statements":[{"statement_type":"Markdown","content":"You are currently playing minecraft with your friends when you get a brilliant idea for a prank, you want to fill his entire house with sand. Given some information that represents the dimensions of your friend's house return the number of blocks of sand needed to fill it up. \n\nThe first line will contain a number that is the height of the house. The next line will be the number of lines that will be used to display the foundation of the house. The following lines will be X's that represent the foundation of the house\n\nPrint an integer that is the number of blocks needed to fill the house.\n\nThe ceiling, floor, and walls are included within the dimensions of the house so be mindful of that. You can also assume the ceiling is flat.\n\n## Input\n\nThe first line will contain a number that is the height of the house. The next line will be the number of lines that will be used to display the foundation of the house. The following lines will be X's that represent the foundation of the house\n\n## Output\n\nPrint an integer that is the number of blocks needed to fill the house.\n\n[samples]\n\n## Note\n\nThe ceiling, floor, and walls are included within the dimensions of the house so be mindful of that. You can also assume the ceiling is flat.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ h \\in \\mathbb{Z}^+ $ be the height of the house.  \nLet $ m \\in \\mathbb{Z}^+ $ be the number of rows in the foundation grid.  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of columns in the foundation grid (implicitly determined by the length of each foundation row).  \nLet $ F \\in \\{X, \\text{whitespace}\\}^{m \\times n} $ be the foundation grid, where each cell is either 'X' (occupied) or whitespace (empty).  \n\n**Constraints**  \n1. $ h \\geq 1 $  \n2. $ m \\geq 1 $, $ n \\geq 1 $  \n3. Each of the $ m $ foundation rows has exactly $ n $ characters, all of which are either 'X' or spaces.  \n\n**Objective**  \nCompute the total number of sand blocks required to fill the house, defined as:  \n$$\n\\text{Total blocks} = h \\cdot \\left( \\sum_{i=1}^{m} \\sum_{j=1}^{n} \\mathbf{1}_{F[i,j] = 'X'} \\right)\n$$  \nwhere $ \\mathbf{1}_{F[i,j] = 'X'} $ is the indicator function that is 1 if the cell at position $ (i,j) $ is 'X', and 0 otherwise.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269057","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}