{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"hlce","formal_name":"Humanity's Last Code Exam","introduction":"ICPC World FinalsとIOIの競技プログラミング問題を使い、問題解決とコード生成の能力を評価します。公式紹介では235問を収録し、今回の取得は公開ICPCデータ146問を対象とします。\n\nHumanity's Last Code Exam evaluates problem solving and code generation using ICPC World Finals and IOI problems. The project describes 235 problems; this import selects its public ICPC dataset of 146 problems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://humanity-s-last-code-exam.github.io/website/","indexing_mode":"noindex"},"task_id":"4fa2e8c2-379d-5cf6-97bd-ad2c89aa2957","task_key":"ICPC~2dWorld~2dFinals--examples--2021~5fG","task_revision_id":"1","upstream_id":"2021_G","short_description":"Mosaic Browsing","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Statement\\n\\nThe International Center for the Preservation of Ceramics (ICPC) is searching for motifs in some ancient mosaics. According to the ICPC’s definition, a mosaic is a rectangular grid where each grid square contains a colored tile. A motif is similar to a mosaic but some of the grid squares can be empty. The rows of an \\\\(r_q \\\\times c_q\\\\) mosaic are numbered 1 to \\\\(r_q\\\\) from top to bottom, and the columns are numbered 1 to \\\\(c_q\\\\) from left to right.\\n\\nA contiguous rectangular subgrid of the mosaic matches the motif if every tile of the motif matches the color of the corresponding tile of the subgrid. Formally, an \\\\(r_p \\\\times c_p\\\\) motif appears in an \\\\(r_q \\\\times c_q\\\\) mosaic at position \\\\((r, c)\\\\) if for all \\\\(1 \\\\leq i \\\\leq r_p\\\\), \\\\(1 \\\\leq j \\\\leq c_p\\\\), the tile \\\\((r + i - 1, c + j - 1)\\\\) exists in the mosaic and either the square \\\\((i, j)\\\\) in the motif is empty or the tile at \\\\((i, j)\\\\) in the motif has the same color as the tile at \\\\((r + i - 1, c + j - 1)\\\\) in the mosaic.\\n\\nGiven the full motif and mosaic, find all occurrences of the motif in the mosaic.\\n\\n## Input\\n\\nThe first line of input contains two integers \\\\(r_p\\\\) and \\\\(c_p\\\\), where \\\\(r_p\\\\) and \\\\(c_p\\\\) \\\\((1 \\\\leq r_p, c_p \\\\leq 1,000)\\\\) are the number of rows and columns in the motif. Then \\\\(r_p\\\\) lines follow, each with \\\\(c_p\\\\) integers in the range \\\\([0, 100]\\\\), denoting the color of the motif at that position. A value of 0 denotes an empty square.\\n\\nThe next line of input contains two integers \\\\(r_q\\\\) and \\\\(c_q\\\\) where \\\\(r_q\\\\) and \\\\(c_q\\\\) \\\\((1 \\\\leq r_q, c_q \\\\leq 1,000)\\\\) are the number of rows and columns in the mosaic. Then \\\\(r_q\\\\) lines follow, each with \\\\(c_q\\\\) integers in the range \\\\([1, 100]\\\\), denoting the color of the mosaic at that position.\\n\\n## Output\\n\\nOn the first line, output \\\\(k\\\\), the total number of matches. Then output \\\\(k\\\\) lines, each of the form \\\\(r \\\\ c\\\\) where \\\\(r\\\\) is the row and \\\\(c\\\\) is the column of the top left tile of the match. Sort matches by increasing \\\\(r\\\\), breaking ties by increasing \\\\(c\\\\).\\n\\n## Sample Input 1\\n\\n```\\n2 2\\n1 0\\n0 1\\n3 4\\n1 2 1 2\\n2 1 1 1\\n2 2 1 3\\n```\\n\\n## Sample Output 1\\n\\n```\\n3\\n1 1\\n1 3\\n2 2\\n```\",\"question_title\":\"Mosaic Browsing\\n\"}","display_format":"text","language":"","answer_status":"published","assets":[],"source_url":"https://humanity-s-last-code-exam.github.io/website/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}