[2016-04-01] [Codeforces] [659D] [Bicycle Race]

Source: Internet
Author: User

  • Time: 2016-04-01-19:10:24
  • Title Number: [2016-04-01][codeforces][659d][bicycle Race]
  • The main topic: walking around the coastline, each walk the way up and down, and finally back to the end, in the corner if not in time to turn will fall into the water, ask how many places may fall into the water
  • Analysis:
    • It can be found that in the internal angle of the 270° is possible to fall into the water, set such a place has x, then the inner angle and the n-2 * (* * *) = * x + (n-x) * 90, get x = n? 4 2 n ? 4 2
  
 
  1. #include <cstdio>
  2. using namespace std;
  3. int main(){
  4. int n;
  5. scanf("%d",&n);
  6. printf("%d\n",(n - 4)/2);
  7. return 0;
  8. }


From for notes (Wiz)

[2016-04-01] [Codeforces] [659D] [Bicycle Race]

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.