27 October in SS

Source: Internet
Author: User
Contesta. chrono

Calculate the annual calendar year of a certain year.

Too easy.

However, I forget that the C ++ modulo operation isRound to 0. However, the data is too watery and there is still 90 points.

B. Clock

Calculates the angle between the hour hand and the minute hand. Assume that the hour hand and the minute hand pointer are aligned at any time. For example, the angle at is 0 °, and the angle at is 6 °. Angle value range: [0 °, 180 ° ).

Too easy.

C. Sequence

Given a series \ (A \) with a length of \ (n \), each modification operation can only perform auto-increment and auto-subtraction on a continuous interval, calculate the minimum number of operations for each number in the sequence, and the total number of solutions for achieving the minimum number of operations. $1 \ Le n \ le 10 ^ 5 ,? 0 \ le a_ I <2 ^ {31 },? A_ I \ In \ mathbf {n} $.

Sample input:

104 32 16 23 46 49 42 16 30 21 

Sample output:

7518 

First, find the differential array for the series, and record it as \ (d =\{ 28,-16,7,-7,-26,14,-9 \}\).

Find the sum of all positive numbers in \ (d \) and the opposite number of all negative numbers. The maximum value of both is the minimum number of operations.

+ 1 indicates the total number of solutions.

Why?

D. milktea

It is known that the uptake of an energy substance can reduce the task completion time and quantify it as a physical quantity \ (A \ Text {s} \ cdot \ Text {ml} ^ {-1 }\). The \ (a_ I \), estimated completion time \ (B _ I \), and term time \ (d_ I \) of the given \ (n \) tasks \). Find the minimum intake of certain energy substances that can be completed on time for all tasks, and retain two decimal places. \ (1 \ Le n \ le 2 \ cdot 10 ^ 5 \).

Note: The effects of certain energy substances on the completion time of any task are the same and universal. (Pitfall)

Too easy.

27 October in SS

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.