問題一覧 > 通常問題

No.2707 Bag of Words Encryption

レベル : / AI推定難易度 : 126 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 266
作問者 : Nafmo2 / テスター : dyktr_06 sepa38 ryota2357
お気に入りにしたユーザー ProblemId : 9984 / 自分の提出
問題文最終更新日: 2024-03-12 22:33:36
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 425 (MMA Contest 018) (順位表) の他の問題:

Problem Statement

You are given a string $S$ consisting of $N$ uppercase English letters.
Output the string $X$ formed by concatenating the values $C_x$, determined by the following rule, without any spaces between them.

  • $X\ = \ C_{A}C_{B} \dots C_{Z}$
Here, $C_{x} = $ the number of times the character $x$ appears in the string $S$.

Input

$N$
$S$
  • $1 \leq N \leq 10^5 $
  • $N$ is an integer
  • $S$ is a string consisting only of uppercase English letters

Output

Output the string $X$ that can be formed from $S$.

Sample

Sample 1
Input
5
ABCDE
Output
11111000000000000000000000

A, B, C, D, and E each appear once, so the output is as shown above.

Sample 2
Input
12
AAAAAAAAAABB
Output
102000000000000000000000000

There are 10 A's and 2 B's, so the output is as shown above.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。