> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0454_4sum_ii/slt.md).

# 思路1 hash

直接4重循环会超时

我们把4个分成两组，用hash来保存第一组的结果，方便第二组快速查找。时间复杂度O(n\*2)
