牛客754921490号
牛客754921490号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客754921490号的博客
全部文章
(共47篇)
题解 | 取数游戏
#include <cstdint> #include <iostream> #include <vector> using namespace std; // 一行最多6个,那么使用8位数据即可完成一行的比较,速度快很多倍 // 把不可拿取的位置用1标记,然后一...
2025-12-22
0
21
题解 | 小红的双生数
#include <iostream> #include <vector> using namespace std; /* 恰好有一个数相同,也就是每个数字必须且只能出现2次 最高位不能是0,当给出的数位数为奇数则答案是1100... 如果是偶数,逻辑略微复杂,情况过多,需要...
2025-12-22
0
18
题解 | 小A的线段(easy version)
#include <iostream> #include <istream> #include <ratio> #include <vector> #include <unordered_map> #include <algorith...
2025-12-22
0
22
题解 | 小红的二分图构造
#include <iostream> #include <vector> #include <algorithm> using namespace std; // 名词解释没做全 // 什么是节点的度不说清楚,看示例,大概是节点的边的数量 // 二分图大概是,所...
2025-12-22
0
20
题解 | 杨辉三角的变形
#include <iostream> #include <vector> using namespace std; // n > 2 之后,偶数出现的位置会在 2,3,2,4循环 // 循环节有4个,很难看出规律,如果不是知道答案就很尴尬 // 这种题目,最好的办法...
2025-12-21
0
27
题解 | 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
18
题解 | 气球谜题
#include <iostream> #include <vector> using namespace std; /* 所有最终状态如下 0开头的 0,01,02,012,021, 5种 0:全是0号色 01:前半部分0号色,后半部分1号色 ...
2025-12-21
0
26
题解 | 小红的双生排列
#include <iostream> using namespace std; // 奇+偶=奇 // 奇数排列组合数*偶数排列组合数即为答案 // n为奇数,则只有奇开头 // n为偶数,则可以偶数开头也可以奇数开头,结果*2 int main() { int n; ...
2025-12-21
0
18
题解 | 隐匿社交网络
#include <iostream> #include <unordered_map> #include <vector> #include <algorithm> using namespace std; //w范围是1e18 32位装不下,需要6...
2025-12-20
0
17
题解 | 实现字通配符*
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool GetMatchLen(char* p, char* s, int len, vector&...
2025-12-20
0
19
首页
上一页
1
2
3
4
5
下一页
末页