牛客754921490号
牛客754921490号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客754921490号的博客
全部文章
(共45篇)
题解 | 小A的线段(easy version)
#include <iostream> #include <istream> #include <ratio> #include <vector> #include <unordered_map> #include <algorith...
2025-12-22
0
6
题解 | 小红的二分图构造
#include <iostream> #include <vector> #include <algorithm> using namespace std; // 名词解释没做全 // 什么是节点的度不说清楚,看示例,大概是节点的边的数量 // 二分图大概是,所...
2025-12-22
0
7
题解 | 杨辉三角的变形
#include <iostream> #include <vector> using namespace std; // n > 2 之后,偶数出现的位置会在 2,3,2,4循环 // 循环节有4个,很难看出规律,如果不是知道答案就很尴尬 // 这种题目,最好的办法...
2025-12-21
0
9
题解 | ACM中的AC题
#include <iostream> #include <vector> #include <deque> using namespace std; int Min(int a, int b) { if(a < 0) { retu...
2025-12-21
0
6
题解 | 气球谜题
#include <iostream> #include <vector> using namespace std; /* 所有最终状态如下 0开头的 0,01,02,012,021, 5种 0:全是0号色 01:前半部分0号色,后半部分1号色 ...
2025-12-21
0
7
题解 | 小红的双生排列
#include <iostream> using namespace std; // 奇+偶=奇 // 奇数排列组合数*偶数排列组合数即为答案 // n为奇数,则只有奇开头 // n为偶数,则可以偶数开头也可以奇数开头,结果*2 int main() { int n; ...
2025-12-21
0
6
题解 | 隐匿社交网络
#include <iostream> #include <unordered_map> #include <vector> #include <algorithm> using namespace std; //w范围是1e18 32位装不下,需要6...
2025-12-20
0
7
题解 | 实现字通配符*
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool GetMatchLen(char* p, char* s, int len, vector&...
2025-12-20
0
7
题解 | 数组分组
#include <iostream> #include <vector> using namespace std; //n<=30,穷举计算量位 1<<30, 应该在限时内能计算完成 bool ok = false; void Dfs(int a, int...
2025-12-20
0
8
题解 | 小红走网格
#include <iostream> using namespace std; /* 这个数学定理根本不知道,找AI现查的 整数解存在的充要条件(贝祖定理) 对于线性不定方程 a*i + b*j = x(a,b,x 为整数) 存在整数解的充要条件是 gcd(a, b) 能整除 x(记为...
2025-12-20
0
7
首页
上一页
1
2
3
4
5
下一页
末页