当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6857:Clockwise or Counterclockwise

题目描述
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.
输入解释
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$.
输出解释
For each test case, output one line containing ''Clockwise'' or ''Counterclockwise''.
输入样例
3
1 2 2 1 -1 -2
4 3 -4 3 3 4
4 -3 4 3 3 4
输出样例
Clockwise
Clockwise
Counterclockwise
来自杭电HDUOJ的附加信息
Recommend IceyWang

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6857

最后修改于 2020-10-25T23:34:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/2000MS(Java/Others) 524288/524288K(Java/Others)