Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2022 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2023 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2330 . A. 房屋推薦 (house)
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
$\mathbb{W}\mathcal{aimai}\sim$
User's AC Ratio
96.6% (
56/58
)
Submission's AC Ratio
53.9% (
76
/
141
)
Tags
Show solution-related tags
TOI
TOI-pre
2023-TOI-pre
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
4 2
2 -2 10000
-2 1 12000
1 -3 12000
4 5 19000
1 5
4 1
Sample Output 1
copy
4
1
2
3
Sample Input 2
copy
3 3
2 0 11000
5 0 12000
3 3 10000
1 3
3 0
5 3
Sample Output 2
copy
1
3
2
Hints
Problem Source
2023 TOI 初選
測資來源:
TWPCA GitHub
Subtasks
No.
Testdata Range
Constraints
Score
1
2~7
$n\le 2$
20
2
0~10
$n\le 100$
30
3
0~13
無額外限制
50
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
2000
1048576
65536
2
3
1
2000
1048576
65536
2
3
2
2000
1048576
65536
1
2
3
3
2000
1048576
65536
1
2
3
4
2000
1048576
65536
1
2
3
5
2000
1048576
65536
1
2
3
6
2000
1048576
65536
1
2
3
7
2000
1048576
65536
1
2
3
8
2000
1048576
65536
2
3
9
2000
1048576
65536
2
3
10
2000
1048576
65536
2
3
11
2000
1048576
65536
3
12
2000
1048576
65536
3
13
2000
1048576
65536
3
Submit
Back to Top