Problems > Two Circles

Two Circles

Difficulty: 1300 2000 ms 128 MB

math geometry

Classify two circles: SEPARATE (no common point), CONTAINED (one strictly inside the other without touching), or OVERLAP (they share at least one point).

Input: one line with six integers: x1 y1 r1 x2 y2 r2.

Output: one of the three words.

Constraints:

  • |coordinates| ≤ 104
  • 1 ≤ r ≤ 104

Sample Tests

Input 1
0 0 2 5 0 2
Output 1
SEPARATE
Input 2
0 0 5 1 0 2
Output 2
CONTAINED

Read the Editorial

Discussion (opens after you solve — no spoilers before)

No comments yet.

Submit Your Solution

Log in or create a free account to run and submit code.