摘要:
#1.统计相似字符串对的数目 统计相似字符串对的数目 Solution class Solution { public: int similarPairs(vector<string>& words) { unordered_map<int,int> book; int len1 = words.s 阅读全文
#1.统计相似字符串对的数目 统计相似字符串对的数目 Solution class Solution { public: int similarPairs(vector<string>& words) { unordered_map<int,int> book; int len1 = words.s 阅读全文
posted @ 2023-01-02 19:56
HM-W
阅读(29)
评论(0)
推荐(0)

1.统计能整除数字的位数 统计能整除数字的位数 Solution class Solution { public: int countDigits(int num) { int ans = 0; int n = num; while(n){ int t = n % 10; if(num % t ==
A - Power Given integers A and B, print the value A^B. 基础不解答 B - First Query Problem 基础不解答 C - Cash Register Takahashi is a cashier. There is a cash r
1.最多可以摧毁的敌人城堡数目 题目 最多可以摧毁的敌人城堡数目 Solution 可以第一重循环找到$1$,然后从该位置分别向左和向又寻找$-1$,寻找过程中遇到$1$则停止,不更新ans,遇到$-1$则更新ans。 class Solution { public: int captureFort
1.到目标字符串的最短距离 题目 Solution class Solution { public: int closetTarget(vector<string>& words, string target, int startIndex) { int n = words.size(); int
浙公网安备 33010602011771号