Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 100 点
問題文
整数 L,R が与えられます。
L 以上 R 以下の整数がいくつあるか求めてください。
制約
- 1\le L\le R\le 100
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
L R
出力
答えを出力せよ。
入力例 1
3 5
出力例 1
3
3 以上 5 以下の整数は 3,4,5 の 3 つです。したがって、3 を出力してください。
入力例 2
1 7
出力例 2
7
入力例 3
14 79
出力例 3
66
Score : 100 points
Problem Statement
You are given integers L and R.
Find how many integers are between L and R, inclusive.
Constraints
- 1\le L\le R\le 100
- All input values are integers.
Input
The input is given from Standard Input in the following format:
L R
Output
Output the answer.
Sample Input 1
3 5
Sample Output 1
3
The integers between 3 and 5, inclusive, are 3,4,5, which is three integers. Thus, output 3.
Sample Input 2
1 7
Sample Output 2
7
Sample Input 3
14 79
Sample Output 3
66
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 200 点
問題文
1 から N の番号が付いた N 人の人がいます。
また、1 から M の番号が付いた M 種類の服があります。人 i は服 F_i を着ています。
次の 2 個の質問に Yes か No で答えてください。
- 質問 1: N 人全員が異なる種類の服を着ていますか?
- 質問 2: M 種類の服全てについて、その服を着ている人が少なくとも 1 人ずついますか?
制約
- 1 \leq N \leq 100
- 1 \leq M \leq 100
- 1 \leq F_i \leq M
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
N M F_1 F_2 \dots F_N
出力
2 行出力せよ。i 行目には質問 i の答えが Yes であれば Yes を、No であれば No を出力せよ。
入力例 1
3 4 1 2 4
出力例 1
Yes No
全員が異なる種類の服を着ているので、1 番目の質問の答えは Yes です。
また、服 3 を着ている人は存在しないので、2 番目の質問の答えは No です。
入力例 2
4 2 1 2 1 2
出力例 2
No Yes
入力例 3
4 4 1 3 2 1
出力例 3
No No
入力例 4
5 5 1 3 4 2 5
出力例 4
Yes Yes
Score : 200 points
Problem Statement
There are N people numbered 1 through N.
There are M types of clothes numbered 1 through M. Person i is wearing clothes F_i.
Answer the following two questions with Yes or No.
- Question 1: Are all N people wearing different types of clothes?
- Question 2: For every one of the M types of clothes, is there at least one person wearing that type?
Constraints
- 1 \leq N \leq 100
- 1 \leq M \leq 100
- 1 \leq F_i \leq M
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N M F_1 F_2 \dots F_N
Output
Output two lines. The i-th line should contain Yes if the answer to question i is Yes, and No if it is No.
Sample Input 1
3 4 1 2 4
Sample Output 1
Yes No
Everyone is wearing a different type of clothes, so the answer to question 1 is Yes.
There is no person wearing clothes 3, so the answer to question 2 is No.
Sample Input 2
4 2 1 2 1 2
Sample Output 2
No Yes
Sample Input 3
4 4 1 3 2 1
Sample Output 3
No No
Sample Input 4
5 5 1 3 4 2 5
Sample Output 4
Yes Yes
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 300 点
問題文
アイテム 1 からアイテム N までの N 種類のアイテムがあります。はじめ、高橋君はアイテム 1 のみ持っています。
高橋君には M 人の友達がいます。i 人目 (1\le i\le M) の友達にアイテム A_i を渡すと、アイテム B_i をもらうことができます。
高橋君が手に入れることのできるアイテムはアイテム 1 を含めて何種類あるか求めてください。
制約
- 2\le N\le 3\times 10^5
- 1\le M\le 3\times 10^5
- 1\le A_i,B_i\le N
- A_i \neq B_i
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
N M A_1 B_1 A_2 B_2 \vdots A_M B_M
出力
答えを出力せよ。
入力例 1
5 5 1 2 2 3 3 4 2 4 5 2
出力例 1
4
例えば、以下のように行動することでアイテム 4 を手に入れることができます。
- アイテム 1 を 1 人目の友達に渡す。アイテム 2 をもらう。
- アイテム 2 を 4 人目の友達に渡す。アイテム 4 をもらう。
高橋君が手に入れられるアイテムはアイテム 1,2,3,4 の 4 種類です。したがって、4 を出力してください。
入力例 2
3 2 2 1 3 2
出力例 2
1
高橋君が手に入れられるアイテムはアイテム 1 の 1 種類です。
入力例 3
7 8 2 6 2 5 3 6 1 6 1 2 5 6 2 3 3 7
出力例 3
6
Score : 300 points
Problem Statement
There are N types of items item 1 through item N. Initially, Takahashi has only item 1.
He has M friends. If he gives item A_i to the i-th friend (1\le i\le M), he will receive item B_i.
Find how many types of items he can obtain, including item 1.
Constraints
- 2\le N\le 3\times 10^5
- 1\le M\le 3\times 10^5
- 1\le A_i,B_i\le N
- A_i \neq B_i
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N M A_1 B_1 A_2 B_2 \vdots A_M B_M
Output
Output the answer.
Sample Input 1
5 5 1 2 2 3 3 4 2 4 5 2
Sample Output 1
4
For example, Takahashi can obtain item 4 by acting as follows:
- Give item 1 to the first friend. Receive item 2.
- Give item 2 to the fourth friend. Receive item 4.
He can obtain four types of items: items 1,2,3,4. Thus, output 4.
Sample Input 2
3 2 2 1 3 2
Sample Output 2
1
He can obtain one type of item: item 1.
Sample Input 3
7 8 2 6 2 5 3 6 1 6 1 2 5 6 2 3 3 7
Sample Output 3
6
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 425 点
問題文
(, x, ) からなる文字列 A が与えられます。
あなたは A に対して次の 2 種類の操作を自由な順番で自由な回数行うことが出来ます。
- A の部分文字列
(xx)を 1 カ所選び、xxに置換する。 - A の部分文字列
xxを 1 カ所選び、(xx)に置換する。
(, x, ) からなる文字列 B が与えられます。A を B と一致させることが出来るか判定してください。
T 個のテストケースが与えられるので、それぞれに対して答えを求めてください。
部分文字列とは
S の 部分文字列 とは、S の先頭から 0 文字以上、末尾から 0 文字以上削除して得られる文字列のことをいいます。例えば、
ab は abc の部分文字列ですが、ac は abc の部分文字列ではありません。
制約
- 1 \leq T \leq 3 \times 10^5
- A, B は
(,x,)からなる長さ 1 以上 2\times 10^6 以下の文字列 - 全てのテストケースに対する |A| + |B| の総和は 2 \times 10^6 以下 (ここで |A| は A の長さを意味する)
入力
入力は以下の形式で標準入力から与えられる。
T
\mathrm{case}_1
\mathrm{case}_2
\vdots
\mathrm{case}_T
各テストケースは以下の形式で与えられる。
A B
出力
T 行出力せよ。i 行目には i 番目のテストケースの答えを出力せよ。
各テストケースでは、A を B と一致させることが出来る場合は Yes を、そうでない場合は No を出力せよ。
入力例 1
6 (xx)x x(xx) (x)x (xx) )x()x( )x()x( x (x) (((((xx)))))x x((((((((((xx)))))))))) ((xx)xx)xx (x((xx))x)(xx)
出力例 1
Yes No Yes No Yes Yes
例えば 1 番目のテストケースでは、次の手順によって A を B と一致させることが出来ます。
- A の 1 文字目から 4 文字目の
(xx)をxxに置換する。操作後の A はxxxとなる。 - A の 2 文字目から 3 文字目の
xxを(xx)に置換する。操作後の A はx(xx)となる。
Score : 425 points
Problem Statement
You are given a string A consisting of (, x, ).
You can perform the following two types of operations on A any number of times in any order.
- Choose one occurrence of the substring
(xx)in A and replace it withxx. - Choose one occurrence of the substring
xxin A and replace it with(xx).
You are given a string B consisting of (, x, ). Determine whether you can make A equal to B.
You are given T test cases; solve each of them.
What is a substring
A substring of S is a string obtained by deleting zero or more characters from the beginning and zero or more characters from the end of S.For example,
ab is a substring of abc, but ac is not a substring of abc.
Constraints
- 1 \leq T \leq 3 \times 10^5
- A and B are strings of length between 1 and 2\times 10^6, inclusive, consisting of
(,x,). - The sum of |A| + |B| over all test cases is at most 2 \times 10^6 (where |A| denotes the length of A).
Input
The input is given from Standard Input in the following format:
T
\mathrm{case}_1
\mathrm{case}_2
\vdots
\mathrm{case}_T
Each test case is given in the following format:
A B
Output
Output T lines. The i-th line should contain the answer to the i-th test case.
For each test case, output Yes if you can make A equal to B, and No otherwise.
Sample Input 1
6 (xx)x x(xx) (x)x (xx) )x()x( )x()x( x (x) (((((xx)))))x x((((((((((xx)))))))))) ((xx)xx)xx (x((xx))x)(xx)
Sample Output 1
Yes No Yes No Yes Yes
For example, in the first test case, you can make A equal to B by the following procedure:
- Replace the
(xx)from the 1st through 4th characters of A withxx. After this operation, A isxxx. - Replace the
xxfrom the 2nd through 3rd characters of A with(xx). After this operation, A isx(xx).
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 450 点
問題文
正整数 N,A,B が与えられます。A,B の値はどちらも 1 以上 N 以下であることが保証されます。
N\times N のグリッドがあります。上から i 行目、左から j 列目のマスをマス (i,j) と表記します。はじめ、コマがマス (1,1) に置かれています。
このコマを上下左右に隣接するマスに動かす移動を N^2-2 回繰り返すことで、マス (A,B) 以外の全てのマスを経由しつつマス (N,N) までコマを動かしたいです。ただし、同じマスを 2 回以上経由してはいけません(マス (1,1),(N,N) も途中で経由してはいけません)。
そのような移動が可能か判定し、可能である場合は移動列を一つ出力してください。
T 個のテストケースが与えられるので、それぞれについて答えを求めてください。
制約
- 1\le T \le 5000
- 2\le N\le 10^3
- 1\le A,B\le N
- (A,B)\neq (1,1),(N,N)
- 全てのテストケースにおける N^2 の総和は 10^6 以下
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
T
\text{case}_1
\text{case}_2
\vdots
\text{case}_T
各テストケースは以下の形式で与えられる。
N A B
出力
各テストケースに対する答えを順に改行区切りで出力せよ。
各テストケースについて、条件を満たす移動が不可能である場合 No を出力せよ。
可能である場合、以下の形式で出力せよ。
Yes
S_1S_2\ldots S_{N^2-2}
ただし、S_k は k 回目の移動前のコマの座標をマス (i,j) として、k 回目の移動で
- マス (i,j) からマス (i,j-1) に移動する場合は S_k=
L - マス (i,j) からマス (i,j+1) に移動する場合は S_k=
R - マス (i,j) からマス (i-1,j) に移動する場合は S_k=
U - マス (i,j) からマス (i+1,j) に移動する場合は S_k=
D
と定義する。
条件を満たす移動が複数存在する場合、どれを出力しても正答となる。
入力例 1
3 2 1 2 3 2 2 4 3 2
出力例 1
Yes DR No Yes RRRDLLLDDRRURD
1 番目のテストケースについて考えます。
はじめ、コマがマス (1,1) にある状態から以下のように 2 回移動させます。
- コマを下に移動させる。コマはマス (2,1) に移動する。
- コマを右に移動させる。コマはマス (2,2) に移動する。
この移動は条件を満たしています。
Score : 450 points
Problem Statement
You are given positive integers N,A,B. It is guaranteed that both A and B are between 1 and N, inclusive.
There is an N\times N grid. The cell at the i-th row from the top and j-th column from the left is denoted as cell (i,j). Initially, a piece is placed at cell (1,1).
By repeating N^2-2 moves, each of which moves the piece to an adjacent cell (up, down, left, or right), you want to move the piece to cell (N,N) while visiting every cell except cell (A,B). You must not visit the same cell more than once (you must not visit cells (1,1) and (N,N) in the middle, either).
Determine whether such a sequence of moves is possible, and if so, output one such sequence.
You are given T test cases; solve each of them.
Constraints
- 1\le T \le 5000
- 2\le N\le 10^3
- 1\le A,B\le N
- (A,B)\neq (1,1),(N,N)
- The sum of N^2 over all test cases is at most 10^6.
- All input values are integers.
Input
The input is given from Standard Input in the following format:
T
\text{case}_1
\text{case}_2
\vdots
\text{case}_T
Each test case is given in the following format:
N A B
Output
Output the answers for the test cases in order, separated by newlines.
For each test case, if it is impossible to perform a sequence of moves satisfying the conditions, output No.
If it is possible, output in the following format:
Yes
S_1S_2\ldots S_{N^2-2}
Here, S_k is defined as follows, where the coordinates of the piece before the k-th move is cell (i,j).
- S_k=
Lif the piece moves from cell (i,j) to cell (i,j-1) - S_k=
Rif the piece moves from cell (i,j) to cell (i,j+1) - S_k=
Uif the piece moves from cell (i,j) to cell (i-1,j) - S_k=
Dif the piece moves from cell (i,j) to cell (i+1,j)
If multiple sequences of moves satisfy the conditions, any of them will be accepted.
Sample Input 1
3 2 1 2 3 2 2 4 3 2
Sample Output 1
Yes DR No Yes RRRDLLLDDRRURD
Consider the first test case.
Starting with the piece at cell (1,1), move it twice as follows:
- Move the piece downward. The piece moves to cell (2,1).
- Move the piece rightward. The piece moves to cell (2,2).
This sequence of moves satisfies the conditions.
Time Limit: 2 sec / Memory Limit: 1024 MiB
配点 : 525 点
問題文
正整数 N,M と長さ N の整数列 A=(A_1,A_2,\ldots,A_N) が与えられます。A の各要素は 0 以上 M 未満であることが保証されます。
この整数列 A に対して以下の操作を 0 回以上何回でも行うことができます:
- 1\le l\le r\le N を満たす整数の組 (l,r) を選び、i=l,l+1,\ldots,r に対して A_i を (A_i+1) \bmod M で置き換える。
A を回文にするために必要な操作回数の最小値を求めてください。
ただし、A が回文であるとは i=1,2,\ldots,N に対し A_i=A_{N+1-i} が成り立つことを指します。
T 個のテストケースが与えられるので、それぞれについて答えを求めてください。
制約
- 1\le T
- 1\le N\le 2\times 10^5
- 1\le M\le 10^9
- 0\le A_i < M
- 全てのテストケースにおける N の総和は 2\times 10^5 以下
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
T
\text{case}_1
\text{case}_2
\vdots
\text{case}_T
各テストケースは以下の形式で与えられる。
N M A_1 A_2 \ldots A_N
出力
各テストケースに対する答えを順に改行区切りで出力せよ。
入力例 1
3 4 5 0 3 1 2 1 20260418 454 7 12 3 1 4 1 5 9 2
出力例 1
3 0 5
1 番目のテストケースについて考えます。
以下のように 3 回操作することで A を回文にすることができます:
- (l,r)=(2,4) を選ぶ。A=(0,4,2,3) となる。
- (l,r)=(3,4) を選ぶ。A=(0,4,3,4) となる。
- (l,r)=(3,4) を選ぶ。A=(0,4,4,0) となる。
3 回未満の操作で A を回文にすることはできないので、3 を出力してください。
Score : 525 points
Problem Statement
You are given a positive integer N, a positive integer M, and an integer sequence A=(A_1,A_2,\ldots,A_N) of length N. It is guaranteed that each element of A is between 0 and M-1, inclusive.
You can perform the following operation on the integer sequence A any number of times, possibly zero:
- Choose a pair of integers (l,r) satisfying 1\le l\le r\le N, and replace A_i with (A_i+1) \bmod M for each i=l,l+1,\ldots,r.
Find the minimum number of operations required to make A a palindrome.
Here, A is a palindrome if A_i=A_{N+1-i} holds for i=1,2,\ldots,N.
You are given T test cases; solve each of them.
Constraints
- 1\le T
- 1\le N\le 2\times 10^5
- 1\le M\le 10^9
- 0\le A_i < M
- The sum of N over all test cases is at most 2\times 10^5.
- All input values are integers.
Input
The input is given from Standard Input in the following format:
T
\text{case}_1
\text{case}_2
\vdots
\text{case}_T
Each test case is given in the following format:
N M A_1 A_2 \ldots A_N
Output
Output the answers for the test cases in order, separated by newlines.
Sample Input 1
3 4 5 0 3 1 2 1 20260418 454 7 12 3 1 4 1 5 9 2
Sample Output 1
3 0 5
Consider the first test case.
You can make A a palindrome in three operations as follows:
- Choose (l,r)=(2,4). A becomes (0,4,2,3).
- Choose (l,r)=(3,4). A becomes (0,4,3,4).
- Choose (l,r)=(3,4). A becomes (0,4,4,0).
It is impossible to make A a palindrome in fewer than three operations, so output 3.
Time Limit: 4 sec / Memory Limit: 1024 MiB
配点 : 625 点
問題文
頂点に 1 から N の番号がついた N 頂点の根付き木が与えられます。頂点 1 が根で、頂点 i の親は頂点 p_i です(p_i \lt i)。
各頂点には色が塗られていて、頂点 i は色 c_i で塗られています(1 \leq c_i \leq N)。
v = 1, 2, \dots, N について次の問題を解いてください。
f_i を「頂点 v の部分木に含まれる頂点のうち色 i で塗られた頂点の個数」とします。
- 数列 (f_1, f_2, \dots, f_N) に含まれる値の最大値 m 、および
- f_i = m であるような N 以下の正整数 i の個数 k
を求めてください。
入出力の形式
今回の問題の入出力は特殊な形式で行われます。
入力の形式
標準入力からは整数 N に加えて整数 \mathrm{seed}, M, F および q_2, q_3, \dots, q_M, d_1, d_2, \dots, d_M が与えられます。この時、以下の擬似コードで表される計算によって p_2, p_3, \dots, p_N および c_1, c_2, \dots, c_N を復元してください。(ここで 2^31 は 2^{31}=2147483648 を意味します。また、\mathrm{state} は変数である点、および \mathrm{state} の計算に 64 bit 整数型が必要である点に注意してください。)
state = seed
for i=2 to N:
if i <= M:
p[i] = q[i]
else:
p[i] = (state mod (i-1)) + 1
state = (state * 1103515245 + 12345) mod 2^31
for i=1 to N:
if i <= M:
c[i] = d[i]
else:
c[i] = (state mod F) + 1
state = (state * 1103515245 + 12345) mod 2^31
出力の形式
v=i の時の m,k をそれぞれ m_i, k_i とおきます。
を出力してください。ここで \oplus はビットごとの排他的論理和を意味します。計算過程でのオーバーフローに注意してください。
制約
- 2 \leq N \leq 2.5 \times 10^6
- 1 \leq p_i \lt i
- 1 \leq c_i \leq N
- 1 \leq \mathrm{seed} \lt 2^{31}
- 2 \leq M \leq \min(N, 10^5)
- 1 \leq F \leq N
- 1 \leq q_i \lt i
- 1 \leq d_i \leq N
- 入力される値は全て整数
入力
入力は以下の形式で標準入力から与えられる。
N \mathrm{seed} M F
q_2 q_3 \dots q_M
d_1 d_2 \dots d_M
出力
\left(\displaystyle \sum_{i=1}^N (m_i \oplus i)\times (k_i \oplus i)\right) \bmod 998244353 を出力せよ。
入力例 1
4 454 4 2 1 2 2 1 2 2 3
出力例 1
29
- i=1 : m_1=2,k_1=1, (m_1 \oplus 1) \times (k_1 \oplus 1) = 0
- i=2 : m_2=2,k_2=1, (m_2 \oplus 2) \times (k_2 \oplus 2) = 0
- i=3 : m_3=1,k_3=1, (m_3 \oplus 3) \times (k_3 \oplus 3) = 4
- i=4 : m_4=1,k_4=1, (m_4 \oplus 4) \times (k_4 \oplus 4) = 25
です。よって 0+0+4+25=29 を出力します。
入力例 2
6 123 2 2 1 1 2
出力例 2
101
このテストケースにおける p_i, c_i の値は次の通りです。
- p = (1, 2, 1, 2, 3)
- c = (1, 2, 2, 1, 2, 1)
入力例 3
15 1 4 5 1 2 3 5 3 1 3
出力例 3
1199
このテストケースにおける p_i, c_i の値は次の通りです。
- p = (1, 2, 3, 2, 1, 4, 7, 6, 5, 10, 1, 10, 2, 8)
- c = (5, 3, 1, 3, 4, 2, 2, 2, 4, 2, 2, 5, 3, 5, 3)
Score : 625 points
Problem Statement
You are given a rooted tree with N vertices numbered 1 through N. Vertex 1 is the root, and the parent of vertex i is vertex p_i (p_i \lt i).
Each vertex is colored: vertex i is colored with color c_i (1 \leq c_i \leq N).
For each v = 1, 2, \dots, N, solve the following problem:
Let f_i be the number of vertices colored with color i among the vertices in the subtree rooted at vertex v.
Find:
- the maximum value m among the values in the sequence (f_1, f_2, \dots, f_N), and
- the number k of positive integers i not greater than N such that f_i = m.
Input/Output Format
The input and output for this problem follow a special format.
Input Format
From Standard Input, you are given the integer N along with integers \mathrm{seed}, M, F and q_2, q_3, \dots, q_M, d_1, d_2, \dots, d_M. Reconstruct p_2, p_3, \dots, p_N and c_1, c_2, \dots, c_N using the computation described by the following pseudocode. (Here, 2^31 means 2^{31}=2147483648. Note that \mathrm{state} is a variable, and that a 64-bit integer type is required for computing \mathrm{state}.)
state = seed
for i=2 to N:
if i <= M:
p[i] = q[i]
else:
p[i] = (state mod (i-1)) + 1
state = (state * 1103515245 + 12345) mod 2^31
for i=1 to N:
if i <= M:
c[i] = d[i]
else:
c[i] = (state mod F) + 1
state = (state * 1103515245 + 12345) mod 2^31
Output Format
Let m_i and k_i denote m and k when v=i, respectively. Output this value:
Here, \oplus denotes bitwise XOR. Beware of overflow during computation.
Constraints
- 2 \leq N \leq 2.5 \times 10^6
- 1 \leq p_i \lt i
- 1 \leq c_i \leq N
- 1 \leq \mathrm{seed} \lt 2^{31}
- 2 \leq M \leq \min(N, 10^5)
- 1 \leq F \leq N
- 1 \leq q_i \lt i
- 1 \leq d_i \leq N
- All input values are integers.
Input
The input is given from Standard Input in the following format:
N \mathrm{seed} M F
q_2 q_3 \dots q_M
d_1 d_2 \dots d_M
Output
Output \left(\displaystyle \sum_{i=1}^N (m_i \oplus i)\times (k_i \oplus i)\right) \bmod 998244353.
Sample Input 1
4 454 4 2 1 2 2 1 2 2 3
Sample Output 1
29
- i=1 : m_1=2,k_1=1, (m_1 \oplus 1) \times (k_1 \oplus 1) = 0
- i=2 : m_2=2,k_2=1, (m_2 \oplus 2) \times (k_2 \oplus 2) = 0
- i=3 : m_3=1,k_3=1, (m_3 \oplus 3) \times (k_3 \oplus 3) = 4
- i=4 : m_4=1,k_4=1, (m_4 \oplus 4) \times (k_4 \oplus 4) = 25
Thus, output 0+0+4+25=29.
Sample Input 2
6 123 2 2 1 1 2
Sample Output 2
101
The values of p_i, c_i in this test case are as follows:
- p = (1, 2, 1, 2, 3)
- c = (1, 2, 2, 1, 2, 1)
Sample Input 3
15 1 4 5 1 2 3 5 3 1 3
Sample Output 3
1199
The values of p_i, c_i in this test case are as follows:
- p = (1, 2, 3, 2, 1, 4, 7, 6, 5, 10, 1, 10, 2, 8)
- c = (5, 3, 1, 3, 4, 2, 2, 2, 4, 2, 2, 5, 3, 5, 3)