古瑶
古瑶
全部文章
分类
归档
标签
去牛客网
登录
/
注册
古瑶的博客
全部文章
(共16篇)
题解 | 棋盘游戏
#include <iostream> #define ARC 6 #define INT_MAX 400 using namespace std; const int dx[4]={-1,0,0,1}; const int dy[4]={0,-1,1,0}; int a,b,c,d; ...
2025-03-26
0
38
题解 | 第一题
#include <iostream> #include<bits/stdc++.h> using namespace std; //秩优化的map并查集 map<int,int>father; map<int,int>height; int fin...
2025-03-22
0
40
题解 | 毕业bg
解法一:背包问题变形 #include <iostream> #include <vector> #include <algorithm> using namespace std; //经典背包问题加了个时间限制 struct BG { int h; //...
2025-03-18
0
42
题解 | Sharing
#include <iostream> #include<string> #include<vector> #include<unordered_map> using namespace std; struct node{ string add...
2025-03-18
0
34
题解 | False coin
#include <iostream> #include<vector> #include<algorithm> using namespace std; //未处理0,可能轻-1,可能重2,真1 //=说明两边都是真;不等号说明假在两边,其他真;同一硬币两次判断...
2025-03-16
0
36
题解 | Is It A Tree?
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include<algorithm> #include<vector> using namespace std; //判树条件:连通、边数=顶点数-1、入度...
2025-03-15
0
37
题解 | 【模板】差分
#include <iostream> #include<vector> using namespace std; int main() { int n, m; while (cin >> n>> m) { // 注意 while 处...
2025-03-08
0
44
题解 | 【模板】二维差分
#include <iostream> #include <vector> using namespace std; int main() { int n, m, q; while (cin >> n >> m >> q)...
2025-03-08
0
93
题解 | 买卖股票的最好时机(一)
#include <iostream> #include<vector> #include<algorithm> using namespace std; int main() { int n; while (cin >> n) { ...
2025-03-02
0
43
题解 | #识别有效的IP地址和掩码并进行分类统计#
#include <cctype> #include <iostream> #include<string> #include<vector> #include <algorithm> using namespace std; //合法的掩...
2024-05-02
0
222
首页
上一页
1
2
下一页
末页