随笔分类 -  Leetcode

摘要:img[i][j]周围的单元格,img[i+i1][j+j1], i1=-1,0,1, j1=-1,0,1, 每个都判断一次。O(9*m*n) class Solution { public: std::vector<std::vector<int>> imageSmoother( std::vec 阅读全文
posted @ 2023-07-20 00:54 安然春夏 阅读(26) 评论(0) 推荐(0) 编辑
摘要:1 class Solution { 2 public: 3 string toLowerCase(string s) { 4 for(char &ch: s){ 5 if(ch>='A' && ch<='Z'){ 6 ch=tolower(ch); 7 } 8 } 9 return s; 10 } 阅读全文
posted @ 2023-07-20 00:49 安然春夏 阅读(6) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示