2020年3月4日

摘要: 1317. 将整数转换为两个无零整数的和 1 class Solution { 2 public: 3 bool check(int n){ 4 while(n){ 5 if(n%10==0){ 6 return false; 7 } 8 n=n/10; 9 } 10 return true; 11 阅读全文
posted @ 2020-03-04 22:01 zb121 阅读(141) 评论(0) 推荐(0)
 

2020年3月3日

摘要: 1365. 有多少小于当前数字的数字 const int maxn=500+10; //int hash[maxn]={0}; vector<int>ans; class Solution { public: vector<int> smallerNumbersThanCurrent(vector< 阅读全文
posted @ 2020-03-03 01:54 zb121 阅读(133) 评论(0) 推荐(0)
 

2020年2月29日

摘要: 按照行优先的方式遍历,因为一行只能放置一个元素,所以每一行不需要进行判断是否重复了。。。 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<cstdio> 5 using namespace std; 阅读全文
posted @ 2020-02-29 22:35 zb121 阅读(129) 评论(0) 推荐(0)