自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

XiaoK's Blog

记录成长之路!

  • 博客(5)
  • 收藏
  • 关注

原创 LeetCode - 第208场周赛

Rank 国庆节补课,赛后补题,这周题比较简单. A. 文件夹操作日志搜集器 简单模拟. class Solution { public: int minOperations(vector<string>& logs) { int n=logs.size(); int ans=0; for(string log:logs){ if(log=="./") continue; if(lo

2020-09-27 16:11:16 87

原创 LeetCode - 第207场周赛

Rank 又翻车了… A. 重新排列单词间的空格 模拟. class Solution { public: string reorderSpaces(string text) { int len=text.size(); int cnt_word=0,cnt_blank=0; vector<string> words; for(int i=0;i<len;){ if(text[i]==' ')

2020-09-21 11:09:08 124

原创 LeetCode - 第35场双周赛

Rank A. 所有奇数长度子数组的和 暴力求解. class Solution { public: int sumOddLengthSubarrays(vector<int>& arr) { int n=arr.size(),ans=0; for(int i=0;i<n;++i){ for(int j=i;j<n;++j){ if((j-i+1)&1){

2020-09-20 00:21:02 122

原创 LCCUP - 2020秋季全国编程大赛(个人赛)

Rank A. 速算机器人 简单模拟. class Solution { public: int calculate(string s) { int x=1,y=0; for(char ch:s){ if(ch=='A'){ x=x*2+y; } else{ y=y*2+x; } }

2020-09-18 11:01:17 1100

原创 LeetCode - 第206场周赛

Rank A. 二进制矩阵中的特殊位置 暴力求解. class Solution { public: int numSpecial(vector<vector<int>>& mat) { int n=mat.size(); int m=mat[0].size(); int ans=0; for(int i=0;i<n;++i){ for(int j=0;j<m;++j

2020-09-14 23:06:30 95

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除