White Rabbit is a businessman. It has n warehouses. The i-th warehouse is located at (x1[i],y1[i]) and has a[i] units of products initially. There will be m orders coming in order. When the i-th order is coming, White Rabbit will drive to s[i] warehouses from x[i][0] to x[i][S[i]-1] in order. More specifically, White Rabbit will drive to the x[i][0]-th warehouse first(the car is empty before arriving at x[i][0]-th warehouse), and move any number of products to the car. Then White Rabbit will drive to the x[i][1]-th warehouse. When arriving at x[i][1]-th warehouse, White Rabbit can put any number of products form the warehouse on the car or from the car on the warehouse. After leaving the x[i][s[i]-1]-th warehouse, White Rabbit will go to the house of the customer and sell all of the rest products in the car to the customer. The house of i-th customer is located at (x2[i],y2[i]). Besides, the i-th customer has a limit lim[i], denoting that the number of products White Rabbit gives the i-th customer can't be larger than lim[i]. White Rabbit wants to maximize the number of products it sells. White Cloud wants to interfere White Rabbit. White Cloud has installed k Jammers. The i-th Jammer is located at (x3[i],y3[i]). It works on a circle with radius r[i]. If the connecting segments of two points are tangent or intersecting with the circle, the contact of two points will be disturbed. To keep contact with the i-th customer, White Rabbit will skip x[i][t]-th(0 White Rabbit wants to know the maximum number of products it can sell.
输入描述:
The first line of input contains 3 integers n,m,k(n For the next n lines, each line contains 3 integers x1[i],y1[i],a[i].For the next k lines, each line contains 3 integers x3[i],y3[i],r[i].For the next m lines, the i-th line contains 4+s[i] integers x2[i],y2[i],s[i],lim[i] and s[i] different numbers.All the number in input is in range [0,1000000000].The input ensure that the location of customers' homes and warehouses is not within the coverage of any jammer.


输出描述:
Print the maximum number of products White Rabbit can sell.
示例1

输入

3 3 1
1 1 5
4 5 0
9 2 7
2 2 1
4 4 2 3 1 2
0 9 2 3 1 2
9 1 2 8 3 2

输出

11
加载中...