HDU 6857 Clockwise or Counterclockwise(2020杭电暑期多校训练第八场)

Clockwise or Counterclockwise
Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 112 Accepted Submission(s): 86
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(x1,y1), B(x2,y2), C(x3,y3) 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≤T≤1 000), denoting the number of test cases.
In the next T lines, each line contains six space-separated integers x1, y1, x2, y2, x3, y3 (?109≤x1,y1,x2,y2,x3,y3≤109) denoting the coordinate of A, B and C.
It is guaranteed that A, B, C are pairwise distinct and |AO|=|BO|=|CO|>0.
【HDU 6857 Clockwise or Counterclockwise(2020杭电暑期多校训练第八场)】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

题意:
给你三个点以(0,0)为圆心画点,问是顺时针画的还是逆时针画的。
题解:
HDU 6857 Clockwise or Counterclockwise(2020杭电暑期多校训练第八场)
文章图片

高中知识。
Code:
#include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long using namespace std; const int INF=0x3f3f3f3f; const double pi=acos(-1.0),eps=1e-8; const ll mod =998244353; const int maxn=1e5+5; int main() { int n; scanf("%d",&n); for(int i=0; i0)printf("Counterclockwise\n"); else printf("Clockwise\n"); } }

    推荐阅读