F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

YJC counts stars

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/262144 K (Java/Others)
Total Submission(s): 737    Accepted Submission(s): 293


Problem Description
YJC is an old driver of mini train. One night he looked up to the sky and realised that the sky can be abstracted as a plane G and the stars can be abstracted as some points in the plane.
He labeled the points from $1$ to $n$. Also, he couldn't find a line crossing three points. YJC connected some points with some segments. But he made sure the segments wouldn't cross each other. YJC is extremely interested in some subsets of the points in which every two points are connected. He wants to find the subsets with maximum points and count them.
 

Input
Multiple tests.

For each test:

The first line lie two integers $n,m$,indicating the number of points and the number of segments in G.
The next $n$ lines each line lie two integers $x,y$, indicating the coordinates of the $i$th point.
The next $m$ lines each line lie two integers $u,v$, indicating an segment (u,v).
 

Output
For each test:

Two integers sz and sum, representing the number of the maximum points and the number of the maximum subsets.
 

Sample Input
2 1 1 1 2 2 1 2 3 3 1 1 2 2 4 5 1 2 2 3 3 1
 

Sample Output
2 1 3 1
 

Hint
$1 \leq n \leq 1000$ $1 \leq T \leq 5$(T represents the number of testcases)
It is guaranteed that no two edges or points are exactly the same and $u \neq v$.
$-1e9 \leq x,y \leq 1e9$
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 06:36:44, Gzip enabled