시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 8 | 0 | 0 | 0.000% |
Let S be a set of points on a 2-dimensional plane. Initially, S is an empty set. Let convexHull(S) be the subset of S, which is the vertices of the convex hull of S without any three collinear points.
There are Q queries, each of the either following type:
The first line contains an integer: Q (1 ≤ Q ≤ 100,000) denoting the number of queries. The next Q following lines, each contains three or five integers.
For each findHeavy(x1, y1, x2, y2) query, output the answer of the query on its own line.
14 0 0 2 0 4 6 0 5 1 1 0 2 4 6 1 4 6 0 2 0 1 5 0 6 4 1 0 2 4 6 1 0 2 5 1 0 3 3 1 0 2 6 4 0 2 0 1 0 2 6 4 1 6 4 0 2
CCW CW CCW CW CW CW CW
The following points are added to S after the first three queries, as well as the convex hull.
For the fourth query, cw is 1 while ccw is 2, thus, we print “CCW".
For the fifth query, cw is 2 while ccw is 1, thus, we print "CW".
The following points are added to S after the first seven queries, as well as the convex hull.
For the eight query, cw is 2 while ccw is 3, thus, we print "CCW".
For the ninth query, cw is 4 while ccw is 1, thus, we print “CW".
The following points are added to S after the first ten queries, as well as the convex hull.
For the eleventh query, cw is 4 while ccw is 1, thus, we print “CW".
The following points are added to S after the first twelve queries, as well as the convex hull.
For the thirteenth query, cw is 3 while ccw is 3, thus, we print "CW".
For the fourteenth query, cw is 3 while ccw is 3, thus, we print "CW".
ICPC > Regionals > Asia Pacific > Indonesia > Indonesia National Contest > INC 2017 C번