Блог пользователя 69-64-79

Автор 69-64-79, 13 лет назад, По-английски
  1. A
    n*m/2.
  2. B
    Record the occurrences' number of each letters, signed as cnt[char].
    For each char in string, get the cnt[c]^2 plus together, and this is the answer.
  3. C
    Calculate the Convex Hull
    The sum of the max value between x-difference and y-difference of each adjacent points in the convex hull's set and 4 is the answer.
    4 step can make a circle of 360 degree.
  4. D
    Counting the answer with Half, and check the answer using Dynamic Programming.
    Let dp[i][j] means the probability of first i objects where j of them exploded, and the transfering formular is:
    dp[i][j] = P(i) * dp[i - 1][j - 1] + (1 - P(i)) * dp[i - 1][j], where P(i) means the i-th object exploding's probability.

Полный текст и комментарии »

Разбор задач Codeforces Beta Round 47
  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

Автор 69-64-79, 13 лет назад, По-английски
  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится