愿意使用 GNU 万能头应该遇不到这个问题。

// GNU 万能头
#include <bits/stdc++.h>

如果不愿意使用上述方法:

#include <algorithm>