LCC

题意翻译

一条无限长的管道中有 $n$ 个粒子,第 $i$ 个粒子的位置为 $x_i$,保证对于 $1\leq i <n$,有 $x_i<x_{i+1}$。 一次实验开始时,第 $i$ 个粒子会获得 $v_i$ 的初速度,并有 $\frac{p_i}{100}$ 的概率向右移动,$1-\frac{p_i}{100}$ 的概率向左移动。 当任意两个粒子移动到相同位置的时候,我们称之为一次 *碰撞*。一次实验耗费的时间为所有 *碰撞* 发生时间的**最小值**。特别地,如果没有发生任何 *碰撞*,我们认为这次实验耗费的时间为 $0$。 求一次实验期望耗费的时间,对 $998244353$ 取模后输出。

题目描述

An infinitely long Line Chillland Collider (LCC) was built in Chillland. There are $ n $ pipes with coordinates $ x_i $ that are connected to LCC. When the experiment starts at time 0, $ i $ -th proton flies from the $ i $ -th pipe with speed $ v_i $ . It flies to the right with probability $ p_i $ and flies to the left with probability $ (1 - p_i) $ . The duration of the experiment is determined as the time of the first collision of any two protons. In case there is no collision, the duration of the experiment is considered to be zero. Find the expected value of the duration of the experiment. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1286D/79083761a0008001b4afccde7b1511071660db07.png)Illustration for the first example

输入输出格式

输入格式


The first line of input contains one integer $ n $ — the number of pipes ( $ 1 \le n \le 10^5 $ ). Each of the following $ n $ lines contains three integers $ x_i $ , $ v_i $ , $ p_i $ — the coordinate of the $ i $ -th pipe, the speed of the $ i $ -th proton and the probability that the $ i $ -th proton flies to the right in percentage points ( $ -10^9 \le x_i \le 10^9, 1 \le v \le 10^6, 0 \le p_i \le 100 $ ). It is guaranteed that all $ x_i $ are distinct and sorted in increasing order.

输出格式


It's possible to prove that the answer can always be represented as a fraction $ P/Q $ , where $ P $ is an integer and $ Q $ is a natural number not divisible by $ 998\,244\,353 $ . In this case, print $ P \cdot Q^{-1} $ modulo $ 998\,244\,353 $ .

输入输出样例

输入样例 #1

2
1 1 100
3 1 0

输出样例 #1

1

输入样例 #2

3
7 10 0
9 4 86
14 5 100

输出样例 #2

0

输入样例 #3

4
6 4 50
11 25 50
13 16 50
15 8 50

输出样例 #3

150902884