SDUT 2877:angry_birds_again_and_again

376人阅读 评论(0) 收藏 举报
分类:

angry_birds_again_and_again

Time Limit: 2000ms   Memory limit: 65536K  有疑问?点这里^_^

题目描述

The problems called "Angry Birds" and "Angry Birds Again and Again" has been solved by many teams in the series of contest in 2011 Multi-University Training Contest.
 
This time we focus on the yellow bird called Chuck. Chuck can pick up speed and distance when tapped.
 
You can assume that before tapped, Chuck flies along the parabola. When tapped, it changes to fly along the tangent line. The Chuck starts at the coordinates (0, 0). Now you are given the coordinates of the pig (Px, 0), the x-coordinate of the tapping position (Tx) and the initial flying angle of Chuck (α).

∠AOx = α
Please calculate the area surrounded by Chuck’s path and the ground.(The area surrounded by the solid line O-Tapping position-Pig-O)

输入

The first line contains only one integer T (T is about 1000) indicates the number of test cases. For each case there are two integers, px tx, and a float number α.(0 < Tx ≤ Px ≤ 1000, 0 < α <  ) .

输出

One line for each case specifying the distance rounded to three digits.

示例输入

1
2 1 1.0

示例输出

0.692

提示

 

来源

2014年山东省第五届ACM大学生程序设计竞赛

迷失在幽谷中的鸟儿,独自飞翔在这偌大的天地间,却不知自己该飞往何方……

题意:给出两个函数,定积分求区域面积。

#include <stdio.h>
#include <math.h>
int main()
{
    int T;
    double c,t,p;
    scanf("%d",&T);
    while(T--)
    {
        scanf("%lf%lf%lf",&p,&t,&c);
        double b=tan(c);
        double a=b*p/(2*t*t-2*p*t-t*t);
        double area=(1/3.0)*a*t*t*t+0.5*b*t*t+(p-t)*(a*t*t+b*t)*0.5;
        printf("%.3lf\n",area);
    }
    return 0;
}

查看评论

[ACM] sdut 2877 angry_birds_again_and_again (简单数学积分)

angry_birds_again_and_again Time Limit: 2000ms   Memory limit: 65536K  有疑问?点这里^_^ ...
  • sr19930829
  • sr19930829
  • 2014-11-27 20:48:28
  • 1657

2014年山东省第五届ACM--angry_birds_again_and_again

angry_birds_again_and_again                                                                         ...
  • kavu1
  • kavu1
  • 2016-04-10 15:37:47
  • 439

Sdut-Ver5.2.0

  • 2012年10月26日 18:53
  • 2.12MB
  • 下载

山东省第五届ACM大学生程序设计竞赛 angry_birds_again_and_again 求积分

首页比赛ProblemsRanklistStatusStatistics acmer(Yt_zp) 注销 angry_birds_again_and_again ...
  • zp___waj
  • zp___waj
  • 2016-04-20 08:57:28
  • 479

2014山东省第五届ACM省赛 angry_birds_again_and_again

angry_birds_again_and_again Time Limit: 2000MS Memory limit: 65536K 题目描述 The problems called "A...
  • u014552756
  • u014552756
  • 2016-03-28 17:50:40
  • 359

山东省第五届省赛 A题 angry_birds_again_and_again(简单数学 积分问题)

Description The problems called “Angry Birds” and “Angry Birds Again and Again” has been solved by ...
  • Puppet__
  • Puppet__
  • 2018-01-22 13:54:24
  • 56

第五届山东省ACM angry_birds_again_and_again(积分)

angry_birds_again_and_again 给定曲线,给定一个点,求从曲线上某点到x轴上某点直线恰为曲线切线和曲线围成的面积。 水题,求积分做就好了,但是开始还错了,回车竟然判成WR...
  • u014665013
  • u014665013
  • 2016-05-11 21:51:39
  • 651

angry_birds_again_and_again

题目描述 The problems called "Angry Birds" and "Angry Birds Again and Again" has been solved by man...
  • HYNU_zhizuzhe
  • HYNU_zhizuzhe
  • 2014-08-29 12:55:29
  • 423

解题报告代码 sdut2107

  • 2011年07月29日 19:19
  • 734B
  • 下载

编码 (sdut oj)

编码 Time Limit: 1000MS Memory Limit: 65536KB Problem Description 给你一个由大写字母...
  • SwordsMan98
  • SwordsMan98
  • 2017-02-08 22:46:12
  • 283
    个人资料
    专栏达人 持之以恒
    等级:
    访问量: 37万+
    积分: 1万+
    排名: 1993
    寻找 Qianqian 遇见 就是幸运
    博客专栏
    最新评论