Logo
(追記) (追記ここまで)

24692번 - Hundred Thousand Points 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
10 초 512 MB444100.000%

문제

You have placed $n$ points on a plane at coordinates $(1, 0), (2, 0), \ldots, (n, 0)$.

Informally, for each $i,ドル you draw an angle of $a_i$ degrees from vertex $(i, 0)$ in a direction chosen uniformly at random and independently from other angles.

Formally, for each $i,ドル a real variable $\alpha_i \in [0; 360)$ is chosen uniformly at random, and the angle is formed by two rays drawn from the point $(i, 0)$ at polar angles of $\alpha_i$ and $\alpha_i + a_i$ degrees. The interior of the angle consists of all points located at polar angles strictly between $\alpha_i$ and $\alpha_i + a_i$ degrees from the point $(i, 0)$.

Two angles are considered intersecting if there exists a point belonging to the interiors of both angles.

Find the probability that no two angles intersect, modulo 998ドル,244円,353円$ (see the Output section for details).

입력

The first line contains a single integer $n$ (2ドル \le n \le 10^5$).

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ (1ドル \le a_i \le 179$).

출력

Print the probability that no two angles intersect, modulo 998ドル,244円,353円$.

Formally, let $M = 998,244円,353円$. It can be shown that the required probability can be expressed as an irreducible fraction $\frac{p}{q},ドル where $p$ and $q$ are integers and $q \not \equiv 0 \pmod{M}$. Print the integer equal to $p \cdot q^{-1} \bmod M$. In other words, print such an integer $x$ that 0ドル \le x < M$ and $x \cdot q \equiv p \pmod{M}$.

제한

예제 입력 1

2
90 90

예제 출력 1

686292993

예제 입력 2

3
90 90 90

예제 출력 2

982646785

예제 입력 3

3
120 30 60

예제 출력 3

795861094

힌트

In the first example test, the actual probability is $\frac{5}{16}$.

In the second example test, the actual probability is $\frac{1}{64}$.

In the third example test, the actual probability is $\frac{347}{5184}$.

출처

Camp > Petrozavodsk Programming Camp > Winter 2022 > Day 7: ICPC Camp Day 2, Gennady Korotkevich Contest 6 H번

Contest > Open Cup > 2021/2022 Season > Stage 13: Grand Prix of Gomel H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /