#P7811. [JRKSJ R2] 你的名字。
[JRKSJ R2] 你的名字。
Description
You are given a sequence of length . There are queries. For each query, you need to find the minimum value in the interval under modulo , i.e., .
Input Format
The first line contains two integers .
The second line contains integers representing .
The next lines each contain three integers , representing one query.
Output Format
For each query, output one answer per line.
10 10
15 14 14 4 8 10 18 14 10 9
2 10 8
2 4 7
3 9 6
1 7 5
3 4 6
6 6 12
4 8 20
1 6 18
7 8 8
2 6 6
0
0
0
0
2
10
4
4
2
2
5 5
77 24 80 90 92
2 3 84
4 5 37
1 1 4
3 5 85
1 4 46
24
16
1
5
24
Hint
Idea: mcyl35, Solution: mcyl35, Code: mcyl35, Data: cyffff & mcyl35.
This problem uses bundled testdata.
| Special properties | Score | Dependency | |||
|---|---|---|---|---|---|
| None | |||||
| None | |||||
| Random testdata | |||||
| None |
Constraints: for of the testdata, , .
The memory limit for the first subtasks is , and the memory limit for the th subtask is .
Translated by ChatGPT 5
京公网安备 11011102002149号