这一题题目有点坑,注意这句话: 这代表了其圆心就是矩形的中心! 然后就可以推公式: 可知: x = 200/(a+2atan(b/c)*r); r = sqrt(a*a + b*b); 所以有AC代码如下: #include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { ; double a, b; while(scanf("%lf : %lf&q…
题目大意: 两题几何水题. 1.UVA 11646 - Athletics Track 如图,体育场的跑道一圈400米,其中弯道是两段半径相同的圆弧,已知矩形的长宽比例为a:b,求长和宽的具体数值. 2.UVA 11817 - Tunnelling the Earth 给出地球上起点和终点(均用度数的经纬度表示),从起点出发,可以沿着球面最短路径走.也可以钻隧道,走直线.求这两种方法的路程差. 题解: 1.UVA 11646 - Athletics Track http://uva.online…
题目传送门 题意:给了长宽比例,操场一圈400米,问原来长宽的长度 分析:推出公式 /************************************************ * Author :Running_Time * Created Time :2015/10/22 星期四 15:19:59 * File Name :UVA_11646.cpp ************************************************/ #include <cstdio>…
题意:如图,体育场的跑道一圈是400米,其中弯道是两段半径相同的圆弧.已知矩形的长宽比例为a:b,求长和宽的具体数值. 注意:圆弧的圆心在纵轴线上! #include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { double i=1,a,b,w,k,thy,d; char c; while(cin>>a>>c>>b) { k=…
题目链接:http://acm.swust.edu.cn/problem/771/    Description 将军有一个用栅栏围成的矩形农场和一只奶牛,在农场的一个角落放有一只矩形的箱子,有一天将军要出门,他就把奶牛用一根绳子套牢,然后将绳子的另一端绑到了那个箱子不靠栅栏的角上,现在给定箱子的长和宽,绳子的长度,你的问题是计算奶牛能够到达的面积.   Input 有多组测试数据. 每一组数据为一行,三个整数,L(0<=L<=500),M,N(1<=M,N<=500),分别表示绳…
题目传送门 /* 题意:在坐标轴上一群蚂蚁向左或向右爬,问经过ts后,蚂蚁的位置和状态 思维题:本题的关键1:蚂蚁相撞看作是对穿过去,那么只要判断谁是谁就可以了 关键2:蚂蚁的相对位置不变 关键3:order数组记录顺序 */ #include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #include <string> #include <cm…
题目传送门 /* 题意:n个头,m个士兵,问能否砍掉n个头 贪心/思维题:两个数组升序排序,用最弱的士兵砍掉当前的头 */ #include <cstdio> #include <cstring> #include <algorithm> using namespace std; ; const int INF = 0x3f3f3f3f; int a[MAXN], b[MAXN]; int main(void) //UVA 11292 The Dragon of Loo…
2010浙江省数学竞赛,附加题. 设$D,E,F$分别为$\Delta ABC$的三边$BC,CA,AB$上的点,记$\alpha=\dfrac{BD}{BC},\beta=\dfrac{BD}{BC},\gamma=\dfrac{AF}{AB}$ 证明:$S_{\Delta DEF}\ge\alpha\beta\gamma S_{\Delta ABC}$ 证明:$S_{DEF}=S_{ABC}-S_{AFE}-S_{BDF}-S_{DCE}$$=S_{ABC}(1-\sum\limits_{c…
  Three Families  Three families share a garden. They usually clean the garden together at the end of each week, but last week, family C was on holiday, so family A spent 5 hours, family B spent 4 hours and had everything done. After coming back, fam…
There is a war and it doesn't look very promising for your country. Now it's time to act. You have a commando squad at your disposal and planning an ambush on an important enemy camp located nearby. You have N soldiers in your squad. In your master-p…