1496
【题解】洛谷P1496 火烧赤壁 (离散化)
P1496 火烧赤壁 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 我们首先先看数据,n<=20000,数据不多,但是范围大(-10^9<=Ai,Bi<=10^9),这时,就可以用离散化了。但是在这里我们会遇到区间重合的问题(也可以使用区间合并),如下图 本题的题意是让我们求出燃 ......
[LeetCode] 1496. Path Crossing
Given a string path, where path[i] = 'N', 'S', 'E' or 'W', each representing moving one unit north, south, east, or west, respectively. You start at t ......