FZU 2213 Common Tangents(公切线)】的更多相关文章

Problem 2213 Common Tangents Accept: 7    Submit: 8Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description Two different circles can have at most four common tangents. The picture below is an illustration of two circles with four common…
Description 题目描述 Two different circles can have at most four common tangents. The picture below is an illustration of two circles with four common tangents. Now given the center and radius of two circles, your job is to find how many common tangents…
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2213 题目大意:两个圆,并且知道两个圆的圆心和半径,求这两个圆共同的切线有多少条,若有无数条,输出-1,其他条如数输出 解题思路:这道题只需要判断两圆心的距离与半径的距离即可,代码里面有详细解释 AC代码 #include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #incl…
其实是不太好意思往博客上放的,因为是一道巨水的题,但是我却错了一次,没有判断重合,放上还是为了警示自己,尽量不要在水题上罚时 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int main() { int t; int x1,y1,r1,x2,y2,r2; scanf("%d",&t); while(t--) { scanf("…
Problem B Common Tangents Accept: 191    Submit: 608 Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description Two different circles can have at most four common tangents. The picture below is an illustration of two circles with four commo…
from:piaocoder Common Tangents(两圆之间的公公切线) 题目链接: http://acm.fzu.edu.cn/problem.php?pid=2213 解题思路: 告诉你两个圆的圆心与半径,要你找出他们的公共切线的个数. 套模板即可. http://blog.csdn.net/piaocoder/article/details/41649089 #include <iostream> #include <cstdio> #include <cma…
 题意:给出两个圆,求它们的公切线,并依照一定格式输出 做法:模拟 代码: #include<iostream> #include<map> #include<string> #include<cstring> #include<cstdio> #include<cstdlib> #include<cmath> #include<queue> #include<vector> #include&…
Circles and Pi Introduction id: intro-1 For as long as human beings exist, we have looked to the sky and tried to explain life on Earth using the motion of stars, planets and the moon. The Greeks were the first to discover that all celestial objects…
题意: 给出两个圆的圆心坐标和半径,求这两个圆的公切线切点的坐标及对应线段长度.若两圆重合,有无数条公切线则输出-1. 输出是按照一定顺序输出的. 分析: 首先情况比较多,要一一判断,不要漏掉. 如果高中的那点老底还在的话,代码还是很好理解的. //#define LOCAL #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <vect…
写在前面: 上一篇记录了Socket聊天程序的客户端设计,为了记录的完整性,这里还是将Socket聊天的最后一个模块--Common模块记录一下.Common的设计如下: 功能说明: Common模块主要是数据交互,这里使用JSON数据进行交互,common模块定义了各类交互信息,SendHelper实现的socket信息的传送,I18N是语言话,ConstantValue是系统中的配置以及常量(这里常量都是用接口,这个可能不太好),对于ReturnMessage拥有一系列的DTO作为其cont…