要冲外企的王心凌男孩
要冲外企的王心凌男孩
全部文章
分类
归档
标签
去牛客网
登录
/
注册
要冲外企的王心凌男孩的博客
全部文章
(共32篇)
题解 | #合唱队#
#include <iostream> using namespace std; #include <bits/stdc++.h> int main() { int n; cin>>n; vector<int>heights(n...
2023-09-29
0
277
题解 | #找出字符串中第一个只出现一次的字符#
#include <iostream> using namespace std; #include <bits/stdc++.h> int main() { string s; cin>>s; unordered_map<c...
2023-09-29
0
258
题解 | #输出单向链表中倒数第k个结点#
#include <iostream> using namespace std; struct ListNode{ int val; ListNode* next; ListNode(int x):val(x),next(nullptr){} }; ListNo...
2023-09-25
0
260
题解 | #简单错误记录#
#include <iostream> using namespace std; #include <unordered_map> #include <deque> int main() { unordered_map<string, int>...
2023-08-03
0
338
题解 | #孩子们的游戏(圆圈中最后剩下的数)#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @param m int整型 * @retu...
2023-07-30
0
299
题解 | #和为K的连续子数组#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * max length of the subarray sum = k * @param arr int整...
2023-07-29
1
242
题解 | #和为K的连续子数组#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * max length of the subarray sum = k * @param arr int整...
2023-07-29
4
519
题解 | #购物单#
//n:0~i个物品;M:钱数 m[i-1]:第i个物品的价格v[i-1]:第i个物品的价值 //dp[n][M] //dp[i][j]你现在有j元,现有i个物品,每个物品价格m[i],价值v[i],你花钱买他们,可以获得的最大价值是多少? //初始化一个data //背包分组 #include...
2023-07-26
0
289
题解 | #坐标移动#
#include <iostream> using namespace std; #include <vector> bool isNum(string &s) { int n = s.size(); for (int i = 0; i < n...
2023-07-26
0
237
题解 | #坐标移动#
#include <iostream> using namespace std; bool isNum(string s) { int n = s.size(); for(int i = 0; i < n; i++) { if(!isdigi...
2023-07-26
0
197
首页
上一页
1
2
3
4
下一页
末页