摘要: 刷leetcode的时候,在sort函数里自己实现了一个比较算法: sort(points.begin(),points.end(),[](const vector<int>u,const vector<int>v){ return u[0]<v[0]||(u[0]==v[0]&&u[1]<v[1] 阅读全文
posted @ 2024-03-02 17:26 SandaiYoung 阅读(15) 评论(0) 推荐(0)
摘要: 柠檬水找零 题目链接:860. 柠檬水找零 - 力扣(LeetCode) 思路:注意对于20元的情况,有两种找零方式, 头一次见到这种情况,随便加一个标准输出才能通过的样例。 class Solution { public: bool lemonadeChange(vector<int>& bill 阅读全文
posted @ 2024-03-02 16:46 SandaiYoung 阅读(18) 评论(0) 推荐(0)