当前位置: 首页 > news >正文

2024牛客寒假算法基础集训营1(视频讲解全部题目)

2024牛客寒假算法基础集训营1(题目全解)

  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • K
  • L
  • M

2024牛客寒假算法基础集训营1(视频讲解全部题目)
在这里插入图片描述

A

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;void solve()
{int n; cin >> n;string s; cin >> s;bool f = false, F = false;for(int i = 0; i < n; i ++){if(s[i] == 'd'){for(int j = i + 1; j < n; j ++){if(s[j] == 'f'){for(int k = j + 1; k < n; k ++){if(s[k] =='s'){f = true; }}}}}}for(int i = 0; i < n; i ++){if(s[i] == 'D'){for(int j = i + 1; j < n; j ++){if(s[j] == 'F'){for(int k = j + 1; k < n; k ++){if(s[k] =='S'){F = true; }}}}}}cout << F << " " << f << endl;	
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

B

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
#define x first
#define y second
#define int long long
using namespace std;
typedef pair<int,int> pii;
int dc[3] = {-1, 0, 1};
void solve()
{int n; cin >> n;int l = 2, r = 2;vector<pii>lp, rp;map<pii,bool>st;for(int i = 0; i < n; i ++){int r, c; cin >> r >> c;st[{c,r}] = true;if(c <= 0){lp.push_back({c, r});}else if(c > 0){rp.push_back({c, r});}}if(lp.size()){for(int i = 0; i < lp.size(); i ++){if(lp[i].first == 0 and lp[i].second == 2){if(!st[{-1, 1}]){l = min(1ll, l);}else{l = 0;}continue;}for(int j = 0; j < 3; j ++){int nc = lp[i].x + dc[j];int nr = 3 - lp[i].y;if(st[{nc, nr}]){l = 0;}else{l = min(l, 1ll);}}}}if((st[{-1, 1}] and l == 1)){st[{0, 2}] = true;}if(l == 2){st[{0, 2}] = true;}if(rp.size()){for(int i = 0; i < rp.size(); i ++){for(int j = 0; j < 3; j ++){int nc = rp[i].x + dc[j];int nr = 3 - rp[i].y;if(st[{nc, nr}]){r = 0;}else{r = min(r, 1ll);}}}}else{if(st[{0, 2}]){r = 1;}}int ans = l + r;cout << ans << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

C

#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f3f3f3f3f
using namespace std;void solve()
{int n, q, tc; cin >> n >> q >> tc;vector<int>t(n + 1);vector<int>s(n + 1);vector<int>ss(n + 1);for(int i = 1; i <= n; i ++){cin >> t[i];}sort(t.begin() + 1, t.end());for(int i = 1; i <= n; i ++){s[i] = s[i - 1] + t[i];}for(int i = 1; i <= n; i ++){ss[i] = ss[i - 1] + s[i];}while(q--){int M; cin >> M;int l = 1, r = n;while(l < r){int mid = l + r >> 1;int cnt = n - mid + 1;if(cnt * tc <= M){r = mid;}else{l = mid + 1;}}if(l == n){if(tc > M){cout << s[n] + tc << endl;continue;} }cout << s[l - 1] + tc << endl;}
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;t = 1;//cin >> t;while(t--)solve();
}

D

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
#define int long long
using namespace std;void solve()
{int n, m; cin >> n >> m;vector<int>a(n);map<int,int>cnt;set<int>ans;ans.insert(0);for(int i = 0; i < n; i ++){cin >> a[i];cnt[a[i]] += 1;}if(n >= 30){//一定要减少绝对值不等于1的数字个数。for(auto [x, y]: cnt){if(n - cnt[x] - cnt[x - 2] > 30)continue;int mul = 1;bool flag = true;for(int i = 0; i < n; i ++){mul = mul * (a[i] - (x - 1));if(abs(mul) > 1e9){flag = false;break;}}if(flag)ans.insert(mul);mul = 1, flag = true;for(int i = 0; i < n; i ++){mul = mul * (a[i] - (x + 1));if(abs(mul) > 1e9){flag = false;break;}}if(flag)ans.insert(mul);}}else{//如果n <= 30sort(a.begin(), a.end());int tmp = a[0];for(int i = 0; i < n; i ++){a[i] -= tmp;}for(int i = -1e6; i <= 1e6; i ++){int mul = 1;bool flag = true;for(int j = 0; j < n; j ++){mul = mul * (a[j] + i);if(abs(mul) > 1e9){flag = false;break;}}if(flag)ans.insert(mul);}reverse(a.begin(), a.end());tmp = a[0];for(int i = 0; i < n; i ++){a[i] -= tmp;}for(int i = -1e6; i <= 1e6; i ++){int mul = 1;bool flag = true;for(int j = 0; j < n; j ++){mul = mul * (a[j] + i);if(abs(mul) > 1e9){flag = false;break;}}if(flag)ans.insert(mul);}}while(m--){int x; cin >> x;if(ans.count(x)){cout << "Yes" << endl;}else{cout << "No" << endl;}}}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;t = 1;//cin >> t;while(t--)solve();
}

E

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;
typedef pair<int,int> pii;void solve()
{int n, m; cin >> n >> m;vector<int>a(n);vector<pii>b(m);for(int i = 0; i < n; i ++){cin >> a[i];}for(int i = 0; i < m; i ++){int u, v; cin >> u >> v;u --, v --;b[i] = {u, v};}int ans = 11;function<void(int)> dfs = [&](int u)->void{if(u >= m){int sc = a[0];int top = 1;for(int i = 1; i < n; i ++){if(a[i] > sc){top ++;}}ans = min(ans, top);return;}int x = b[u].first, y = b[u].second;a[x] += 3;dfs(u + 1);//回溯a[x] -= 3;a[y] += 3;dfs(u + 1);a[y] -= 3;a[x] += 1, a[y] += 1;dfs(u + 1);a[x] -= 1, a[y] -= 1;};dfs(0);cout << ans << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

F

#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;int fact[N], infact[N];int qmi(int a, int b, int p){int res = 1;while(b){if(b & 1)res = res * a % p;a = a * a % p;b >>= 1;}return res;
}void init(){fact[0] = infact[0] = 1;for(int i = 1; i < N; i ++){fact[i] = fact[i - 1] * i % mod;infact[i] = infact[i - 1] * qmi(i, mod - 2, mod) % mod;}
}void solve()
{int n, m; cin >> n >> m;int res = 0;for(int i = 0; i <= m; i ++){if((m - i) % 2){res = ((res - (qmi(i, n, mod) * infact[i] % mod * infact[m - i] % mod)) % mod + mod) % mod;}else{res = (res + (qmi(i, n, mod) * infact[i] % mod * infact[m - i] % mod)) % mod;}}cout << res << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;t = 1;// cin >> t;init();while(t--)solve();
}

G

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define x first
#define y second
#define int long long
#define INF 0x3f3f3f3f
using namespace std;
typedef pair<int,int> pii;void solve()
{int n, m; cin >> n >> m;vector<pii>a(n + 1);for(int i = 1; i <= n; i ++){cin >> a[i].x >> a[i].y;}sort(a.begin(), a.end());vector<int>s(n + 1);for(int i = 1; i <= n; i ++){s[i] = s[i - 1] + a[i].y;}int ans = m;for(int i = n; i >= 1; i --){int dis = a[i].x - s[i];if(dis > m){continue;}ans = max(ans, m + s[i]);}cout << ans << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

H

#include<bits/stdc++.h>
#define endl '\n'
#define int long long
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;void solve()
{int n, m; cin >> n >> m;vector<int>v(n), w(n);for(int i = 0; i < n; i ++){cin >> v[i] >> w[i];}int ans = 0, pre = 0;for(int i = 31; i >= 0; i --){int x = pre;if((m >> i) & 1){x += (1 << i) - 1;pre += (1 << i);}int sum = 0;for(int j = 0; j < n; j ++){if((x | w[j]) == x){sum += v[j];}}ans = max(ans, sum);}int sum = 0;for(int j = 0; j < n; j ++){if((m | w[j]) == m){sum += v[j];}}ans = max(ans, sum);cout << ans << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

I

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;
uniform_int_distribution<int> u1(-99,99);//生成圆心
uniform_int_distribution<int> u2(1,100);//生成半径
default_random_engine e;void test()
{int n = 1e5;double r1 = 0;for(int i = 1; i <= n; i ++){int x = u1(e), y = u1(e);while(1){int r = u2(e);if(x + r > 100 || x - r < -100 || y + r > 100 || y - r < -100){continue;}else{r1 += (r);break;}} }double r2 = 0;for(int i = 1; i <= n; i ++){while(1){int x = u1(e), y = u1(e);int r = u2(e);if(x + r > 100 || x - r < -100 || y + r > 100 || y - r < -100){continue;}else{r2 += (r);break;}} }r1 = r1 / n;r2 = r2	/ n;cout << r1 << " " << r2 << endl;
}
void solve(){int n; cin >> n;double sum = 0;for(int i = 0; i < n; i ++){int x, y, r; cin >> x >> y >> r;sum += r; }sum /= n;if((int)sum == 17){cout << "bit-noob" << endl;}else{cout << "buaa-noob" << endl;}
}
signed main()
{e.seed(time(NULL));ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)// solve();test();
}

J

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;void solve()
{int n, x, y; cin >> n >> x >> y;vector<int>a(n);for(int i = 0; i < n; i ++){cin >> a[i];}auto check = [&](int dis)->bool{// cout << dis << endl;set<int>st;st.insert(x), st.insert(y);if(abs(x - y) > dis){return false;}for(int i = 0; i < a.size(); i ++){while(st.size() and abs(*st.begin() - a[i]) > dis){st.erase(st.begin());}while(st.size() and abs(*st.rbegin() - a[i]) > dis){st.erase(*st.rbegin());}if(!st.size()){return false;}st.insert(a[i]);}return true;};int l = 0, r = 1e9;while(l < r){int mid = l + r >> 1;if(check(mid)){r = mid;}else{l = mid + 1;}}cout << l << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;t = 1;// cin >> t;while(t--)solve();
}

K

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
#define int long long
using namespace std;
const int N = 1e5 + 10;
const int mod = 998244353;
int nex[N];
string choice[N];
int p[N], in[N];
bool st[N];
char t[N];
set<int> root;
int nums;int find(int x){if(x != p[x])p[x] = find(p[x]);return p[x];
}void init(int x){for(int i = 1; i <= x; i ++){p[i] = i;root.insert(i);}
}void merge(int x, int y){int px = find(x);int py = find(y);if(px != py){if(in[px]){p[px] = py;root.erase(px);}else{p[py] = px;root.erase(py);}}
}void dfs(int u, char answer){if(st[nex[u]]){if(answer == t[nex[u]]){nums ++;}return;}char nex_answer = choice[nex[u]][answer - 'A'];t[nex[u]] = answer;st[nex[u]] = true;dfs(nex[u], nex_answer);	st[nex[u]] = false;
}void solve()
{int n; cin >> n;init(n);for(int i = 1; i <= n; i ++){int x; string s;cin >> x >> s;choice[i] = s;nex[i] = x;in[x] ++;merge(x, i);}int ans = 1;for(auto x: root){for(int i = 0; i < 5; i ++){t[x] = ('A' + i);st[x] = true;dfs(x, choice[x][i]);}ans = nums * ans % mod;nums = 0;}cout << ans << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;t = 1;// cin >> t;while(t--)solve();
}

L

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
using namespace std;void solve()
{int c, d, h, w;cin >> c >> d >> h >> w;cout << 3 * w * c << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

M

#include<bits/stdc++.h>
#define endl '\n'
#define deb(x) cout << #x << " = " << x << '\n';
#define INF 0x3f3f3f3f
#define int long long
using namespace std;void solve()
{int n; cin >> n;if(n % 6)cout << (n / 6) * 2 << endl;elsecout << (n / 6) << endl;
}signed main()
{ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t;//t = 1;cin >> t;while(t--)solve();
}

相关文章:

2024牛客寒假算法基础集训营1(视频讲解全部题目)

2024牛客寒假算法基础集训营1&#xff08;题目全解&#xff09; ABCDEFGHIJKLM 2024牛客寒假算法基础集训营1&#xff08;视频讲解全部题目&#xff09; A #include<bits/stdc.h> #define endl \n #define deb(x) cout << #x << " " << …...

第三百一十三回

文章目录 1. 概念介绍2. 实现方法2.1 obscureText属性2.2 decoration属性 3. 示例代码4. 内容总结 我们在上一章回中介绍了"如何实现倒计时功能"相关的内容&#xff0c;本章回中将介绍如何实现密码输入框.闲话休提&#xff0c;让我们一起Talk Flutter吧。 1. 概念介绍…...

倒计时61天

M-智乃的36倍数(normal version)_2024牛客寒假算法基础集训营3 (nowcoder.com) //非ac代码,超时了,54.17/100#include<bits/stdc.h> using namespace std; const int N1e55; const int inf0x3f3f3f3f; #define int long long int n; string s1[N]; void solve() {cin>…...

npm后Truffle找不到命令(ubantu20系统)

Truffle找不到命令 方法1方法2 方法1 # 编辑.profile vim ~/.profile # 在.profile末尾把nodejs的解压路径添加到$PATH环境变量中 PATH"$HOME/bin:$HOME/.local/bin:路径:$PATH" source 文件方法2 #ls -l 在nodejs的bin目录下查看truffle链接的脚本文件 truffle -&…...

嵌入式学习第三篇——51单片机

目录 1&#xff0c;嵌入式系统 1&#xff0c;嵌入式系统的定义 2&#xff0c;单片机的定义 2&#xff0c;51单片机 1&#xff0c;开发环境 2&#xff0c;开发板使用的基本思路 1&#xff0c;查看原理图&#xff0c;查看芯片手册 2&#xff0c;获得调用硬件的管…...

RabbitMQ详解

RabbitMQ 1.初识MQ 1.1.同步和异步通讯 微服务间通讯有同步和异步两种方式&#xff1a; 同步通讯&#xff1a;就像打电话&#xff0c;需要实时响应。 异步通讯&#xff1a;就像发邮件&#xff0c;不需要马上回复。 两种方式各有优劣&#xff0c;打电话可以立即得到响应&a…...

CGAL::2D Arrangements-4

4. Free函数 Arrangement_on_surface_2类模板是用曲线切分二维的面。因为它的接口设计是最简化的&#xff0c;这意味着它的成员函数很少执行几何操作。本章将解释怎么利用这些Free function来达到Arrangement操作。执行这些操作通常需要优秀的几何算法&#xff0c;而且有时会对…...

终端命令提示符:如何查看我们电脑端口是否被占用和处理方式

文章目录 端口信息查看1、Windows:2、Linux/macOS: 使用 netstat使用 lsof 端口信息查看 在不同的操作系统中&#xff0c;查看端口是否被占用的指令有所不同。以下是一些常见的指令&#xff1a; 1、Windows: 使用命令行工具 netstat 来查看端口占用情况。 电脑键盘按住 win…...

elasticsearch重置密码操作

安装es的时候需要测试这个url&#xff1a;http://127.0.0.1:9200/ 出现弹窗让我输入账号和密码。我第一次登录&#xff0c;没有设置过账号和密码&#xff0c; 解决方法是&#xff1a;在es的bin目录下打开cmd窗口&#xff0c;敲命令&#xff1a;.\elasticsearch-reset-password…...

从零开始手写mmo游戏从框架到爆炸(零)—— 导航

从今天开始我们尝试从零开始写一个mmo的游戏。主要技术还是netty。参考了网上很多的大神的框架&#xff0c;本来希望基于ioGame或者vert.x等来直接写功能的&#xff0c;觉得从零开始更有意义&#xff0c;而且咱们也不需要太NB的底层功能&#xff0c;够用就行。 下面是导航&…...

机器学习7-K-近邻算法(K-NN)

K-Nearest Neighbors&#xff08;K-近邻算法&#xff0c;简称KNN&#xff09;是一种基本的监督学习算法&#xff0c;用于解决分类和回归问题。KNN的核心思想是基于距离度量&#xff0c;在特征空间中找到最近的K个样本&#xff0c;然后使用它们的标签进行决策。以下是KNN的基本概…...

相机图像质量研究(7)常见问题总结:光学结构对成像的影响--镜片固化

系列文章目录 相机图像质量研究(1)Camera成像流程介绍 相机图像质量研究(2)ISP专用平台调优介绍 相机图像质量研究(3)图像质量测试介绍 相机图像质量研究(4)常见问题总结&#xff1a;光学结构对成像的影响--焦距 相机图像质量研究(5)常见问题总结&#xff1a;光学结构对成…...

猫头虎分享已解决Bug || Go Error: cannot convert int to string

博主猫头虎的技术世界 &#x1f31f; 欢迎来到猫头虎的博客 — 探索技术的无限可能&#xff01; 专栏链接&#xff1a; &#x1f517; 精选专栏&#xff1a; 《面试题大全》 — 面试准备的宝典&#xff01;《IDEA开发秘籍》 — 提升你的IDEA技能&#xff01;《100天精通鸿蒙》 …...

前端bug手册

JavaScript错误&#xff1a;常见的JavaScript错误包括语法错误、未定义的变量、类型错误等。这些错误可能导致页面无法正常运行或功能无法正常使用。样式问题&#xff1a;前端开发中常见的样式问题包括布局错乱、元素位置不正确、样式覆盖等。这些问题可能导致页面显示不正常或…...

Elasticsearch中Document Routing特性

Document Routing在Elasticsearch中是一种高级特性&#xff0c;它允许用户在索引文档时指定一个路由值。通过这种方式&#xff0c;可以确保具有相同路由值的所有文档都存储在同一个分片中。这对于提高查询效率特别有用&#xff0c;因为它允许查询只针对包含相关文档的特定分片&…...

【Git版本控制 03】远程操作

目录 一、克隆远程仓库 二、推送远程仓库 三、拉取远程仓库 四、忽略特殊文件 五、命令配置别名 一、克隆远程仓库 Git是分布式版本控制系统&#xff0c;同⼀个Git仓库&#xff0c;可以分布到不同的机器上。怎么分布呢&#xff1f; 找⼀台电脑充当服务器的⻆⾊&#xff…...

【Git】Windows下通过Docker安装GitLab

私有仓库 前言基本思路拉取镜像创建挂载目录创建容器容器启动成功登录仓库设置中文更改密码人员审核配置邮箱 前言 由于某云存在人数限制&#xff0c;这个其实很好理解&#xff0c;毕竟使用的是云服务器&#xff0c;人家也是要交钱的。把代码完全放在别人的服务器上面&#xf…...

flutter 操作mysql

引入模块 dependencies: flutter: sdk: flutter mysql1: ^0.20.0 mysql helper 的代码 import dart:async; import package:mysql1/mysql1.dart; class MySqlHelper { static const _host localhost; static const _port 3333; static const _user user; static c…...

c++阶梯之类与对象(中)< 续集 >

前文&#xff1a; c阶梯之类与对象&#xff08;上&#xff09;-CSDN博客 c阶梯之类与对象&#xff08;中&#xff09;-CSDN博客 前言&#xff1a; 在上文中&#xff0c;我们学习了类的六个默认成员函数之构造&#xff0c;析构与拷贝构造函数&#xff0c;接下来我们来看看剩下…...

GitLag所有操作-汇总

1、MAC Git环境设置 跳转 Git通过Token拉代码&#xff1a; 跳转 Git基础操作&#xff1a;拉、put、删 跳转 Git回滚操作&#xff1a; 跳转 Git回滚操作-复杂 跳转 对于Commit但是还没有push的代码&#xff0c;如果回滚&#xff1a; 跳转...

K8S认证|CKS题库+答案| 11. AppArmor

目录 11. AppArmor 免费获取并激活 CKA_v1.31_模拟系统 题目 开始操作&#xff1a; 1&#xff09;、切换集群 2&#xff09;、切换节点 3&#xff09;、切换到 apparmor 的目录 4&#xff09;、执行 apparmor 策略模块 5&#xff09;、修改 pod 文件 6&#xff09;、…...

React hook之useRef

React useRef 详解 useRef 是 React 提供的一个 Hook&#xff0c;用于在函数组件中创建可变的引用对象。它在 React 开发中有多种重要用途&#xff0c;下面我将全面详细地介绍它的特性和用法。 基本概念 1. 创建 ref const refContainer useRef(initialValue);initialValu…...

laravel8+vue3.0+element-plus搭建方法

创建 laravel8 项目 composer create-project --prefer-dist laravel/laravel laravel8 8.* 安装 laravel/ui composer require laravel/ui 修改 package.json 文件 "devDependencies": {"vue/compiler-sfc": "^3.0.7","axios": …...

Java线上CPU飙高问题排查全指南

一、引言 在Java应用的线上运行环境中&#xff0c;CPU飙高是一个常见且棘手的性能问题。当系统出现CPU飙高时&#xff0c;通常会导致应用响应缓慢&#xff0c;甚至服务不可用&#xff0c;严重影响用户体验和业务运行。因此&#xff0c;掌握一套科学有效的CPU飙高问题排查方法&…...

JS设计模式(4):观察者模式

JS设计模式(4):观察者模式 一、引入 在开发中&#xff0c;我们经常会遇到这样的场景&#xff1a;一个对象的状态变化需要自动通知其他对象&#xff0c;比如&#xff1a; 电商平台中&#xff0c;商品库存变化时需要通知所有订阅该商品的用户&#xff1b;新闻网站中&#xff0…...

C++:多态机制详解

目录 一. 多态的概念 1.静态多态&#xff08;编译时多态&#xff09; 二.动态多态的定义及实现 1.多态的构成条件 2.虚函数 3.虚函数的重写/覆盖 4.虚函数重写的一些其他问题 1&#xff09;.协变 2&#xff09;.析构函数的重写 5.override 和 final关键字 1&#…...

招商蛇口 | 执笔CID,启幕低密生活新境

作为中国城市生长的力量&#xff0c;招商蛇口以“美好生活承载者”为使命&#xff0c;深耕全球111座城市&#xff0c;以央企担当匠造时代理想人居。从深圳湾的开拓基因到西安高新CID的战略落子&#xff0c;招商蛇口始终与城市发展同频共振&#xff0c;以建筑诠释对土地与生活的…...

如何更改默认 Crontab 编辑器 ?

在 Linux 领域中&#xff0c;crontab 是您可能经常遇到的一个术语。这个实用程序在类 unix 操作系统上可用&#xff0c;用于调度在预定义时间和间隔自动执行的任务。这对管理员和高级用户非常有益&#xff0c;允许他们自动执行各种系统任务。 编辑 Crontab 文件通常使用文本编…...

day36-多路IO复用

一、基本概念 &#xff08;服务器多客户端模型&#xff09; 定义&#xff1a;单线程或单进程同时监测若干个文件描述符是否可以执行IO操作的能力 作用&#xff1a;应用程序通常需要处理来自多条事件流中的事件&#xff0c;比如我现在用的电脑&#xff0c;需要同时处理键盘鼠标…...

「全栈技术解析」推客小程序系统开发:从架构设计到裂变增长的完整解决方案

在移动互联网营销竞争白热化的当下&#xff0c;推客小程序系统凭借其裂变传播、精准营销等特性&#xff0c;成为企业抢占市场的利器。本文将深度解析推客小程序系统开发的核心技术与实现路径&#xff0c;助力开发者打造具有市场竞争力的营销工具。​ 一、系统核心功能架构&…...