First week 7.19-7.25

Source: Internet
Author: User

The summer vacation is still written by week. A multi-school question is opened in a separate article.

7.19

Fill a calculated guest.

429 Penguin Mobile Map

Because the angles are all integers. Calculates the small sector area of 1° for each angle and can.

The pit point is that R has 1e5. Accuracy is 1e-3. So the Pi precision is high.

When the angle is a=b, it is not covered. Understood to cover a week so always WA.

1# include <iostream>2# include <cstdio>3# include <cstring>4# include <algorithm>5 using namespacestd;6 Const Long DoublePi=3.141592653589793;7 Long Doublemax[ the];8 9 intMainvoid)Ten { One     intT Cin>>T; A      while(t--) -     { -memset (MAX,0,sizeof(MAX)); the         intN scanf"%d",&n); -          while(n--) -         { -             intb;Long DoubleR; +scanf"%lf%d%d",&r,&a,&b); -a+= -; b+= -; +              for(inti=a;i<b;i++) max[i]=Max (max[i],r); A         } at         Long Doubleans=0; -          for(intI=0;i< the; i++) ans+=pi*max[i]*max[i]/ the; -printf"%lf\n", ans); -     } -     return 0; -}
Aguin

First week 7.19-7.25

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.