公式

コンテスト全体の解説 by evima

Hints

A - Chocolate

Hint 1

When you have a \(7 \times 11\) chocolate bar, the answer will definitely be No if any of the following conditions are met. Please fill in the blanks.

  • You need to give chocolate bars that are at least \(1 \times 1\) with a total area of \(??\) or more
  • You need to give chocolate bars that are at least \(2 \times 2\) with a total area of \(??\) or more
  • You need to give chocolate bars that are at least \(4 \times 4\) with a total area of \(??\) or more

Hint 2

Consider the case where you have a \(7 \times 11\) chocolate bar. What will be the answer if none of the three conditions in Hint 1 is met?

Hint 3

Let’s apply the considerations from Hints 1 and 2 to general \(H, W\).

Editorial: https://atcoder.jp/contests/arc172/editorial/9347

B - AtCoder Language

Hint 1

Consider what the answer would be when \(K = 1\).

Hint 2

Consider what the answer would be when \(K = 2\).

Hint 3

Consider what the answer would be when \(K = 3\).

Hint 4

Let’s apply the considerations from Hints 1, 2, and 3 to a general \(K\).

Editorial: https://atcoder.jp/contests/arc172/editorial/9348

C - Election

Hint 1

Let’s say voter \(1\) is the \(t\)-th voter. When \(t\) changes as \(t = 1, 2, \dots, N\), how will the following change?

  • The first character of the preliminary result string
  • The second character of the preliminary result string
  • The third character of the preliminary result string (and so on)

Editorial: https://atcoder.jp/contests/arc172/editorial/9349

D - Distance Ranking

Hint 1

Instead of solving the original problem right away, let’s first think about the case where we want all pairwise Euclidean distances to be the same. Specifically, consider the following problem.

  • \(N = 3\)
  • \(d(p_1, p_2) = d(p_1, p_3) = d(p_2, p_3)\)

Hint 2

By slightly shifting the answer from Hint 1, let’s meet the following conditions.

  • \(N = 3\)
  • \(d(p_2, p_3) < d(p_1, p_3) < d(p_1, p_2)\)

Hint 3

Let’s apply the considerations from Hints 1 and 2 to the case where \(N \geq 4\).

Editorial: https://atcoder.jp/contests/arc172/editorial/9350

E - Last 9 Digits

Hint 1

In fact, for any \(X\) that satisfies the constraints, there is only one integer \(n\) such that \(0 \leq n < 10^9\) and \(n^n \mod 10^9 = X\).

Hint 2

In fact, not only Hint 1, but also the following properties hold.

  • For any \(X\) \((0 \leq X < 10^2)\) that satisfies \(\mathrm{gcd}(X, 10^2) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^2\) and \(n^n \mod 10^2 = X\)
  • For any \(X\) \((0 \leq X < 10^3)\) that satisfies \(\mathrm{gcd}(X, 10^3) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^3\) and \(n^n \mod 10^3 = X\)
  • For any \(X\) \((0 \leq X < 10^4)\) that satisfies \(\mathrm{gcd}(X, 10^4) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^4\) and \(n^n \mod 10^4 = X\)
  • For any \(X\) \((0 \leq X < 10^5)\) that satisfies \(\mathrm{gcd}(X, 10^5) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^5\) and \(n^n \mod 10^5 = X\)
  • For any \(X\) \((0 \leq X < 10^6)\) that satisfies \(\mathrm{gcd}(X, 10^6) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^6\) and \(n^n \mod 10^6 = X\)
  • For any \(X\) \((0 \leq X < 10^7)\) that satisfies \(\mathrm{gcd}(X, 10^7) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^7\) and \(n^n \mod 10^7 = X\)
  • For any \(X\) \((0 \leq X < 10^8)\) that satisfies \(\mathrm{gcd}(X, 10^8) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^8\) and \(n^n \mod 10^8 = X\)
  • For any \(X\) \((0 \leq X < 10^9)\) that satisfies \(\mathrm{gcd}(X, 10^9) = 1\), there is only one integer \(n\) such that \(0 \leq n < 10^9\) and \(n^n \mod 10^9 = X\)

Hint 3

Based on Hint 2, let’s determine the integer \(n\) starting from the lower digits.

Editorial: https://atcoder.jp/contests/arc172/editorial/9351

F - Walking

Hint 1

Let \(N = 20\) and solve the following two problems.

  • What is the state after walking from intersection \(1\) to \(39\) from the state XXXYXYYXXXYXXXXYYXXY?
  • What is the state after walking from intersection \(13\) to \(28\) from the state XXXYXYYXXXYXXXXYYXXY?

Hint 2

For the two problems in Hint 1, compare the starting and ending state strings. What is happening?

Hint 3

Remember the famous Edit Distance Problem. Doesn’t it look similar?

Editorial: https://atcoder.jp/contests/arc172/editorial/9352

投稿日時:
最終更新: