pat1111-1120

1111 比较麻烦的最短路

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 505;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)struct Node{int to, nx, di, ti;
}E[N*N*2];
int head[N], tot;
void add(int fr, int to, int di, int ti) {E[tot].to = to; E[tot].di = di; E[tot].ti = ti; E[tot].nx = head[fr];head[fr] = tot ++;
}
vector<int> ans1; int Ans1;
vector<int> ans2; int Ans2;struct Hode{int po, di, ti;Hode(int a=0, int b=0, int c=0):po(a), di(b), ti(c){}bool operator < (const Hode & T) const {if(di != T.di) return di > T.di;else return ti > T.ti;}
};
struct Tode{int po, di, ti;Tode(int a=0, int b=0, int c=0):po(a), di(b), ti(c){}bool operator < (const Tode & T) const {if(ti != T.ti) return ti > T.ti;else return di > T.di;}
};int pre[N], vis[N];
int dis[N], tim[N];
void dfs1(int x, int tag) {if(x == tag) return;dfs1(pre[x], tag);ans1.push_back(x);
}
void dfs2(int x, int tag) {if(x == tag) return;dfs2(pre[x], tag);ans2.push_back(x);
}void dij1(int s, int t) {priority_queue<Hode> Q;memset(dis, INF, sizeof(dis));memset(tim, INF, sizeof(tim));dis[s] = 0; tim[s] = 0;memset(vis, 0, sizeof(vis));Q.push(Hode(s, dis[s], tim[s]));while(!Q.empty()) {int po = Q.top().po; Q.pop();if(vis[po]) continue;vis[po] =  1;for(int i = head[po]; ~i; i = E[i].nx) {int to = E[i].to;if(dis[to] > dis[po] + E[i].di) {dis[to] = dis[po] + E[i].di;tim[to] = tim[po] + E[i].ti;pre[to] = po;Q.push(Hode(to, dis[to], tim[to]));}else if(dis[to] == dis[po] + E[i].di && tim[to] > tim[po] + E[i].ti) {tim[to] = tim[po] + E[i].ti;pre[to] = po;Q.push(Hode(to, dis[to], tim[to]));} }}
//  printf("Distance = %d: %d", dis[t], s);ans1.push_back(s); Ans1 = dis[t];dfs1(t, s);
//  printf("\n");
}
void dij2(int s, int t) {priority_queue<Tode> Q;memset(dis, INF, sizeof(dis));memset(tim, INF, sizeof(tim));dis[s] = 0; tim[s] = 0;memset(vis, 0, sizeof(vis));Q.push(Tode(s, dis[s], tim[s]));while(!Q.empty()) {int po = Q.top().po; Q.pop();if(vis[po]) continue;vis[po] =  1;for(int i = head[po]; ~i; i = E[i].nx) {int to = E[i].to;if(tim[to] > tim[po] + E[i].ti) {dis[to] = dis[po] + 1;tim[to] = tim[po] + E[i].ti;pre[to] = po;Q.push(Tode(to, dis[to], tim[to]));}else if(tim[to] == tim[po] + E[i].ti && dis[to] > dis[po] + 1) {dis[to] = dis[po] + 1;pre[to] = po;Q.push(Tode(to, dis[to], tim[to]));} }}ans2.push_back(s); Ans2 = tim[t];dfs2(t, s); 
}
int main() {int n, m;while(~scanf("%d %d", &n, &m)) {ans1.clear(); ans2.clear();memset(head, -1, sizeof(head));tot = 0;for(int i = 0; i < m; ++i) {int a, b, c, d, e; scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);add(a, b, d, e);if(!c) add(b, a, d, e);}int s,t; scanf("%d %d", &s, &t);dij1(s, t);dij2(s, t);//  if(s == t) while(1);int fl = 1;for(int i = 0; i < min(ans1.size(), ans2.size()); ++i) {if(ans1[i] != ans2[i]) {fl = 0; break;}}if(fl) {printf("Distance = %d; Time = %d: ", Ans1, Ans2);for(int i = 0; i < ans1.size(); ++i) {if(i) printf(" -> ");printf("%d", ans1[i]);} printf("\n");}else {printf("Distance = %d: ", Ans1);for(int i = 0; i < ans1.size(); ++i) {if(i) printf(" -> ");printf("%d", ans1[i]);}printf("\nTime = %d: ", Ans2);for(int i = 0; i < ans2.size(); ++i) {if(i) printf(" -> ");printf("%d", ans2[i]);}printf("\n");}}return 0;
}

1112 gcd一下

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 505;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)char s[1005];
map<char, int> mp; int tot;
char table[40];
map<char, int> suc;
vector<int> vc[40];int gcd(int a, int b) {if(b == 0) return a;else return gcd(b, a%b);
}
int main() {int n;tot = 0;for(char i = 'a'; i <= 'z'; ++i) mp[i] = ++tot, table[tot] = i;for(char i = '0'; i <= '9'; ++i) mp[i] = ++tot, table[tot] = i;mp['_'] = ++tot; table[tot] = '_';while(~scanf("%d", &n)) {suc.clear();for(int i = 0; i < 40; ++i) vc[i].clear();scanf("%s", s);int len = strlen(s);int tmp = 0;for(int i = 0; i <= len; ++i) {if(i && s[i] != s[i-1]) {vc[mp[s[i-1]]].push_back(tmp);//  printf("%c %d\n", s[i-1], tmp);tmp = 0;}tmp ++;}for(int i = 1; i <= tot; ++i) {if(vc[i].size() > 0) {//  printf("%c ", table[i]); for(int j = 0; i < vc[i].size(); ++j) printf("%d ", vc[i][j]); printf("\n");int tt = vc[i][0];for(int j = 1; j < vc[i].size(); ++j) {tt = gcd(tt, vc[i][j]);}if(tt % n == 0) {//    printf("%c\n",table[i]);suc[table[i]] = 1;}}}tmp = 0;for(int i = 0; i < len; ++i) {if(suc[s[i]] > 0) {suc[s[i]] = -1;printf("%c", s[i]);}}  printf("\n");for(int i = 0; i <= len; ++i) {if(i && s[i] != s[i-1]) {if(suc[s[i-1]] == -1) {for(int j = 0; j < tmp/n; ++j) printf("%c", s[i-1]);}else for(int j = 0; j < tmp; ++j) printf("%c", s[i-1]);tmp = 0;}tmp ++;}printf("\n");}return 0;
}

1113

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int A[N];ll Abs(ll x) {if(x < 0) return -x;else return x;
}
int main() {int n;while(~scanf("%d", &n)) {ll all = 0;for(int i = 0; i < n; ++i) {scanf("%d", &A[i]);all += A[i];}sort(A, A+n);ll tmp = 0;for(int i = 0; i < n/2; ++i) {tmp += A[i];}ll ans = Abs(tmp - (all-tmp));if(n % 2) {tmp += A[n/2];ans = max(ans, Abs(tmp - (all-tmp)) );}printf("%d %lld\n", n%2, ans);}return 0;
}

1114 题意不好理解 其实就是并查集

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int f[N];
int find(int x) { return x == f[x]? x : f[x] = find(f[x]); }
void merge(int a, int b) {if(b == -1 || a == -1) return;int t1 = find(a); int t2 = find(b);if(t1 != t2) {if(t1 > t2) f[t1] = t2; else f[t2] = t1;}
}
int has[N];
int sett[N], area[N];
int cnt[N]; double avg_set[N], avg_area[N]; 
int ord[N];
int cmp(int x, int y) {if(avg_area[x] != avg_area[y]) return avg_area[x] > avg_area[y];else return x < y;
}
int main() {int n;while(~scanf("%d", &n)) {for(int i = 0; i < 1e5; ++i) f[i] = i;for(int i = 0; i < n; ++i) {int a,b,c; scanf("%d %d %d", &a, &b, &c);has[a] ++; has[b] ++; has[c] ++;merge(a, b); merge(a, c);int d; scanf("%d", &d);for(int j = 0; j < d; ++j) {int l; scanf("%d", &l);has[l] ++;merge(a, l);}scanf("%d %d", &sett[a], &area[a]);}
//    printf("hh\n");for(int i = 0; i < 1e5; ++i) {if(has[i]) {int t1 = find(i);cnt[t1] ++; avg_set[t1] += sett[i]; avg_area[t1] += area[i];}  }int tot = 0;for(int i = 0; i < 1e5; ++i) {if(cnt[i]) {avg_set[i] /= cnt[i]; avg_area[i] /= cnt[i];ord[tot ++] = i;  }}sort(ord, ord + tot, cmp);printf("%d\n", tot);for(int i = 0; i < tot; ++i) {printf("%04d %d %.3f %.3f\n", ord[i], cnt[ord[i]], avg_set[ord[i]], avg_area[ord[i]]);}}return 0;
}

1115

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e3+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int num[N];
int L[N];
int R[N];
int root = 0;
void insert(int x, int nw) {if(root == -1) {root = x; return;}if(num[x] <= num[nw]) {if(L[nw]) insert(x, L[nw]);else L[nw] = x;}else {if(R[nw]) insert(x, R[nw]);else R[nw] = x;}
}
int cnt[N];
int Deep;
void dfs(int x, int dep) {Deep = max(Deep, dep);cnt[dep] ++;if(L[x]) dfs(L[x], dep+1);if(R[x]) dfs(R[x], dep+1);
}
int main() {int n;while(~scanf("%d", &n)) {root = -1;for(int i = 0; i < n; ++i) {scanf("%d", &num[i]);insert(i, root);}Deep = -1;dfs(root, 0);printf("%d + %d = %d\n", cnt[Deep], cnt[Deep-1], cnt[Deep] + cnt[Deep-1]);}return 0;
}

1116

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int Rank[N];
int has[N];
int prime(int x) {if(x == 1) return 0;if(x == 2) return 1;for(int i = 2; i <= sqrt(x); ++i) {if(x % i == 0) return 0;}return 1;
}
int main() {int n;while(~scanf("%d", &n)) {memset(has, 0, sizeof(has));for(int i = 0; i < n; ++i) {int a; scanf("%d", &a);Rank[a] = i+1;}int k; scanf("%d", &k);while(k--) {int a; scanf("%d", &a);if(has[a]) printf("%04d: Checked\n", a);else if(Rank[a] == 0) printf("%04d: Are you kidding?\n", a);else if(Rank[a] == 1) printf("%04d: Mystery Award\n", a);else if(prime(Rank[a])) printf("%04d: Minion\n", a);else printf("%04d: Chocolate\n", a);if(Rank[a]) has[a] = 1;}}return 0;
}

1117这题题意也是扯淡啊,,,,

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int a[N];
int main() {int n;while(~scanf("%d", &n)) {for(int i = 0; i < n; ++i) scanf("%d", &a[i]);sort(a, a+n);a[n] = INF;int ans = -1;for(int i = 0; i < n; ++i) {if(a[i] != a[i+1]) {ans = max(ans, min(n-i-1, a[i+1]-1) );}}ans = max(ans, min(n, a[0]-1));printf("%d\n", ans);}return 0;
}

1118

include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e4+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int fa[N];
int cnt[N];
int find(int x) { return x == fa[x]? x : fa[x] = find(fa[x]); }int main() {int n;while(~scanf("%d", &n)) {memset(cnt, 0, sizeof(cnt));for(int i = 1; i <= 1e4; ++i) fa[i] = i;int m = -1;for(int i = 1; i <= n; ++i) {int a; scanf("%d", &a);int pre;if(a) {scanf("%d", &pre);m = max(m, pre);}for(int j = 1; j < a; ++j) {int b; scanf("%d", &b);m = max(m, b);int t1 = find(pre); int t2 = find(b);if(t1 != t2) fa[t2] = t1;}}for(int i = 1; i <= m; ++i) {cnt[find(i)] ++;}int all = 0; int maxx = -1;for(int i = 1; i <= m; ++i) {if(cnt[i]) {all ++;maxx = max(maxx, cnt[i]);}}printf("%d %d\n", all, m);int k; scanf("%d", &k);for(int i = 0; i < k; ++i) {int a; int b; scanf("%d %d", &a, &b);int t1 = find(a); int t2 = find(b);if(t1 == t2) printf("Yes\n");else printf("No\n");}}return 0;
}

1119 主要对于先后序的概念需要掌握

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)int pre[N];
int post[N];
int L[N], R[N];
int root;int fl = 1;void solve(int _l, int _r, int l, int r, int rt) {
//  printf("%d %d %d %d %d\n", _l,_r,l,r,rt);if(l > r) return;int ro = pre[_l];int pos = 0;for(int i = l; i <= r; ++i) {if(post[i] == ro) {pos = i; break;}}if(pos == l && pos != r) {L[rt] = post[pos];R[rt] = pre[_l+1];solve(_l+2, _r, l+1, r-1, pre[_l+1]);}else if(pos == r){fl = 0;L[rt] = post[pos];solve(_l+1, _r, l, r-1, post[pos]);}else {//  printf("hh %d\n", rt);L[rt] = post[pos];int _pos = (pos-l) + _l;//  printf("%d\n", _pos, pre[_pos]);R[rt] = pre[_pos+1];solve(_l+1, _pos, l, pos-1, post[pos]);solve(_pos+2, _r, pos+1, r-1, pre[_pos+1]);}}int nn = 0;
void dfs(int x) {if(L[x]) dfs(L[x]);if(!nn) nn = 1; else printf(" ");printf("%d", x);if(R[x]) dfs(R[x]);
}
int main() {int n;while(~scanf("%d", &n)) {memset(L, 0, sizeof(L));memset(R, 0, sizeof(R));nn = 0;for(int i = 1; i <= n; ++i) {scanf("%d", &pre[i]);}for(int i = 1; i <= n; ++i) {scanf("%d", &post[i]);}root = pre[1];solve(2, n, 1, n-1, root);if(fl) printf("Yes\n");else printf("No\n");dfs(root);printf("\n");}return 0;
}

1120

#include<cmath>
#include<map>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<set>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N = 1e4+5;
const int INF = 0x3f3f3f3f;
#define MP(x, y) make_pair(x, y)map<int, int> mp;
map<int, int>::iterator it;void solve(int x) {int tt = 0;while(x) {tt += x%10;x /= 10;}mp[tt] ++;
}
int main() {int n;while(~scanf("%d", &n)) {mp.clear();for(int i = 0; i < n; ++i) {int a; scanf("%d", &a);solve(a);}int cnt = 0;for(it = mp.begin(); it != mp.end(); ++it) {if(it->second > 0) {cnt ++;}}printf("%d\n", cnt);int fl = 0;for(it = mp.begin(); it != mp.end(); ++it) {if(it->second > 0) {if(!fl) fl = 1; else printf(" ");printf("%d", it->first);}} printf("\n");}return 0;
}

转载于:https://www.cnblogs.com/Basasuya/p/8433701.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/488125.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

华为云占用443端口_关于XAMPP默认端口80和443被占用的问题

关于安装xampp-win32-1.8.1-VC9-installer.zip后启动时候报端口80和443被占用的问题解决xampp-win32-1.8.1-VC9-installer.zip下载地址http://pan.baidu.com/s/1pKLTKk71、打开cmd输入&#xff1a;netstat -ano找到红色1圈中位80和443对应的程序的PID2、cmd继续输入&#xff1a…

体育测试数据绘图软件,原创健身运动体育测试数据统计app界面

原创设计原创健身运动体育测试数据统计app...素材是用户QQ173F1B6A上传到我图网&#xff0c;素材大小为0.65 MB&#xff0c;素材的尺寸为1024px1780px&#xff0c;图片的编号是27962446&#xff0c;颜色模式为RGB&#xff0c;授权方式为VIP用户下载&#xff0c;成为我图网VIP用…

解析|一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别

来源&#xff1a;新机器视觉移动机器人(AGV)是工业机器人的一种。它由计算机控制&#xff0c;具有移动、自动导航、多传感器控制、网络交互等功能&#xff0c;在实际生产中最主要的用途是搬运&#xff0c;可以说只要有搬运需求的地方&#xff0c;就有移动机器人的应用可能。近年…

远程服务器端口是否开放(审计)

定期对服务器进行扫描&#xff0c;将危险端口有开放的服务器记录日志或通过邮件、微信告警出来先定义服务器列表 iplist&#xff1a;10.10.0.5010.10.0.5110.10.0.52....检查端口过程如下&#xff1a; #!/bin/bashfor i in awk {print $1} iplist; do if [[ $(nmap $i -p 22 |g…

vue伸缩效果_Vue.js - 元素展开、收起动画效果组件(附:二级菜单的展开、收缩动画效果)...

子菜单的展开、收缩功能在许多系统上都很常见&#xff0c;如果想要在打开收起时带有动画效果&#xff0c;过去常常会通过 jQuery 实现。而在 Vue 项目中&#xff0c;我们可以单独封装一个动画组件&#xff0c;方便使用。1&#xff0c;效果图点击一级菜单时&#xff0c;子菜单会…

如何评判软件测试的效率,如何衡量测试效率,提高测试效率?

“根据系统测试发现缺陷数来衡量测试人员的系统测试效率&#xff0c;测试执行效率”&#xff0c;这种方法是很片面的。它的优点是便于统计和分析&#xff0c;缺点是只通过一个方面考核了测试效率等&#xff0c;漏掉了很多其他因素。那么该如何衡量测试人员的测试效率呢&#xf…

Java -- 异常的捕获及处理 -- 范例 -- throw与throws的应用

7.2.3 范例 -- throw与throws的应用 例&#xff1a;综合应用 Class &#xff1a; Math package limeThrowable._7_2_3;public class Math {public int div(int i, int j) throws Exception { //方法可以不处理异常System.out.println("******计算开始******")…

深度揭秘硅片产业,巨大潜力成就半导体材料之王

来源&#xff1a;智东西硅片是半导体材料的基石&#xff0c;它是先通过拉单晶制作成硅棒&#xff0c;然后切割制作成的。由于硅原子的价电子数为4&#xff0c;序数适中&#xff0c;所以硅元素具有特殊的物理化学性质&#xff0c;可用在化工、光伏、芯片等领域。特别是在芯片领域…

fiddler如何filter_Fiddler工具的过滤功能介绍

Fiddler工具过滤功能介绍如图是过滤功能界面1.Actions&#xff1a;意思是动作的意思&#xff0c;也就是要做什么操作&#xff0c;里边包含有几个选项&#xff1a;Run Filterset now :马上执行过滤Load Filterset&#xff1a; 加载本地过滤设置文件Save Filterset &#xff1a;保…

vr软件测试,如何进行VR可用性测试?

本文主要介绍如何进行VR可用性测试以及其与其他平台的测试有什么不同&#xff0c;帮助VR产品相关设计者快速进行可用性测试&#xff0c;提升产品质量及体验。一、可用性测试是什么简单说&#xff0c;可用性测试就是在不知道或者想确认产品问题点的情况下&#xff0c;通过用户测…

node.js JS对象和JSON字符串之间的转换

JSON.stringify(obj)将JS对象转为字符串。 var json { aa: [sdddssd], bb: [ 892394829342394792399, 23894723984729374932874 ], cc: [11111111111111] }> var string JSON.stringify(json) string: {"aa":["sdddssd"],"bb":["892…

短信升级为5G消息?三大运营商联合发布的《5G消息白皮书》说了啥?

来源&#xff1a;帮尼资讯5G时代来临&#xff0c;基础消息服务迎来全新变革。4月8日上午10时许&#xff0c;中国电信、中国移动、中国联通联合举行线上发布会&#xff0c;发布《5G消息白皮书》。《5G消息白皮书》的发布&#xff0c;意味着三大运营商齐推出与以往短信完全不同的…

计算机会考咋查成绩,2019会考成绩查询网址入口 高中会考怎么查成绩

会考是高中生们在参加高考之前的一道基础的考试环节&#xff0c;只有通过了会考的考生才有资格参加高考。下文有途网小编给大家整理了会考成绩的查询入口及查询方式&#xff0c;供参考&#xff01;会考成绩查询网址及查询方式普通高中的会考成绩也就是学业水平考试的成绩&#…

疫情影响全景图:疫情对各行业短中期影响!

来源&#xff1a; 中智科博海外大厂纷纷宣布停产&#xff0c;美国单周失业人数创新高。疫情使得海外大厂纷纷宣布停产&#xff0c;已宣布停产计划的知名企业涉及汽车、半导体、消费电子、飞机制造、奢侈品等行业&#xff0c;关联地区包括北美、欧洲、印度、东南亚等。美国三大汽…

Android App内存优化之图片优化

不要将Button的背景设置为selector 在布局文件和代码中&#xff0c;都可以为Button设置background为selector&#xff0c;这样方便实现按钮的正反选效果&#xff0c;但实际跟踪发现&#xff0c;如果是将Button的背景设置为selector&#xff0c;在初始化Button的时候会将正反选图…

sql加上唯一索引后批量插入_MySQL当批量插入遇上唯一索引

一、背景以前使用SQL Server进行表分区的时候就碰到很多关于唯一索引的问题&#xff1a;Step8&#xff1a;SQL Server 当表分区遇上唯一约束&#xff0c;没想到在MySQL的分区中一样会遇到这样的问题&#xff1a;MySQL表分区实战。今天我们来了解MySQL唯一索引的一些知识&#x…

我们为什么要探索人脑的奥秘?

来源&#xff1a;脑科学与智能技术卓越创新中心 4月5日21:30&#xff0c;4月11日9:00&#xff0c;CCTV-2央视财经频道《中国经济大讲堂》特邀中国科学院脑科学与智能技术卓越创新中心学术主任蒲慕明院士深度解读《我们为什么要探索人脑的奥秘&#xff1f;》未来智能实验室的主要…

pc计算机中ram的编址单位,字母编址

对于CPU而言&#xff0c;如果它要发数据到某个设备&#xff0c;其实是发到对应的接口&#xff0c;接口电路里有多个寄存器(也称为端口)&#xff0c;访问设备实际上是访问相关的端口&#xff0c;所有的信息会由接口转给它的设备。那么CPU会准备数据发送到数据总线&#xff0c;但…

DuiVision开发教程(19)-菜单

DuiVision菜单类是CDuiMenu。有两种显示的位置&#xff0c;一种是在窗体顶部某个button点击后能够下拉一个菜单&#xff0c;还有一种是托盘图标的右键菜单。 窗体中的菜单定义方式是xml文件里设置某个button的action属性&#xff0c;以menu:开头。后面是菜单的XML文件名称或XM…

python多线程操作列表_详解Python多线程下的list

list 是 Python 常用的几个基本数据类型之一.正常情况下我们会对 list 有增删改查的操作,显然易见不会有任何问题.那么如果我们试着在多线程下操作list 会有问题吗?多线程下的 list安全 or 不安全&#xff1f; 不安全&#xff01;通常我们说的线程安全是指针对某个数据结构的所…