M-SOLUTIONS Procon Open 2020 Thank you for your hard work! Official page
The code I wrote this time is here The result was AC up to A-D. I managed to get 4 questions AC, I struggled with problem D ...
I will explain briefly below.
The problem of finding the condition of what grade at a specific score. You can use the if statement as it is, but if you look closely, it is separated by 200 points, so You can easily find it by dividing the score by 200 and subtracting the remainder from 10.
Given 3 numbers, double the number within K times Red numbers <green numbers <blue numbers ... (condition *) The question of whether it can be done.
Since the number was 7 or less, I simply counted the number of operations to satisfy the condition * and compared it with K to answer.
The problem of determining whether a test score has been raised by multiplying it by the last K times. Even though it is the most recent multiplication of K times, K-1 is common among the number of K that can be multiplied.
A × B × C × D \\ B × C × D × E
In the case of the above figure, it is OK if you compare A and E.
Given the fluctuations in stock prices, the question of how much money can be made. I'm not sure how to solve it, but I solved it steadily because the period is 80.
--Find the minimum stock price --Buy stock price for the amount you have --Find the maximum value of the stock price --Sell off all the stocks you have
I looped that with a while statement.
Also, this was full of digits and became WA, so I changed it to long. I didn't realize that it was overwhelming.
I didn't read the question because the correct answer rate was low ...
The constraint of 200,000 is impossible! If it is the amount of calculation of N ^ 2, I could solve it, but ... well, it will not be in time.
I was able to participate for the first time in a long time. .. After all it is fun. The rating has changed from 978 to 967, and I think it's coming around ... I want to recapture 1000 next time: cry:
It's a pity that the speed to the D problem was not good because the E problem was difficult.
Thank you for reading to the end!