Clockwise or Counterclockwise

TimeLimit:2000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
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''.
SampleInput
3
1 2 2 1 -1 -2
4 3 -4 3 3 4
4 -3 4 3 3 4
SampleOutput
Clockwise
Clockwise
Counterclockwise
Submit
题目统计信息详细
总AC数3
通过人数3
尝试人数3
总提交量4
AC率75.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: