小花Student
小花Student
全部文章
分类
归档
标签
去牛客网
登录
/
注册
小花Student的博客
全部文章
(共23篇)
题解 | #奇偶校验#
#include<iostream> //实现字符的奇校验 void addParity(char c) { int count = 0; for(int i = 0;i < 8;i++) { if((c >> i) & ...
2024-02-18
0
199
题解 | #查找#二分查找#
//二分查找方法实现 #include<iostream> #include<algorithm> const int MAX = 100; class BinarySearch { private: int m_low, m_high; int ...
2024-02-17
0
175
题解 | #查找#标记数组#
#include<iostream> const int N = 100; bool visited[N]; int main() { int n; while (std::cin >> n) { int a, b; ...
2024-02-17
0
134
题解 | #找最小数#
#include<iostream> #include<vector> #include<algorithm> struct Two//定义结构体 { int x, y; Two(int a, int b)//构造函数,用来对结构体变量赋值 ...
2024-02-16
0
173
题解 | #计算两个矩阵的乘积#
#include<iostream> #include<vector> #include<memory> class MatrixMultiply//实现矩阵乘法类 { private: int n, m, p;//n为A矩阵的行数,m为A矩阵的...
2024-02-07
0
193
题解 | #字符串链接#
//主要训练自己在vector和重载函数的编程能力,所以写得比较复杂 #include<iostream> #include<vector> const std::vector<char>& MyStrcat(std::vector<char>...
2024-02-05
0
230
题解 | #最小长方形#
#include<iostream> #include<algorithm> const int MAX = 1000; int main() { long long int X[MAX], Y[MAX]; long long int x, y; ...
2024-02-03
0
177
题解 | #还是畅通工程#
#include<iostream> #include<string> const int MAX = 100; int n; int cnt; int a, b; int Graph[MAX][MAX]; int m_Father[MAX];//每个集合的父节点,下标表...
2024-02-02
0
180
题解 | #畅通工程#
#include<iostream> //通过深度优先遍历统计连通分量的个数,从而得出还需要修建的最少道路 const int MAX = 1000; class DFS_Count { private: int cnt, n; int Graph[MAX][M...
2024-01-27
0
159
题解 | #ZOJ#
#include<iostream> #include<string> int main() { std::string s; std::cin >> s; int i; while (s.size() > 0) {...
2024-01-26
0
180
首页
上一页
1
2
3
下一页
末页