感谢各位大佬流光溢彩的代码。 求最大公约数的函数不需要有对调a、b的逻辑,否则会超时。(其实已经隐藏了对调逻辑)。 另外学会了map<pair<int, int> > myMap以及myMap[{a, b}]++的骚操作。 开心😄 class Solution { public: /** * * @param points Point类vector * @return int整型 */ int maxPoints(vector& points) { // write code here ...