番禺小韭菜
番禺小韭菜
全部文章
分类
归档
标签
去牛客网
登录
/
注册
番禺小韭菜的博客
全部文章
(共93篇)
题解 | 合法IP
//容易遗漏的点在于数字串中有非法字符或字符'0'后跟字符的情况 //还有就是IP只有三个 #include <iostream> #include <sstream> #include <string> #include <deque> using...
2025-03-02
0
20
题解 | 24点运算
#include <iostream> #include <unordered_map> #include <vector> using namespace std; bool dfs(int sum, int n, bool flag, unordered...
2025-03-02
0
20
题解 | 扑克牌大小
#include <iostream> #include <algorithm> using namespace std; int main() { string tb = "345678910JQKA2jokerJOKER"; stri...
2025-03-02
0
24
题解 | 求最大连续bit数
#include <iostream> using namespace std; int main() { int n; cin >> n; int count = 0; while(n){ n &= n <&l...
2025-03-02
0
19
题解 | 仰望水面的歪
#include <iostream> #include <vector> using namespace std; long gcd(long a, long b){ return b==0? a : gcd(b,a%b); } int main() { ...
2025-03-02
3
25
题解 | 将真分数分解为埃及分数
/**/ #include <iostream> using namespace std; //基本思路是不断找小于等于a/b的最大埃及整数(保证分母从2开始递增),并作差,差值再寻找小于等于差值的最大埃及整数,直到等于0 //由调和数列和为无穷的性质,该方法应该能将任意大于0的整数分解...
2025-03-02
0
22
题解 | 字符串字符匹配
#include <iostream> #include <set> using namespace std; int main() { string s, t; getline(cin, s); getline(cin, t); set&l...
2025-03-02
0
26
题解 | 火车进站
#include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; //70 vector<int> nums; vector<string>...
2025-03-01
0
21
题解 | 尼科彻斯定理
#include<iostream> #include<string> using namespace std; int main() { int m; while (cin >> m) { int odd = m * m - (...
2025-03-01
0
26
题解 | 参数解析
#include <iostream> #include <vector> using namespace std; int main() { string str; getline(cin, str); int i = 0; int n =...
2025-03-01
0
23
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页