wydxry
wydxry
全部文章
题解
归档
标签
去牛客网
登录
/
注册
wydxry的博客
全部文章
/ 题解
(共86篇)
题解 | #设计立方体类#
#include <iostream> using namespace std; class Cube { // write your code here...... private: int length; int width; int he...
C++
2022-04-11
0
324
题解 | #构造函数#
#include <iostream> #include <string> using namespace std; // Person类 class Person { public: string name; // 姓名 i...
C++
2022-04-11
0
274
题解 | #【模板】队列#
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int q[N]; int n, x; int front = -1, back = -1; string s; int main() { c...
C++
2022-03-24
0
256
题解 | #【模板】栈#
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int st[N]; int n, x, top = -1; string s; int main() { cin>>n; ...
C++
2022-03-24
1
342
题解 | #牛牛的单向链表#
#include <bits/stdc++.h> using namespace std; struct Node { int val; Node *next; Node():val(0),next(NULL){} }; int main() { int ...
C++
链表
2022-03-04
0
447
题解 | #最长公共子序列(一)#
#include <bits/stdc++.h> using namespace std; const int N=1e3+5; int dp[N][N]={0}; int n,m; string a,b; int main() { cin>>n>>m; ...
C++
动态规划
2022-03-03
1
420
题解 | #二分查找-II#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 如果目标值存在返回下标,否则返回 -1 * @param nums int整型vector * ...
C++
2021-12-03
0
437
题解 | #筛选法求素数#
#include <bits/stdc++.h> using namespace std; int main() { int n; int prime[105]={0}; prime[0]=1; prime[1]=1; for(int i=2;i&...
C++
2021-12-03
1
419
题解 | #棋子翻转#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A int整型vector<vector<>> * ...
C++
2021-12-02
0
646
题解 | #最大差值#
前缀和 class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A int整型vector * @param n int整型 ...
C++
2021-12-02
0
452
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页