302951: CF575D. Tablecity

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Tablecity

题意翻译

#### 题目描述 `Tablecity` 发生了一起重大银行抢劫案,为了将小偷绳之以法,总统指派警察局局长 `Albert` 去执行抓捕小偷的任务。他不知道小偷在哪里,但他知道小偷会怎么走。 `Tablecity` 可以看作是一个$1000×2$的一个坐标系,一个单元格看作是一个区。小偷只能往左上角,右上角,左下角,右下角,正左边和正右边移动。 `Albert` 有足够的人手,可以保证每个小时搜完两个区。在任何时刻小偷如果在搜索范围内,小偷就会被抓获。`Albert` 警长已经向总统承诺在 $2015$ 个小时内完成任务,他需要你的帮助来达到这个目标。 #### 输入格式 此题没有输入。 #### 输出格式 第一行包括一个整数 $N$,代表搜索的时间。 而后的 $N$ 行每一行包括 $4$ 个整数 $X_{i_1}, Y_{i_1}, X_{i_2}, Y_{i_2}$,代表两个区的位置。输出按时间顺序给出,并且应保证小偷在不超过 $2015$ 小时内被抓获,无论小偷的初始位置和移动如何。 #### 说明与提示 考虑以下输出: ``` 2 5 1 50 2 8 1 80 2 ``` 这个输出不能保证抓到小偷,也不正确。 它只是展示输出格式。存在初始位置和移动策略的组合,使得警察不会抓到小偷。 考虑以下初始位置和小偷的移动: 在第一个小时,小偷位于区 $(1,1)$。 警察搜查了区 $(5,1)$ 和 $(50,2)$,第一个小时没有搜查到小偷。 在第二个小时开始时,小偷移动到区 $(2,2)$。 警察搜查了区 $(8,1)$ 和 $(80,2)$,没有找到小偷。 由于警方没有进一步调查,小偷成功逃脱。

题目描述

There was a big bank robbery in Tablecity. In order to catch the thief, the President called none other than Albert – Tablecity’s Chief of Police. Albert does not know where the thief is located, but he does know how he moves. Tablecity can be represented as $ 1000×2 $ grid, where every cell represents one district. Each district has its own unique name “ $ (X,Y) $ ”, where $ X $ and $ Y $ are the coordinates of the district in the grid. The thief’s movement is as Every hour the thief will leave the district $ (X,Y) $ he is currently hiding in, and move to one of the districts: $ (X-1,Y) $ , $ (X+1,Y) $ , $ (X-1,Y-1) $ , $ (X-1,Y+1) $ , $ (X+1,Y-1) $ , $ (X+1,Y+1) $ as long as it exists in Tablecity. Below is an example of thief’s possible movements if he is located in district (7,1): ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF575D/a0d5ba8aa7c91df3fc0d8a3e1cc7b99b3bbd4635.png) Albert has enough people so that every hour he can pick any two districts in Tablecity and fully investigate them, making sure that if the thief is located in one of them, he will get caught. Albert promised the President that the thief will be caught in no more than 2015 hours and needs your help in order to achieve that.

输入输出格式

输入格式


There is no input for this problem.

输出格式


The first line of output contains integer $ N $ – duration of police search in hours. Each of the following $ N $ lines contains exactly 4 integers $ X_{i1} $ , $ Y_{i1} $ , $ X_{i2} $ , $ Y_{i2} $ separated by spaces, that represent 2 districts ( $ X_{i1} $ , $ Y_{i1} $ ), ( $ X_{i2} $ , $ Y_{i2} $ ) which got investigated during i-th hour. Output is given in chronological order (i-th line contains districts investigated during i-th hour) and should guarantee that the thief is caught in no more than 2015 hours, regardless of thief’s initial position and movement. - $ N<=2015 $ - $ 1<=X<=1000 $ - $ 1<=Y<=2 $

输入输出样例

输入样例 #1

В этой задаче нет примеров ввода-вывода.
This problem doesn't have sample input and output.

输出样例 #1

Смотрите замечание ниже.
See the note below.

说明

Let's consider the following output: 2 5 1 50 2 8 1 80 2 This output is not guaranteed to catch the thief and is not correct. It is given to you only to show the expected output format. There exists a combination of an initial position and a movement strategy such that the police will not catch the thief. Consider the following initial position and thief’s movement: In the first hour, the thief is located in district (1,1). Police officers will search districts (5,1) and (50,2) and will not find him. At the start of the second hour, the thief moves to district (2,2). Police officers will search districts (8,1) and (80,2) and will not find him. Since there is no further investigation by the police, the thief escaped!

Input

题意翻译

#### 题目描述 `Tablecity` 发生了一起重大银行抢劫案,为了将小偷绳之以法,总统指派警察局局长 `Albert` 去执行抓捕小偷的任务。他不知道小偷在哪里,但他知道小偷会怎么走。 `Tablecity` 可以看作是一个$1000×2$的一个坐标系,一个单元格看作是一个区。小偷只能往左上角,右上角,左下角,右下角,正左边和正右边移动。 `Albert` 有足够的人手,可以保证每个小时搜完两个区。在任何时刻小偷如果在搜索范围内,小偷就会被抓获。`Albert` 警长已经向总统承诺在 $2015$ 个小时内完成任务,他需要你的帮助来达到这个目标。 #### 输入格式 此题没有输入。 #### 输出格式 第一行包括一个整数 $N$,代表搜索的时间。 而后的 $N$ 行每一行包括 $4$ 个整数 $X_{i_1}, Y_{i_1}, X_{i_2}, Y_{i_2}$,代表两个区的位置。输出按时间顺序给出,并且应保证小偷在不超过 $2015$ 小时内被抓获,无论小偷的初始位置和移动如何。 #### 说明与提示 考虑以下输出: ``` 2 5 1 50 2 8 1 80 2 ``` 这个输出不能保证抓到小偷,也不正确。 它只是展示输出格式。存在初始位置和移动策略的组合,使得警察不会抓到小偷。 考虑以下初始位置和小偷的移动: 在第一个小时,小偷位于区 $(1,1)$。 警察搜查了区 $(5,1)$ 和 $(50,2)$,第一个小时没有搜查到小偷。 在第二个小时开始时,小偷移动到区 $(2,2)$。 警察搜查了区 $(8,1)$ 和 $(80,2)$,没有找到小偷。 由于警方没有进一步调查,小偷成功逃脱。

加入题单

算法标签: