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

Clockwise or Counterclockwise

Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 662    Accepted Submission(s): 409


Problem Description
It is preferrable to read the pdf statment.

After some basic geometric lessons, Cuber QQ has learned that one can draw one and only one circle across three given distinct points, on a 2D plane. Specialized in art, Cuber QQ has shown remarkable skills to draw circle in one stroke, especially when the stroke is done clockwise. He wonder whether he will be able to do that if 3 points has been given.

In particular, he is given three distinct points $A(x_1, y_1)$, $B(x_2, y_2)$, $C(x_3, y_3)$ which lie on a circle centered at $O(0,0)$. Imagine starting from $A$, he draws the circle across $B$ and finally gets $C$. Determine whether he is drawing clockwise or counterclockwise.
 

Input
The first line contains an integer $T$ ($1\le T\le 1~000$), denoting the number of test cases.

In the next $T$ lines, each line contains six space-separated integers $x_1$, $y_1$, $x_2$, $y_2$, $x_3$, $y_3$ ($-10^9\le x_1,y_1,x_2,y_2,x_3,y_3\le10^9$) denoting the coordinate of $A$, $B$ and $C$.

It is guaranteed that $A$, $B$, $C$ are pairwise distinct and $|AO|=|BO|=|CO|> 0$.
 

Output
For each test case, output one line containing ''Clockwise'' or ''Counterclockwise''.
 

Sample Input
3 1 2 2 1 -1 -2 4 3 -4 3 3 4 4 -3 4 3 3 4
 

Sample Output
Clockwise Clockwise Counterclockwise
 

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-24 19:18:36, Gzip enabled