蜜汁

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

QQ 是一个劳逸结合的孩子(☞学习两分钟,游戏两小时)

Description

QQ 玩到了一个游戏,大概是这样的:

有一个迷宫,迷宫四处全是危险,但值得庆幸的是这个迷宫的路是一些圆,可以走,要从一个坐标走到目标点。

QQ 并不会,所以他来请教你,你只需要判断这个是否有解就可以啦。

原始有一个在 (0,0)(0,0) 点半径为 11 的圆。 有解输出1,无解输出0\color{white}{\texttt{有解输出1,无解输出0}}

Format

Input

第一行一个整数 TT 表示有 TT 关。

接下来第一行两个数字 xe,yex_e, y_e 表示终止点。

然后就是一个整数 nn

然后 nn 行,三个数,代表圆的中心的坐标,以及半径长度。

Output

TT 行,每行一个数,表示答案。

Limitation

1T101 \le T \le 10

108x,y,xe,ye108-10^8 \le x, y,x_e,y_e\leq10^8

1r1081 \le r\le 10^8

1n10001\le n \le 1000

KUNKKA做不了满分的题

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
24
Start at
2024-1-20 19:30
End at
2024-3-2 11:30
Duration
1000 hour(s)
Host
Partic.
7