Grass Segments
- 시간 제한
- 2s
- 메모리 제한
- 1024MB
- 제출
- 0
- 정답
- 0
- 맞힌 사람
- 0
- 정답 비율
- 0.0%
문제
Bessie is planting some grass on the positive real line. She has () different cultivars of grass, and will plant the th cultivar on the interval ().
In addition, cultivar grows better when there is some cultivar () such that cultivar and cultivar overlap with length at least (). Bessie wants to evaluate all of her cultivars. For each , compute the number of such that and overlap with length at least .
입력
The first line contains .
The next lines each contain three space-separated integers , , and .
출력
The answers for all cultivars on separate lines.
예제 입력 1
2
3 6 3
4 7 2
예제 출력 1
0
1
예제 입력 2
4
3 6 1
2 5 1
4 10 1
1 4 1
예제 출력 2
3
3
2
2
예제 입력 3
5
8 10 2
4 9 2
3 7 4
5 7 1
2 7 1
예제 출력 3
0
3
1
3
3
점수
Input 4-5: Inputs 6-11: is the same for all intervalsInputs 12-20: No additional constraints.
In addition, for Inputs 5, 7, ..., 19, for all .
코드를 제출하려면 로그인이 필요합니다.
로그인제출 내역이 없습니다.
아직 맞은 사람이 없습니다.
제출 내역이 없습니다.