apaz/codeforces-genesys huggingface dataset:
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 5.0 seconds
Memory limit: 1024.0 MB

# Problem
Entering senior high school life, Tom is attracted by LIS problems, not only the Longest Increasing Subsequence problem, but also the Largest Interval Sum problem. Now he gets a really interesting problem from his friend Daniel. However, it seems too hard for him to solve it, so he asks you for help.

Given an array $$$a$$$ consisting of $$$n$$$ integers.

In one operation, you do the following:

- Select an interval $$$[l,r]$$$ ($$$1\le l\le r\le n$$$), such that the sum of the interval is the largest among all intervals in the array $$$a$$$. More formally, $$$\displaystyle\sum_{i=l}^r a_i=\max_{1\le l'\le r'\le n}\sum_{i=l'}^{r'} a_i$$$.
- Then subtract $$$1$$$ from all elements $$$a_l,a_{l+1},\ldots,a_r$$$.

Find the minimum number of operations you need to perform to make $$$a_i<0$$$ for every $$$1\le i\le n$$$.

## Input Format
The first line of input contains a single integer $$$n$$$ ($$$1 \le n \le 5 \cdot 10^5$$$) — the length of the array $$$a$$$.

The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$-10^6\le a_i\le 10^6$$$) — the elements of the array $$$a$$$.

## Output Format
Print a single integer — the minimum number of operations.

## Examples
```input
5
1 2 3 4 5
```
```output
6
```
-----
```input
6
-1 -5 -4 -1 -4 -7
```
```output
0
```
-----
```input
11
0 1000000 1 -50000 2 998353 3 -100007 4 200943 0
```
```output
1936973
```

## Note
In the first example, you can do operations on intervals $$$[1,5],[1,5],[2,5],[3,5],[4,5],[5,5]$$$ in such order. You may also do operations on intervals $$$[1,5],[2,5],[3,5],[4,5],[5,5],[1,5]$$$ in such order.

In the second example, it's already satisfied that $$$a_i<0$$$ for every $$$1\le i\le n$$$. So you do not need to perform any operations.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
You are given three non-negative integers $$$n$$$, $$$k$$$, and $$$x$$$. Find the maximum possible sum of elements in an array consisting of non-negative integers, which has $$$n$$$ elements, its MEX is equal to $$$k$$$, and all its elements do not exceed $$$x$$$. If such an array does not exist, output $$$-1$$$.

The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance:

- The MEX of $$$[2,2,1]$$$ is $$$0$$$, because $$$0$$$ does not belong to the array.
- The MEX of $$$[3,1,0,1]$$$ is $$$2$$$, because $$$0$$$ and $$$1$$$ belong to the array, but $$$2$$$ does not.
- The MEX of $$$[0,3,1,2]$$$ is $$$4$$$, because $$$0$$$, $$$1$$$, $$$2$$$ and $$$3$$$ belong to the array, but $$$4$$$ does not.

## Input Format
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. Then follows the description of the test cases.

The only line of each test case contains three integers $$$n$$$, $$$k$$$, and $$$x$$$ ($$$1 \leq n, k, x \leq 200$$$).

## Output Format
For each test case, output a single number — the maximum sum of elements in a valid array, or $$$-1$$$, if such an array does not exist.

## Examples
```input
9
5 3 3
4 7 5
4 2 28
12 10 6
57 51 122
200 1 200
2 2 1
3 2 1
4 7 10
```
```output
7
-1
57
-1
2007
39800
1
2
-1
```

## Note
In the first test case, the maximum sum is $$$7$$$, and one of the valid arrays is $$$[0, 1, 2, 2, 2]$$$.

In the second test case, there are no valid arrays of length $$$n$$$.

In the third test case, the maximum sum is $$$57$$$, and one of the valid arrays is $$$[0, 1, 28, 28]$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 2.0 seconds
Memory limit: 256.0 MB

# Problem
You are given two arrays of integers — $$$a_1, \ldots, a_n$$$ of length $$$n$$$, and $$$b_1, \ldots, b_m$$$ of length $$$m$$$. You can choose any element $$$b_j$$$ from array $$$b$$$ ($$$1 \leq j \leq m$$$), and for all $$$1 \leq i \leq n$$$ perform $$$a_i = a_i | b_j$$$. You can perform any number of such operations.

After all the operations, the value of $$$x = a_1 \oplus a_2 \oplus \ldots \oplus a_n$$$ will be calculated. Find the minimum and maximum values of $$$x$$$ that could be obtained after performing any set of operations.

Above, $$$|$$$ is the bitwise OR operation, and $$$\oplus$$$ is the bitwise XOR operation.

## Input Format
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 10^4$$$) — the number of test cases. This is followed by the description of the test cases.

The first line of each test case contains two integers $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 2 \cdot 10^5$$$) — the sizes of arrays $$$a$$$ and $$$b$$$.

The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$0 \leq a_i \leq 10^9$$$) — the array $$$a$$$.

The third line of each test case contains $$$m$$$ integers $$$b_1, b_2, \ldots, b_m$$$ ($$$0 \leq b_i \leq 10^9$$$) — the array $$$b$$$.

It is guaranteed that the sum of values of $$$n$$$ and $$$m$$$ across all test cases does not exceed $$$2 \cdot 10^5$$$.

## Output Format
For each test case, output $$$2$$$ numbers: the minimum and maximum possible values of $$$x$$$ after performing any set of operations.

## Examples
```input
2
2 3
0 1
1 2 3
3 1
1 1 2
1
```
```output
0 1
2 3
```

## Note
In the first test case, if we apply the operation with element $$$b_1 = 1$$$, the array $$$a$$$ will become $$$[1, 1]$$$, and $$$x$$$ will be $$$0$$$. If no operations are applied, then $$$x = 1$$$.

In the second test case, if no operations are applied, then $$$x = 2$$$. If we apply the operation with $$$b_1 = 1$$$, then $$$a = [1, 1, 3]$$$, and $$$x = 3$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
You are given two integers $$$n$$$ and $$$k$$$. You are also given an array of integers $$$a_1, a_2, \ldots, a_n$$$ of size $$$n$$$. It is known that for all $$$1 \leq i \leq n$$$, $$$1 \leq a_i \leq k$$$.

Define a two-dimensional array $$$b$$$ of size $$$n \times n$$$ as follows: $$$b_{i, j} = \min(a_i, a_j)$$$. Represent array $$$b$$$ as a square, where the upper left cell is $$$b_{1, 1}$$$, rows are numbered from top to bottom from $$$1$$$ to $$$n$$$, and columns are numbered from left to right from $$$1$$$ to $$$n$$$. Let the color of a cell be the number written in it (for a cell with coordinates $$$(i, j)$$$, this is $$$b_{i, j}$$$).

For each color from $$$1$$$ to $$$k$$$, find the smallest rectangle in the array $$$b$$$ containing all cells of this color. Output the sum of width and height of this rectangle.

## Input Format
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 10^4$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$1 \leq n, k \leq 10^5$$$) — the size of array $$$a$$$ and the number of colors.

The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \leq a_i \leq k$$$) — the array $$$a$$$.

It is guaranteed that the sum of the values of $$$n$$$ and $$$k$$$ over all test cases does not exceed $$$10^5$$$.

## Output Format
For each test case, output $$$k$$$ numbers: the sums of width and height of the smallest rectangle containing all cells of a color, for each color from $$$1$$$ to $$$k$$$.

## Examples
```input
5
2 1
1 1
2 2
1 2
3 5
3 2 4
4 2
1 2 1 2
5 3
1 2 3 2 1
```
```output
4 
4 2 
0 6 6 2 0 
8 6 
10 6 2
```

## Note
In the first test case, the entire array $$$b$$$ consists of color $$$1$$$, so the smallest rectangle for color $$$1$$$ has a size of $$$2 \times 2$$$, and the sum of its sides is $$$4$$$.

In the second test case, the array $$$b$$$ looks like this:

1112

One of the corner cells has color $$$2$$$, and the other three cells have color $$$1$$$. Therefore, the smallest rectangle for color $$$1$$$ has a size of $$$2 \times 2$$$, and for color $$$2$$$ it is $$$1 \times 1$$$.

In the last test case, the array $$$b$$$ looks like this:

1111112221123211222111111

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
You are given an array of integers $$$a$$$ of size $$$n$$$. You can choose a set of non-overlapping subarrays of the given array (note that some elements may be not included in any subarray, this is allowed). For each selected subarray, calculate the MEX of its elements, and then calculate the bitwise XOR of all the obtained MEX values. What is the maximum bitwise XOR that can be obtained?

The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance:

- The MEX of $$$[2,2,1]$$$ is $$$0$$$, because $$$0$$$ does not belong to the array.
- The MEX of $$$[3,1,0,1]$$$ is $$$2$$$, because $$$0$$$ and $$$1$$$ belong to the array, but $$$2$$$ does not.
- The MEX of $$$[0,3,1,2]$$$ is $$$4$$$, because $$$0$$$, $$$1$$$, $$$2$$$ and $$$3$$$ belong to the array, but $$$4$$$ does not.

## Input Format
The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 5000$$$) — the number of test cases. This is followed by the description of the test cases.

The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 5000$$$) — the size of the array $$$a$$$.

The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$0 \leq a_i \leq n$$$) — the array $$$a$$$.

It is guaranteed that the sum of all $$$n$$$ values across all test cases does not exceed $$$5000$$$.

## Output Format
For each test case, output a single number — the maximum possible XOR of the MEX values of the selected subarrays.

## Examples
```input
4
2
1 0
10
1 2 0 7 1 2 0 2 4 3
10
2 1 0 7 1 2 0 2 4 3
3
1 2 1
```
```output
2
6
7
0
```

## Note
In the first test case, the maximum XOR is $$$2$$$ if we take the entire array, $$$\operatorname{MEX}([1, 0]) = 2$$$.

In the second test case, the maximum XOR is $$$6$$$ if we partition the array into segments $$$[1, 2, 0]$$$ and $$$[7, 1, 2, 0, 2, 4, 3]$$$:

- $$$\operatorname{MEX}([1, 2, 0]) = 3$$$,
- $$$\operatorname{MEX}([7, 1, 2, 0, 2, 4, 3]) = 5$$$,

In the third test case, the maximum XOR is $$$7$$$ if we partition the array into segments $$$[1, 0]$$$ and $$$[7, 1, 2, 0, 2, 4, 3]$$$:

- $$$\operatorname{MEX}([1, 0]) = 2$$$,
- $$$\operatorname{MEX}([7, 1, 2, 0, 2, 4, 3]) = 5$$$,

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 3.0 seconds
Memory limit: 256.0 MB

# Problem
You are given positive integers $$$n$$$ and $$$k$$$. For each number from $$$1$$$ to $$$n$$$, we write its representation in the number system with base $$$k$$$ (without leading zeros) and then sort the resulting array in lexicographic order as strings. In the sorted array, we number the elements from $$$1$$$ to $$$n$$$ (i.e., indexing starts from $$$1$$$). Find the number of values $$$i$$$ such that the representation of number $$$i$$$ is at the $$$i$$$-th position in the sorted array of representations.

Examples of representations: $$$1$$$ in any number system is equal to $$$1$$$, $$$7$$$ with $$$k = 3$$$ is written as $$$21$$$, and $$$81$$$ with $$$k = 9$$$ is written as $$$100$$$.

## Input Format
The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 10^3$$$) — the number of test cases. This is followed by a description of the test cases.

The only line of each test case contains integers $$$n$$$ and $$$k$$$ ($$$1 \leq n \leq 10^{18}$$$, $$$2 \leq k \leq 10^{18}$$$).

## Output Format
For each test case, output a single integer — the number of values $$$1 \leq i \leq n$$$ such that the representation of number $$$i$$$ in the number system with base $$$k$$$ is at the $$$i$$$-th position after sorting.

## Examples
```input
8
2 2
4 2
6 4
33 2
532 13
780011804570805480 3788
366364720306464627 4702032149561577
293940402103595405 2
```
```output
2
2
1
3
1
3789
1
7
```

## Note
In the first test case, for numbers $$$1$$$ and $$$2$$$, their representations are at positions $$$1$$$ and $$$2$$$ respectively.

In the second test case, the sorted array is $$$[1_2 = 1, 10_2 = 2, 100_2 = 4, 11_2 = 3]$$$, and only the representations of numbers $$$1$$$ and $$$2$$$ are at the required positions.

In the third test case, the sorted array is $$$[1_4 = 1, 10_4 = 4, 11_4 = 5, 12_4 = 6, 2_4 = 2, 3_4 = 3]$$$, and only the number $$$1$$$ is at its position.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
Jellyfish has $$$n$$$ green apple pieces. Each green apple piece weighs $$$1~\text{kg}$$$. Jellyfish wants to divide these green apple pieces equally among $$$m$$$ people.

Jellyfish has a magic knife. Each time Jellyfish can choose one piece of green apple and divide it into two smaller pieces, with each piece having half the weight of the original piece.

Jellyfish wants to know the minimum number of operations needed such that she can divide the green apple pieces such that the total weight of apple pieces received by each person is the same.

## Input Format
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \leq t \leq 2 \cdot 10^4$$$). The description of the test cases follows.

The first and only line of each test case contains two integers, $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 10^9$$$) — the number of the green apple pieces initially and the number of the people.

## Output Format
For each test case, output a single integer — the minimum number of operations required to divide all the green apples equally among the $$$m$$$ people. If this cannot be achieved using a finite number of operations, output $$$-1$$$ instead.

## Examples
```input
4
10 5
1 5
10 4
3 4
```
```output
0
-1
2
5
```

## Note
In the first test case, we do not need to divide the apple pieces. Each person will receive $$$2$$$ pieces of $$$1~\text{kg}$$$ and the total weight of apple pieces received by each person is $$$2~\text{kg}$$$.

In the second test case, it is impossible to divide the apple equally using a finite number of operations.

In the third test case, we can divide two of the apple pieces of weight $$$1~\text{kg}$$$, getting $$$4$$$ apple pieces of weight $$$0.5~\text{kg}$$$. Each person will receive $$$1$$$ apple piece of weight $$$0.5~\text{kg}$$$ and $$$2$$$ apple pieces of weight $$$1~\text{kg}$$$. The total weight of apple pieces received by each person is $$$2.5~\text{kg}$$$.

In the fourth test case, we first divide all $$$3$$$ of the apple pieces of weight $$$1~\text{kg}$$$, getting $$$6$$$ pieces of weight $$$0.5~\text{kg}$$$. Then, we further divide two of the apple pieces of weight $$$0.5~\text{kg}$$$, getting $$$4$$$ pieces of weight $$$0.25~\text{kg}$$$. Each person will receive $$$1$$$ apple piece of weight $$$0.5~\text{kg}$$$ and $$$1$$$ apple piece of weight $$$0.25~\text{kg}$$$. The total weight of apples received by each person is $$$0.75~\text{kg}$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
You are given an array of $$$n$$$ nonnegative integers $$$a_1, a_2, \dots, a_n$$$.

Let $$$m$$$ be a variable that is initialized to $$$0$$$, Jellyfish will perform the following operation $$$n$$$ times:

- select an index $$$i$$$ ($$$1 \leq i \leq |a|$$$) and delete $$$a_i$$$ from $$$a$$$.
- add $$$\operatorname{MEX}(a)^{\dagger}$$$ to $$$m$$$.

Now Jellyfish wants to know the minimum possible final value of $$$m$$$ if he performs all the operations optimally.

$$$^{\dagger}$$$ The MEX (minimum excluded) of an array is the smallest non-negative integer that does not belong to the array. For instance:

- The MEX of $$$[2,2,1]$$$ is $$$0$$$, because $$$0$$$ does not belong to the array.
- The MEX of $$$[3,1,0,1]$$$ is $$$2$$$, because $$$0$$$ and $$$1$$$ belong to the array, but $$$2$$$ does not.
- The MEX of $$$[0,3,1,2]$$$ is $$$4$$$ because $$$0$$$, $$$1$$$, $$$2$$$, and $$$3$$$ belong to the array, but $$$4$$$ does not.

## Input Format
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \leq t \leq 5000$$$). The description of the test cases follows.

The first line of each test case contains a single integer $$$n$$$ ($$$1 \leq n \leq 5000$$$) — the size of the array.

The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$0 \leq a_i \leq 10^9$$$) — the integers in the array.

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$5000$$$.

## Output Format
For each test case, output a single integer — the minimum value of $$$m$$$ if the operations are performed optimally.

## Examples
```input
4
8
5 2 1 0 3 0 4 0
2
1 2
5
1 0 2 114514 0
8
0 1 2 0 1 2 0 3
```
```output
3
0
2
7
```

## Note
In the first test case, we delete elements from $$$a$$$ in the following order: $$$[5,2,\color{red}{1},0,3,0,4,0] \to [5,2,0,3,\color{red}{0},4,0] \to [5,2,\color{red}{0},3,4,0] \to [5,2,3,4,\color{red}{0}] \to [5,2,\color{red}{3},4] \to [\color{red}{5},2,4] \to [\color{red}{2},4] \to [\color{red}{4}] \to [~]$$$. The value of $$$m$$$ will be $$$1+1+1+0+0+0+0+0=3$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in python3.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```python
<your code here>
```

Execution time limit: 2.0 seconds
Memory limit: 256.0 MB

# Problem
Given a string $$$x$$$ of length $$$n$$$ and a string $$$s$$$ of length $$$m$$$ ($$$n \cdot m \le 25$$$), consisting of lowercase Latin letters, you can apply any number of operations to the string $$$x$$$.

In one operation, you append the current value of $$$x$$$ to the end of the string $$$x$$$. Note that the value of $$$x$$$ will change after this.

For example, if $$$x =$$$"aba", then after applying operations, $$$x$$$ will change as follows: "aba" $$$\rightarrow$$$ "abaaba" $$$\rightarrow$$$ "abaabaabaaba".

After what minimum number of operations $$$s$$$ will appear in $$$x$$$ as a substring? A substring of a string is defined as a contiguous segment of it.

## Input Format
The first line of the input contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.

The first line of each test case contains two numbers $$$n$$$ and $$$m$$$ ($$$1 \le n \cdot m \le 25$$$) — the lengths of strings $$$x$$$ and $$$s$$$, respectively.

The second line of each test case contains the string $$$x$$$ of length $$$n$$$.

The third line of each test case contains the string $$$s$$$ of length $$$m$$$.

## Output Format
For each test case, output a single number — the minimum number of operations after which $$$s$$$ will appear in $$$x$$$ as a substring. If this is not possible, output $$$-1$$$.

## Examples
```input
12
1 5
a
aaaaa
5 5
eforc
force
2 5
ab
ababa
3 5
aba
ababa
4 3
babb
bbb
5 1
aaaaa
a
4 2
aabb
ba
2 8
bk
kbkbkbkb
12 2
fjdgmujlcont
tf
2 2
aa
aa
3 5
abb
babba
1 19
m
mmmmmmmmmmmmmmmmmmm
```
```output
3
1
2
-1
1
0
1
3
1
0
2
5
```

## Note
In the first test case of the example, after $$$2$$$ operations, the string will become "aaaa", and after $$$3$$$ operations, it will become "aaaaaaaa", so the answer is $$$3$$$.

In the second test case of the example, after applying $$$1$$$ operation, the string will become "$$$\text{e}\color{red}{\text{force}}\text{forc}$$$", where the substring is highlighted in red.

In the fourth test case of the example, it can be shown that it is impossible to obtain the desired string as a substring.

Now solve the problem and return the code.