Educational Codeforces Round 103 (Rated for Div. 2)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1476 Educational Codeforces Round 103 (Rated for Div. 2) FINISHED False 7200 119892299 Jan. 29, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20120 ) B Inflation PROGRAMMING binary search brute force greedy math

B"You have a statistic of price changes for one product represented as an array of n positive integers p_0, p_1, ... , p_{n - 1} , where p_0 is the initial price of the product and p_i is how the price was increased during the i -th month. Using these price changes you are asked to calculate the inflation coefficients for each month as the ratio of current price increase p_i to the price at the start of this month (p_0 + p_1 + ... + p_{i - 1}) . Your boss said you clearly that the inflation coefficients must not exceed k %, so you decided to increase some values p_i in such a way, that all p_i remain integers and the inflation coefficients for each month don't exceed k %. You know, that the bigger changes -- the more obvious cheating. That's why you need to minimize the total sum of changes. What's the minimum total sum of changes you need to make all inflation coefficients not more than k %? The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 2 <= n <= 100 ; 1 <= k <= 100 ) -- the length of array p and coefficient k . The second line of each test case contains n integers p_0, p_1, ... , p_{n - 1} ( 1 <= p_i <= 10^9 ) -- the array p . For each test case, print the minimum total sum of changes you need to make all inflation coefficients not more than k %. In the first test case, you can, for example, increase p_0 by 50 and p_1 by 49 and get array [20150, 50, 202, 202] . Then you get the next inflation coefficients: In the second test case, you don't need to modify array p , since the inflation coefficients are already good: "...

Tutorials

87356

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
105981170 vjudge5 B Jan. 30, 2021, 5:36 a.m. OK GNU C++11 TESTS 9 15 0
105980712 vjudge1 B Jan. 30, 2021, 5:29 a.m. OK GNU C++11 TESTS 9 15 0
105980523 bkifhr6 B Jan. 30, 2021, 5:25 a.m. OK GNU C++11 TESTS 9 15 0
105972130 bkifhr8 B Jan. 30, 2021, 2:06 a.m. OK GNU C++11 TESTS 9 30 0
105946406 Spacelessd B Jan. 29, 2021, 5:22 p.m. OK GNU C++11 TESTS 9 30 0
105936136 Cirno_and_Daiyousei B Jan. 29, 2021, 4:31 p.m. OK GNU C++11 TESTS 9 30 0
105944647 Daniel-Y B Jan. 29, 2021, 5:08 p.m. OK GNU C++11 TESTS 9 30 1638400
105977760 zhizhizi B Jan. 30, 2021, 4:20 a.m. OK GNU C++11 TESTS 9 31 0
105975828 Hakunamatata25 B Jan. 30, 2021, 3:38 a.m. OK GNU C++11 TESTS 9 31 0
105972335 do_while_true B Jan. 30, 2021, 2:12 a.m. OK GNU C++11 TESTS 9 31 0

remove filters

Back to search problems