P8938 [DTOI 2023] A. Big Brother Puppy

Background

luanmenglei has a glorious present: all the girls in his class call him Yi-jiang. But who would have thought that luanmenglei has a sad past: his five-year-old younger brother used to call him Big Brother Puppy.

Description

All parameters below are integers by default. As a game developer (of 7k7k mini-games), you designed the following game (so crude that it is not even as good as Big Brother Puppy’s kindergarten graduation project). It has two elements: 1. An enemy creature with health $m$. 2. The protagonist’s weapon, which has $n$ levels. The damage of level $i$ is $i \times p$. The game balance needs to be planned in advance, so you also have a sequence $\{a_n\}$, defined as follows: - $a_i$ means the enemy creature will die after being hit exactly $a_i$ times by the level $i$ weapon. Unfortunately, you forgot what $p$ exactly is, so you need to find the number of all possible values of $p$. If there can be infinitely many values of $p$, output `xiaogougege`.

Input Format

The first line contains two positive integers $n, m$. The second line contains $n$ positive integers, representing the sequence $\{a_n\}$.

Output Format

Output one line containing one integer, the number of possible values of $p$, or the string `xiaogougege`. Its meaning is described in the statement.

Explanation/Hint

#### Sample 1 Explanation When the weapon is level $1$, analysis shows that $p$ must satisfy $1 \leq p < \frac{3}{2}$. When the weapon is level $2$, analysis shows that $p$ must satisfy $\frac{3}{4} \leq p < \frac{3}{2}$. When the weapon is level $3$, analysis shows that $p$ must satisfy $1 \leq p$. Also, $p$ is an integer. Therefore, only $p = 1$ satisfies the conditions in the statement. #### Sample 2 See `game/game2.in` and `game/game2.out` in the additional files. This sample meets the constraints of test points $13 \sim 20$. #### Constraints and Hints For all testdata, it is guaranteed that $1 \leq n \leq 10^5$ and $1 \leq a_i, m \leq 10^9$. The detailed constraints for each test point are shown in the table below: | Test Point ID | $n \leq$ | $m, a_i \leq$ | Special Property | | :-: | :-: | :-: | :-: | | $1 \sim 9$ | $10^5$ | $10^9$ | The testdata is purely random | | $10 \sim 12$ | $3$ | $5$ | None | | $13 \sim 20$ | $10^5$ | $10^9$ | None | Note that the specific generator code for the purely random testdata is as follows: ```cpp #include using namespace std; int n, m, w; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int rand(int l, int r) { assert(l