wrdoct
wrdoct
全部文章
题解
复习(44)
面经(1)
归档
标签
去牛客网
登录
/
注册
wrdoct的博客
全部文章
/ 题解
(共88篇)
题解 | #矩阵乘法计算量估算#
来自专栏
#include <bits/stdc++.h> using namespace std; int main(){ int n = 0; while(cin >> n){ vector<pair<int, int>>...
C++
2022-07-01
0
300
题解 | #成绩排序#
来自专栏
#include <bits/stdc++.h> using namespace std; struct cmpJiangXu{ bool operator()(const pair<string, int>& a, const pair<string,...
C++
2022-06-29
0
359
题解 | #统计大写字母个数#
来自专栏
#include <bits/stdc++.h> using namespace std; int main(){ string str = ""; while(getline(cin, str)){ int res = 0; for(...
C++
2022-06-28
0
309
题解 | #矩阵乘法#
来自专栏
#include <bits/stdc++.h> using namespace std; int main(){ //输入 int firstRows = 0; int firstCols = 0; int secondRows = 0; i...
C++
2022-06-28
0
306
题解 | #配置文件恢复#
来自专栏
#include <bits/stdc++.h> using namespace std; vector<pair<string, string>> youXiaoCommand = { {"reset", ""}, {"reset", "bo...
C++
2022-06-28
0
286
题解 | #尼科彻斯定理#
来自专栏
#include <bits/stdc++.h> using namespace std; //验证尼科彻斯定理,即:任何一个整数m的立方都可以写成m个连续奇数之和。 void process(int num){ int pow = num * num * num; ...
C++
2022-06-28
0
313
题解 | #查找两个字符串a,b中的最长公共子串#
来自专栏
#include <bits/stdc++.h> using namespace std; //dp //dp[i][j]表示 到s1第i个,到s2第j个为止 的公共子串长度 (其中s1较短) void longestCommonSubsequence(string s1, stri...
C++
2022-06-27
0
304
题解 | #MP3光标位置#
来自专栏
#include <bits/stdc++.h> using namespace std; int main(){ //输入 int musicNum = 0; string command = ""; cin >> musicNum; ...
C++
2022-06-27
0
294
题解 | #计算日期到天数转换#
来自专栏
#include <bits/stdc++.h> using namespace std; //平年每一个月的天数 int pingYears[]={31,28,31,30,31,30,31,31,30,31,30,31}; //闰年每一个月的天数 int runYears[]={3...
C++
2022-06-26
0
322
题解 | #最长回文子串#
来自专栏
#include <bits/stdc++.h> using namespace std; bool isHuiWen(string s){ //cout << s << endl; /*int left = 0, right = s.size...
C++
2022-06-26
0
338
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页