摘要: 华为机试输出指定字母在字符串的中的索引) #include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; char findk(string s, int k) { sort( 阅读全文
posted @ 2022-10-01 20:34 chunbai11 阅读(68) 评论(0) 推荐(0)
摘要: 华为机试句子重量-华为机试 #include<iostream> #include<string> #include<vector> using namespace std; int main() { string s; int i=0; getline(cin, s); s += ' '; int 阅读全文
posted @ 2022-10-01 16:31 chunbai11 阅读(48) 评论(0) 推荐(0)
摘要: 最大股票收益 对应的是122. 买卖股票的最佳时机 II - 力扣(LeetCode) #include<iostream> #include<string> #include<vector> using namespace std; int main() { string s; getline(c 阅读全文
posted @ 2022-10-01 15:52 chunbai11 阅读(71) 评论(0) 推荐(0)