摘要: 没办法,背下来吧 import java.text.*; import java.util.*; import java.lang.*; class Solution { public int daysBetweenDates(String date1, String date2){ int day 阅读全文
posted @ 2022-05-12 21:44 智人心 阅读(21) 评论(0) 推荐(0)
摘要: char数组转string 方法1: string str(ch); 方法2: string str = ch; 方法3(对string进一步操作): string s0 = ch; string s3 (s0, 8, 3); 阅读全文
posted @ 2022-05-12 21:13 智人心 阅读(25) 评论(0) 推荐(0)
摘要: 判断两个矩形的边所在直线关系即可 class Solution { public: bool isRectangleOverlap(vector<int>& rec1, vector<int>& rec2) { return !(rec1[0]>=rec2[2]||rec1[2]<=rec2[0]| 阅读全文
posted @ 2022-05-12 19:25 智人心 阅读(20) 评论(0) 推荐(0)
摘要: map<string,int>的用法 map<string,int>mp; mp["abc"]++; 阅读全文
posted @ 2022-05-12 14:05 智人心 阅读(24) 评论(0) 推荐(0)
摘要: 三角形面积计算公式: 参考 https://baike.baidu.com/item/%E4%B8%89%E8%A7%92%E5%BD%A2%E9%9D%A2%E7%A7%AF%E5%85%AC%E5%BC%8F/8491990 阅读全文
posted @ 2022-05-12 12:47 智人心 阅读(52) 评论(0) 推荐(0)
摘要: set的添加: set<string>wSet; string s = "sss"; wSet.insert(s); 遍历: for (auto it = wSet.cbegin(); it != wSet.cend(); it++){ cout<<*it<<endl; } 删除: wSet.era 阅读全文
posted @ 2022-05-12 12:21 智人心 阅读(31) 评论(0) 推荐(0)