8503: Dusk Moon

内存限制:128 MB 时间限制:11 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述

You are given n points p1,p2,,pn on the 2D plane. You need to perform q operations. Each operation is one of the following:

  • ''1 k x y'' (1kn1x,y108): Change the coordinate of the point pk into (x,y).
  • ''2 l r'' (1lrn): Find the minimum non-negative integer R such that you can cover all the points pl,pl+1,,pr using a single circle whose radius is R.
  • Note that a point is considered to be covered if and only if it is inside the circle or on the border of the circle.

    输入格式

    The first line contains a single integer T (1T3), the number of test cases. For each test case:

    The first line of the input contains two integers n and q (1n,q100,000), denoting the number of points and the number of operations.

    In the next n lines, the ith line contains two integers xi and yi (1xi,yi108), describing the coordinate of pi.

    Each of the next q lines describes an operation in formats described in the statement above.

    It is guaranteed that all the values of xiyixy are chosen uniformly at random from integers in their corresponding ranges. The randomness condition does not apply to the sample test case, but your solution must pass the sample as well.

    输出格式

    For each query, print a single line containing an integer, denoting the minimum radius.

    输入样例 复制

    1
    5 5
    1 1
    2 2
    3 1
    3 3
    2 5
    2 1 5
    2 1 1
    2 1 2
    1 1 10 1
    2 1 5

    输出样例 复制

    3
    0
    1
    5