经典简约
清爽简洁,回归本真
液态水晶
毛玻璃+霓虹光带
赛博朋克
霓虹故障艺术风
🚫
违规操作检测
禁止使用右键菜单
⚠️ 此操作已被系统记录
1

Circle and triangle

📝 题解 🔵 仅限 C++
题目描述
<p><style type="text/css"></style></p> <p class="western" style="margin-bottom: 0in"></p> <p><span style="font-size: large;"> <p class="western" style="margin-bottom: 0in"><span style="font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; T<font color="#000000">here is a circle and a triangle in the world of geometry. Now give you the position of both of them, can you tell the position relationship between them? Isn&rsquo;t it too simple? GOOD LUCK &amp;&amp; HAVE FUN!</font></span></p> <span style="font-family: Arial;"> <br /> </span></span></p> <p></p>
输入格式
<p><style type="text/css"><span style="font-size: large;"><span style="font-family: Arial;"> &lt;!-- @page { margin: 0.79in } P { margin-bottom: 0.08in; direction: ltr; color: #000000; text-align: justify; widows: 0; orphans: 0 } P.western { font-family: "Times New Roman", serif; font-size: 10pt; so-language: en-US } P.cjk { font-family: "宋体", "SimSun"; font-size: 10pt; so-language: zh-CN } P.ctl { font-family: "Times New Roman", serif; font-size: 10pt; so-language: ar-SA } --&gt; </span></span></style></p> <p class="western" style="margin-bottom: 0in"><span style="font-size: large;"><span style="font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The first line of input contains an integer t (1&lt;=t&lt;=100), which is the number of test cases. For each case, the first line consists of three integers x, y and r which represent the position of the center of the circle and the radius of the circle. The second line consists of six integers which represent the three points of the triangle (the absolute value of each coordinate is less than 1000, and 0 &lt; r &lt; 1000).</span></span></p>
输出格式
<p><span style="font-size: large;"><span style="font-family: Arial;"><br /> </span></span></p> <p><style type="text/css"></style></p> <p><span style="font-size: large;"><span style="font-family: Arial;">For each case output one line like &quot;Case #K: M&quot;, K means the case number, and M means the position relationship between the circle and the triangle (M=&rdquo;OO&rdquo; when Deviation or tangency; M = &quot;II&quot; when inclusion; M=&quot;XX&quot; when intersect which means the common area between them is not zero ).</span></span></p>
样例
样例输入 1
3 0 0 1 -5 -5 0 5 5 0 0 0 1 -2 -1 0 1 2 1 0 0 1 5 5 6 5 6 6
样例输出 1
Case #1: II Case #2: XX Case #3: OO
提交代码
请先登录后提交

🤖 AI 解题助手

DeepSeek
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这道题,可以帮你分析思路、提供代码示例。
⚠️ 请先登录后使用