Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2022 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2023 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2414 . 幸運數字
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
$\mathbb{W}\mathcal{aimai}\sim$
User's AC Ratio
100.0% (
1/1
)
Submission's AC Ratio
100.0% (
1
/
1
)
Tags
Show solution-related tags
pre-nhspc-2022
全國模擬賽
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
10 3 10
1 2 3 4 5 6 7 8 9 10
2
3
4
5
6
7
8
9
10
11
Sample Output 1
copy
1
2
3
2
2
2
2
1
1
1
Hints
Problem Source
111 學年度全國資訊學科能力競賽模擬賽
Subtasks
No.
Testdata Range
Constraints
Score
1
0
範例測資
0
2
0~17
$N,Q \leq 1000$
9
3
0, 18~33
$a_i \leq 40000$
29
4
0, 18~49
$a_i \leq 3 \times 10^ 5$
24
5
0~65
無額外限制
38
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
2000
524288
65536
1
2
3
4
5
1
2000
524288
65536
2
5
2
2000
524288
65536
2
5
3
2000
524288
65536
2
5
4
2000
524288
65536
2
5
5
2000
524288
65536
2
5
6
2000
524288
65536
2
5
7
2000
524288
65536
2
5
8
2000
524288
65536
2
5
9
2000
524288
65536
2
5
10
2000
524288
65536
2
5
11
2000
524288
65536
2
5
12
2000
524288
65536
2
5
13
2000
524288
65536
2
5
14
2000
524288
65536
2
5
15
2000
524288
65536
2
5
16
2000
524288
65536
2
5
17
2000
524288
65536
2
5
18
2000
524288
65536
3
4
5
19
2000
524288
65536
3
4
5
20
2000
524288
65536
3
4
5
21
2000
524288
65536
3
4
5
22
2000
524288
65536
3
4
5
23
2000
524288
65536
3
4
5
24
2000
524288
65536
3
4
5
25
2000
524288
65536
3
4
5
26
2000
524288
65536
3
4
5
27
2000
524288
65536
3
4
5
28
2000
524288
65536
3
4
5
29
2000
524288
65536
3
4
5
30
2000
524288
65536
3
4
5
31
2000
524288
65536
3
4
5
32
2000
524288
65536
3
4
5
33
2000
524288
65536
3
4
5
34
2000
524288
65536
4
5
35
2000
524288
65536
4
5
36
2000
524288
65536
4
5
37
2000
524288
65536
4
5
38
2000
524288
65536
4
5
39
2000
524288
65536
4
5
40
2000
524288
65536
4
5
41
2000
524288
65536
4
5
42
2000
524288
65536
4
5
43
2000
524288
65536
4
5
44
2000
524288
65536
4
5
45
2000
524288
65536
4
5
46
2000
524288
65536
4
5
47
2000
524288
65536
4
5
48
2000
524288
65536
4
5
49
2000
524288
65536
4
5
50
2000
524288
65536
5
51
2000
524288
65536
5
52
2000
524288
65536
5
53
2000
524288
65536
5
54
2000
524288
65536
5
55
2000
524288
65536
5
56
2000
524288
65536
5
57
2000
524288
65536
5
58
2000
524288
65536
5
59
2000
524288
65536
5
60
2000
524288
65536
5
61
2000
524288
65536
5
62
2000
524288
65536
5
63
2000
524288
65536
5
64
2000
524288
65536
5
65
2000
524288
65536
5
Submit
Back to Top