牛客909459958号
牛客909459958号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客909459958号的博客
全部文章
(共11篇)
题解 | #【模板】完全背包#
#include <iostream> #include<bits/stdc++.h> //与01背包区别不大,就下面两处,恰好装满时的解决思路也是和01背包一模一样 #include <vector> using namespace std; int main...
2024-08-03
0
118
题解 | #【模板】01背包#
#include <iostream> #include<bits/stdc++.h> #include <vector> using namespace std; int main() { int n,V; cin>>n>&...
2024-08-03
0
127
题解 | #[NOIP2001]装箱问题#
#include <iostream> #include<algorithm> #include<vector> using namespace std; //目的就是计算能够装的最大体积 //首先定义dp[j]表示箱内容量为j时体积最大值 int main() ...
2024-08-03
0
121
题解 | #删除链表的节点#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 ...
2024-08-02
0
110
题解 | #合并两个排序的链表#
/**非常重要,几个关键语句要会背 * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { ...
2024-08-01
0
103
题解 | #反转链表#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ #include <cstddef> class ...
2024-07-29
0
129
题解 | #【模板】链表#
#include<bits/stdc++.h> using namespace std; struct Lnode{ int data; Lnode *next; }; void indexinsert(int a,int b,Lnode* L){ Lnode*p=L; Lnod...
2024-07-26
0
124
题解 | #还是A+B#
我觉得主要问题还是太依赖暴力解决问题了,该题只要求判断给定末尾k位数字是否相同,只需要%10的k次方取模进行判断就行,还是要多考虑一下技巧问题。
2024-05-05
0
175
题解 | #阶乘#
#include <iostream> using namespace std; typedef long long LL;//应对超过32位的n! LL jiechen(int n){ LL mul=1; for(int i=n;i>=1;i--){ ...
2024-05-03
0
165
题解 | #Simple Sorting#
#include <iostream> #include<algorithm> using namespace std; int main() { int n=0; cin>>n; int *arr=new int[n]; int ...
2024-03-19
0
244
首页
上一页
1
2
下一页
末页