Universal Cup Judging System

Universal Cup

Süre Sınırı: 2.0 s Bellek Sınırı: 1024 MB Toplam puan: 100 Zorluk: [göster] Hack'lenebilir ✓
İstatistikler

กำหนดจุดยอด $n$ จุด $P(0), P(1), \cdots, P(n - 1)$ ของรูปหลายเหลี่ยมนูนเรียงตามลำดับทวนเข็มนาฬิกา จะมีวิธีเลือกจุดยอด $k$ จุด ได้แก่ $P(i_0), P(i_1), \cdots, P(i_{k-1})$ ($0 \le i_0 < i_1 < \cdots < i_{k-1} < n$) ทั้งหมด $\binom{n}{k}$ วิธี เมื่อเชื่อมจุดยอดที่เลือกตามลำดับทวนเข็มนาฬิกา (กล่าวคือ สำหรับแต่ละ $0 \le j < k$ ให้เชื่อมจุดยอด $P(i_j)$ และ $P(i_{(j+1) \bmod k})$) จะได้รูปหลายเหลี่ยมนูนที่มีจุดยอด $k$ จุด

สำหรับแต่ละ $3 \le k \le n$ ให้พิจารณารูปหลายเหลี่ยมนูนที่มีจุดยอด $k$ จุดทั้งหมดที่สร้างขึ้นด้วยวิธีข้างต้น จงคำนวณสองเท่าของผลรวมของพื้นที่ของรูปหลายเหลี่ยมนูนเหล่านี้

ข้อมูลนำเข้า

แต่ละไฟล์ทดสอบมีเพียงกรณีทดสอบเดียวเท่านั้น

บรรทัดแรกมีจำนวนเต็ม $n$ ($3 \le n \le 2 \times 10^5$) แทนจำนวนจุดยอดของรูปหลายเหลี่ยมนูน

ในอีก $n$ บรรทัดถัดไป บรรทัดที่ $i$ มีจำนวนเต็มสองจำนวน $x_i$ และ $y_i$ ($-10^9 \le x_i, y_i \le 10^9$) แทนพิกัดของจุดยอดที่ $i$ ของรูปหลายเหลี่ยมนูน จุดยอดจะถูกกำหนดให้เรียงตามลำดับทวนเข็มนาฬิกา และไม่มีจุดยอดสามจุดใดอยู่บนเส้นตรงเดียวกัน

ข้อมูลส่งออก

แสดงผล $(n - 2)$ บรรทัด แต่ละบรรทัดมีจำนวนเต็มหนึ่งจำนวน โดยบรรทัดที่ $i$ คือคำตอบสำหรับ $k = i + 2$

สามารถพิสูจน์ได้ว่าคำตอบเป็นจำนวนเต็ม เนื่องจากคำตอบอาจมีค่ามาก ให้แสดงผลคำตอบมอดุโล $998\,244\,353$

ตัวอย่าง

ข้อมูลนำเข้าตัวอย่าง 1

6
0 0
1 0
2 1
2 2
1 2
0 1

ข้อมูลส่งออกตัวอย่าง 1

36
54
30
6

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.