Logo Yudai Fukushima's webpage
  • English
    日本語
Logo
  • Posts
  • Competitive Programming
    • Codeforces 713 E
    • TopCoder 676 Div1 250
  • Develop
Hero Image
TopCoder SRM 676 Div.1 Easy: Water Tank

Overview You are given an empty water tank with a capacity of \(C\) liters. Into this tank, the water flows \(x[i]\) liters for \(t[i]\) seconds. (\(i = 0\) to \(n - 1\)) You can set the value of output pipe to any maximum output rate \(R\) (not negative value, but do not have to be an integer) in liters per second. Determine the most little output rate limit \(R\) such that the amount of water in the tank will never exceed \(C\) liters.

September 21, 2021 Read
Hero Image
Codeforces #713(Div.3) E: Permutation by Sum

Problem Overview Consider the permutation 1 to \(n\) called \(P\). The parameters \(l, r, s\) that satisfies \(1 \leq l \leq r \leq n\) and \(1 \leq s \leq \frac{n(n + 1)}{2}\) are given. Find the permutation which satisfies \(P_{l} + P_{l + 1} + … + P_{r} = s\). Print any permutation of length \(n\) that fits the condition above if such a permutation exists; otherwise, -1. Problem Explanation First, consider the minimum and the maximum value we can generate with the length \(r - l + 1\).

May 9, 2021 Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
  • Recent Posts
Contact me:
  • grandnadaifuku@example.com

Toha Theme Logo Toha
© 2021 Copyright.
Powered by Hugo Logo