| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3657 |
| 3 | jiangly | 3638 |
| 4 | turmax | 3442 |
| 5 | tourist | 3380 |
| 6 | Um_nik | 3353 |
| 7 | strapple | 3350 |
| 8 | squareOf105 | 3346 |
| 9 | heuristica | 3322 |
| 10 | maroonrk | 3310 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 151 |
| 3 | maspy | 150 |
| 4 | AmShZ | 144 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 135 |
| 9 | maroonrk | 133 |
| 10 | qwexd | 130 |
| Название |
|---|



Your code misses a venue-sensitive pair as it only checks up to 11 lectures ahead for b overlaps outside fo the a overlap window.
Input:
Outputs YES when NO is expected for this test case, as in venue a, all lectures are single time points (2, 4, 6 -> 26). As a result of this, there are zero overlaps, meaning {1,13} is attendable in venue a. But in venue b, lecture one is [1,10] while lecture 13 is [5,6], meaning they overlap, which means {1,13} is not attendable in venue b, making it venue-sensitive.
Your code seemed to break here
because after processing j, it checks j = 1 -> 11 and breaks, never reaching j=12 which is lecture 13, making it incorrectly output YES.
12 1 1 1 1 2 2 100 200 3 3 300 400 4 4 500 600 5 5 700 800 6 6 900 1000 7 7 1100 1200 8 8 1300 1400 9 9 1500 1600 10 10 1700 1800 11 11 1900 2000 12 12 1 1 this also works
Can you check my final solution? 358873905
Code (assumedly) works now, no edge cases I could find to break your code.