{"raw_statement":[{"iden":"statement","content":"The complete problemset is available on http://maratona.ime.usp.br/primfase19/provas/competicao/maratona_en.pdf\n\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be even, $ 2 \\leq n \\leq 50 $.  \nThe wall is an $ n \\times n $ grid. Position $ (i, j) $ must contain:  \n- Stone block if $ i + j \\equiv 0 \\pmod{2} $,  \n- Sand block if $ i + j \\equiv 1 \\pmod{2} $.  \n\n**Constraints**  \n- Only two operations allowed:  \n  1. Place a single block of correct type on a *free* position.  \n  2. Fill all empty positions in a $ 2 \\times 2 $ square with a single block type, provided at least one position in the square is *free* and the entire square lies within bounds ($ 1 \\leq x, y \\leq n-1 $).  \n- No block may be placed in a position where its type contradicts the chequered pattern.  \n- Total operations $ k \\leq \\frac{3n^2}{4} $.  \n\n**Objective**  \nConstruct a sequence of operations (each of type 1 or 2) that fills the grid according to the chequered pattern, using at most $ \\frac{3n^2}{4} $ operations.","simple_statement":"You are given an even integer n. Build an n×n wall in a checkerboard pattern: position (i,j) is stone if i+j is even, sand if i+j is odd. Start from empty wall. You can do two operations:\n\n1. Place one block of correct type on any \"free\" position (border or next to existing block).\n2. Fill all empty cells in any 2×2 square with the same correct block type, if at least one cell in that square is free.\n\nUse at most (3*n²)/4 operations. Print the sequence of operations.\n\nEach operation:  \n- Type 1: `1 x y b` → place block of type b at (x,y)  \n- Type 2: `2 x y b` → fill entire 2×2 square from (x,y) to (x+1,y+1) with block type b  \n\nb is 0 for sand, 1 for stone.  \nStart with (1,1) as stone.  \nNever place wrong type.","has_page_source":false}