P8931 [Beginner Contest #10] Hack Problem P
Background
This is a **hack problem**. In this type of problem, you will be given several tasks and several pieces of code that are supposed to solve the corresponding tasks, but the given code cannot produce correct output for some inputs. Cases where the output is incorrect include:
1. Producing a wrong result.
2. Timing out.
3. Triggering some runtime undefined behavior. Currently, the only undefined behavior that can be detected by the system is array out-of-bounds access.
For each task, you need to submit an input that satisfies the requirements so that the given code cannot produce correct output. You may directly use the “Submit Answer” feature, or submit a data generator written in any language.
---
**Hint: If you use the “Submit Answer” feature, remember to change the language back to the one you use when submitting other problems.**
Description
The following are the statements for three tasks:
#### Task 1
Given two positive integers $x, y$, it is guaranteed that their least common multiple ($\mathrm{lcm}$) is not greater than $10^9$. Find their least common multiple.
#### Task 2
**Multiple test cases.** Given an array $[a_1, a_2, \dots a_n]$ of length $n$, guaranteed to be strictly increasing. There are $q$ queries; each query gives an integer $x$. For each query, find how many numbers in the array are less than or equal to $x$.
#### Task 3
**Multiple test cases.** Given an array $[a_1, a_2, \dots a_n]$ of length $n$. There are $q$ queries; each query gives an integer $x$. For each query, find how many numbers in the array are less than or equal to $x$.
Note: Besides whether the array is guaranteed to be increasing, Task 2 and Task 3 also differ in Constraints. See below.
Input Format
#### Task 1
The input has only one line with two integers, $x$ and $y$.
#### Task 2
The first line contains an integer $T$, the number of test cases.
Then the input for each test case follows.
For each test case, the first line contains two integers, the array length $n$ and the number of queries $q$.
The second line contains $n$ integers, $a_1, a_2, \dots a_n$.
The third line contains $q$ integers, the $x$ values for the $q$ queries.
#### Task 3
The first line contains an integer $T$, the number of test cases.
Then the input for each test case follows.
For each test case, the first line contains two integers, the array length $n$ and the number of queries $q$.
The second line contains $n$ integers, $a_1, a_2, \dots a_n$.
The third line contains $q$ integers, the $x$ values for the $q$ queries.
Output Format
#### Task 1
Output one line with one integer, the least common multiple of the two numbers.
#### Task 2
For each test case, output one line with $q$ integers, the answers to the queries in order.
#### Task 3
For each test case, output one line with $q$ integers, the answers to the queries in order.
Explanation/Hint
### Notes on samples and the actual input
The three samples correspond to the sample input/output of the three tasks.
If you directly use “Submit Answer”, please name the three input files `1.in`, `2.in`, `3.in` respectively, and submit them as a zip file.
If you submit a data generator, your generator may read an integer $x$ from standard input, where $1 \leq x \leq 3$, indicating the task id of the current test point, and then **output the corresponding input data**.
Obviously, your program should not read anything mentioned in the “Input Format” (instead, it should construct them), and it should not output anything mentioned in the “Sample Output” (instead, it should only output the input data you constructed). You should not use the samples to test your program; they are only descriptions of the samples for the three tasks.
### Constraints requirements
The data you provide must satisfy the following requirements:
1. It must fully follow the “Input Format”. There must be no extra input, but trailing spaces at line ends and a final newline are allowed.
2. All numbers in the input must be integers.
3. For Task 1, $1 \leq x, y \leq 10^9$, and you **must guarantee** that $\mathrm{lcm}(x, y) \leq 10^9$ as well.
4. For Task 2, $1 \leq T \leq 3$, $1 \leq n,q \leq 10^5$, $1 \leq a_i, x \leq 10^9$.
5. For Task 3, $1 \leq T \leq 3$, $1 \leq n, q, a_i, x \leq 10^6$.
### Target code
You need to hack the following code:
#### Task 1
```cpp
#include
#include
int main() {
int x, y;
std::cin >> x >> y;
int ans = x * y / std::__gcd(x, y);
std::cout 1;
if (a[mid] > T; T; --T) {
std::cin >> n >> q;
for (int i = 1; i > a[i];
}
for (int x; q; --q) {
std::cin >> x;
std::cout > n >> q;
for (int i = 1; i > a[i];
}
for (int i = 1; i > x;
std::cout taskId;
if (taskId == 1) {
cout