{"problem":{"name":"040. Valid Sudoku","description":{"content":"Sudoku is a popular number puzzle involving placing digits (1-9) in a 9 by 9 grid. A sudoku is considered _valid_ if all of the following are true: -All digits are integers from 1 to 9 -No number oc","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269040"},"statements":[{"statement_type":"Markdown","content":"Sudoku is a popular number puzzle involving placing digits (1-9) in a 9 by 9 grid. A sudoku is considered _valid_ if all of the following are true:\n\n-All digits are integers from 1 to 9\n\n-No number occurs in the same row twice\n\n-No number occurs in the same column twice\n\n-No number occurs in the same 3 by 3 box twice.\n\nGiven a sudoku board, print whether or not it is valid.\n\nThe input consists of nine lines, each containing nine space-separated integers ranging from 1 to 9.\n\nIf the sudoku is valid, output VALID, otherwise output INVALID.\n\n## Input\n\nThe input consists of nine lines, each containing nine space-separated integers ranging from 1 to 9.\n\n## Output\n\nIf the sudoku is valid, output VALID, otherwise output INVALID.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ G \\in \\{1, 2, \\dots, 9\\}^{9 \\times 9} $ be a 9×9 grid representing the Sudoku board.\n\n**Constraints**  \n1. For all $ i, j \\in \\{1, \\dots, 9\\} $, $ 1 \\le G[i][j] \\le 9 $.  \n2. For each row $ i \\in \\{1, \\dots, 9\\} $, the elements $ G[i][1], G[i][2], \\dots, G[i][9] $ are distinct.  \n3. For each column $ j \\in \\{1, \\dots, 9\\} $, the elements $ G[1][j], G[2][j], \\dots, G[9][j] $ are distinct.  \n4. For each 3×3 box $ (b_r, b_c) \\in \\{0,1,2\\} \\times \\{0,1,2\\} $, the set  \n   $$\n   \\{ G[3b_r + r][3b_c + c] \\mid r, c \\in \\{1,2,3\\} \\}\n   $$  \n   contains distinct elements.\n\n**Objective**  \nOutput \"VALID\" if all constraints hold; otherwise, output \"INVALID\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269040","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}