Codeforces Round 909 (Div. 3)(A~G)(启发式合并 , DSU ON TREE)

1899A - Game with Integers 

        题意:给定一个数 x , 两个人玩游戏,每人能够执行 +1 / -1操作,若操作完x是3的倍数则获胜,问先手的人能否获胜(若无限循环则先手的人输)。

        思路:假如一个数模3余1或者2,那么第一轮操作先手就能获胜,若余0则后手获胜。

        

// Problem: A. Game with Integers
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/A
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=1e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
int a[N];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{cin >> n;if(n % 3 == 0){cout << "Second\n";}	else{cout << "First\n";}	
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

1899B - 250 Thousand Tons of TNT 

        题意:给定一个整数n , 表示有 n 个集装箱,接下来给定一个数组a , 代表了第i个集装箱有a_{i}吨重。现要将n个集装箱恰好分成连续的k组。要求这当中所有k的取值下集装箱重量的最大值减去最小值的最大值。

        思路:直接暴力做 , 假设每一组有1、2、3、4、...n个,看满足题意的情况下最大值减最小值的值。时间复杂度O(NlogN).

        

// Problem: B. 250 Thousand Tons of TNT
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/B
// Memory Limit: 256 MB
// Time Limit: 2000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=2e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
LL a[N] , sum[N];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{cin >> n;for(int i = 1 ; i <= n ; i ++){cin >> a[i];sum[i] = sum[i - 1] + a[i];	}LL ans = 0;for(int i = 1 ; i <= n ; i ++){LL maxx = 0 , minn = 1e18;if(n % i == 0){for(int j = 0 ; j < n ; j += i){maxx = max(sum[j + i] - sum[j] , maxx);minn = min(minn , sum[j + i] - sum[j]);}ans = max(ans , maxx - minn);}}cout << ans<<endl;
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

1899C - Yarik and Array 

        题意:给定一组序列,求连续奇数偶数非空子序列的和的最大值(相邻的奇偶性不能相同)。

        思路:同最大连续子序列差不多的做法,只不过要求前一项和当前的奇偶性不同,且至少要选一项。时间O(N)。

        

// Problem: C. Yarik and Array
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/C
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=2e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
LL a[N];
int dp[N][2];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{int n;cin >> n;for(int i = 1 ; i <= n ; i ++)cin >> a[i];LL ans = -1e18;LL now = 0;for(int i = 1 ; i <= n ; i ++){if(now == 0){now += a[i];}else{if(abs(a[i]) % 2 == abs(a[i - 1]) % 2 ){now = a[i];}else{if(now > 0)now += a[i];elsenow = a[i];}}ans = max(ans , now);//	cout << now << endl;if(now < 0)now = 0;}cout << ans << endl;
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

1899D - Yarik and Musical Notes 

        题意:给定一组数,要求数对(i , j)满足(2^{a_i})^{2^{a_{j}}} = (2^{a_j})^{2^{a_{i}}}(i < j)的数量。

        思路:构造辅助哈希nex(范围过大无法构造数组) , nex[i]标记了当前位置之后有多少个数字i。观察后发现 , 当 i = 1 ,j = 2/i = 2 , j = 1时能够满足,其余均需要i =j才能满足。因此对于1或者2而言,数对的数量为nex[1] +nex[2] ,其余的 i 构成的数对数量都是nex[i]。首先遍历一遍算出nex,然后再遍历一遍求答案,同时不断更新nex即可(unordered_map会被卡(哈希冲突),直接用map即可。

        

// Problem: D. Yarik and Musical Notes
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/D
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=3e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
int a[N];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{cin >> n;map<LL,LL>mp;LL ans = 0;for(int i = 1 ; i <= n ; i ++){cin >> a[i];mp[a[i]]++;}for(int i = 1 ; i <= n ; i ++){mp[a[i]]--;if(a[i] == 1 || a[i] == 2){ans += mp[1] + mp[2];}else{ans += mp[a[i]];}}cout << ans << endl;
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

1899E - Queue Sort 

        题意:给定一个数组,每次能够进行如下操作:

1、选择第一个数放入数组最后一个。

2、将最后一个数往前交换,直到到达第一位或者比前一个数大为止。

        问将数组变为递增的最少操作数,若无法则输出-1.

        思路:若最小的数为数组第一个,那么一轮操作之后他还是在第一位,这样便会无限循环。因此只需要满足最小的数之后的数全是递增的即可。

        

// Problem: E. Queue Sort
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/E
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=3e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
LL a[N];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{cin >> n;LL minn = 1e18;for(int i = 1 ;i <= n ; i ++){cin >> a[i];minn = min(a[i] , minn);}
/*	for(int i = 1 ; i < n - 1; i++){if(a[i] < a[i + 1]){break;}if(i == n - 2){cout << 0 << endl;return;}}*/for(int i = 1 ; i <= n ; i ++){if(a[i] == minn){for(int j = i + 1; j <= n ; j ++){if(a[j] < a[j - 1]){cout << -1 << endl;return;}}cout << i - 1 << endl;return;}}
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

1899F - Alex's whims 

        题意:现有n个顶点,起初你可以任意构造将其形成一棵树。接下来有 d 个数,表示共有d轮。每一轮你可以选择一个已有的边将其删除,然后再连一条边形成一颗新的数。要求每一轮能够满足至少有两个叶子结点的距离恰好为d_{i}

        思路:首先可以将n个顶点连城一条链。然后每一轮当中,我们固定第一个点和最后一个点的距离为我们要的d_{i}。每次我们可以将与点1相连的边删去,然后新增一条边,使得刚好1到n的距离为d_{i}。由于结点2 ~ n都是一条链,所以2 ~ n - 1 任意一个距离都是可以构造出来的。如此便一定能够满足题意。所以我们只需要记录当前1结点和哪个结点相连,然后需要连到哪个结点即可。

        

// Problem: F. Alex's whims
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/F
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=1e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
int a[N];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{cin >> n >> m;for(int i = 2 ; i <= n ; i ++){cout << i - 1 << " " << i << endl;}int pre = 2;for(int i = 0 ; i < m ; i ++){int x;cin >> x;int len = (n - pre) + 1;if(len == x){cout <<"-1 -1 -1\n";continue;}else{int to = (n - x + 1);cout << 1 << " " << pre << " " << to << endl;pre = to; }}
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

1899G - Unusual 进入tainment 

        思路:给定一棵树和一个排列p。现有q组询问,每组询问包含了三个数l , r , x。问点x的子树的结点是否在[p_{l} , p_{r}]中出现。

        思路:子树问题,首先想到了用dfs序来解决。对于一颗子树而言,我们可以用set来维护其所有结点在排列p中的位置。然后对于一个询问而言,只需要找到set中大于等于 l 的第一个位置即可,然后判断该位置是否小于等于r。若小于等于r则代表了其子树的结点包含在了[p_{l} , p_{r}]中。共有n个结点,所以我们需要创立n个set,来记录他们的结点在p中的位置。在子树向上合并的过程中,我们可以用启发式合并来实现优化:每一轮虽然是将子树的set合并到父节点的set上,但是可以用swap来交换两个set,确保每次都将小集合合并到大集合上面(swap是O(1)的)。如此总的时间复杂度是O(nlogn + qlogn)的。

        

// Problem: G. Unusual Entertainment
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/G
// Memory Limit: 256 MB
// Time Limit: 3000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=2e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}
LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
int a[N] , pos[N];
vector<int>tr[N + 5];
vector<array< int , 3 > >que[N];
vector<set<int>> num(N);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0 , tr[i].clear() , que[i].clear();num[i].clear();}
}
LL ans[N];
void merge(set<int> &a , set<int>&b){if(a.size() < b.size()){swap(a , b);}for(auto it : b){a.insert(it);}b.clear();
}
void dfs(int cur , int f){num[cur].insert(pos[cur]);for(auto it : tr[cur]){if(it == f)continue;dfs(it , cur);merge(num[cur] , num[it]);}for(auto it : que[cur]){auto p = num[cur].lower_bound(it[0]);ans[it[2]] = p != num[cur].end() && *p <= it[1];}
};
void solve() 
{cin >> n >> m;for(int i = 1 ; i < n ; i++){int x , y;cin >> x >> y;tr[x].pb(y);tr[y].pb(x);}for(int i = 1 ; i <= n ; i ++){cin >> a[i];pos[a[i]] = i;}for(int i = 0 ; i < m ; i ++){int l , r , x;cin >> l >> r >> x;que[x].pb({l , r , i});}dfs(1 , 0);for(int i = 0 ; i < m ; i ++){if(ans[i]){cout <<"YES\n";}else{cout <<"NO\n";}}init(n);cout << endl;num.clear();
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

更新下新做法:用一个辅助数组vis,其中vis[i] = 1则表示p[i]这个结点存在在子树当中,那么对于一个询问而言,只需要看([vis[l] , vis[r])当中是否有结点存在,即sum(vis[l] , vis[r]) > 0即可。 那么在子树合并的过程之中,可以将轻儿子合并到重儿子上面,然后再将轻儿子的信息删除(DSU on tree)。整个过程的时间复杂度是O(NlogN)的。而要维护区间和,可以用树状数组来实现,每次的复杂度是O(logN)的。而对于每个询问而言,区间和的复杂度也是O(logN)的,因此总体复杂度为O(NlogNlogN + qlogN)。

        

// Problem: G. Unusual Entertainment
// Contest: Codeforces - Codeforces Round 909 (Div. 3)
// URL: https://codeforces.com/contest/1899/problem/G
// Memory Limit: 256 MB
// Time Limit: 3000 ms
// 
// Powered by CP Editor (https://cpeditor.org)#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N=1e05+10;
const LL mod=1e09+7;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >t;
priority_queue<LL> q;
LL gcd(LL a, LL b){return b > 0 ? gcd(b , a % b) : a;
}
LL lcm(LL a , LL b){return a / gcd(a , b) * b;
}
int n , m;
int a[N] , pos[N];
vector<int>tr[N + 5];
vector<array< int , 3 > >que[N];
struct BIT{//Binary indexed Tree(树状数组)int n;vector<int> tr;BIT(int n) : n(n) , tr(n + 1 , 0){}int lowbit(int x){return x & -x;}void modify(int x , int modify_number){for(int i = x ; i <= n ; i += lowbit(i)){tr[i] += modify_number;}}void modify(int l , int r , int modify_number){modify(l , modify_number);modify(r + 1 , -modify_number);}int query(int x){int res = 0;for(int i = x ; i ;  i -= lowbit(i))res += tr[i];return res;}int query(int x , int y){if(x > y)swap(x , y);return query(y) - query(x);}
};
BIT bit(N);
int res[N];
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0 , tr[i].clear() , que[i].clear() , bit.tr[i] = 0 , res[i] = 0;}
}
LL l[N] , r[N] , id[N] , sz[N] , hs[N] , tot = 0 , ans[N];
set<int>num;
void dfs(int cur , int f){l[cur] = ++ tot;id[tot] = cur;sz[cur] = 1;hs[cur] = -1;for(auto it : tr[cur]){if(it != f){dfs(it , cur);sz[cur] += sz[it];if(hs[cur] == -1 || sz[it] > sz[hs[cur]]){hs[cur] = it;}}		} r[cur] = tot;
}
void dfs2(int cur , int f , int keep){vector<int>res(que[cur].size());int i = 0;
/*	for(auto it : que[cur]){res[i++] = bit.query(it[1] , it[0] - 1);}*/for(auto it : tr[cur]){if(it != f && it != hs[cur]){dfs2(it , cur , 0);}}if(hs[cur] != -1){dfs2(hs[cur] , cur , 1);}auto add = [&](int x){bit.modify(pos[x] , 1);};auto del = [&](int x){bit.modify(pos[x] , -1);};for(auto it : tr[cur]){if(it != f && it != hs[cur]){for(int x = l[it] ; x <= r[it] ; x ++){add(id[x]);}}}add(cur);i = 0;for(auto it : que[cur]){ans[it[2]] = bit.query(it[1] , it[0] - 1) > 0 ? 1 : 0;}if(!keep){for(int x = l[cur] ; x <= r[cur] ; x ++){del(id[x]);}}
}
void solve() 
{cin >> n >> m;for(int i = 1 ; i < n ; i++){int x , y;cin >> x >> y;tr[x].pb(y);tr[y].pb(x);}for(int i = 1 ; i <= n ; i ++){cin >> a[i];pos[a[i]] = i;}for(int i = 0 ; i < m ; i ++){int l , r , x;cin >> l >> r >> x;que[x].pb({l , r , i});}dfs(1 , 0);dfs2(1 , 0 , 0);for(int i = 0 ; i < m ; i ++){if(ans[i]){cout <<"YES\n";}else{cout <<"NO\n";}}init(n);cout << endl;
}            
int main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;cin>>t;while(t--){solve();}return 0;
}

        

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

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

相关文章

Python语言:随机生成几个数案例分析讲解

背景 在某一节课上&#xff0c;老师使用xx通软件随机生成几个学号&#xff0c;并让对应学号同学回答问题。虽然我对xx通软件没啥好感&#xff0c;不过感觉这个随机生成学号功能挺不错的。今天我用python实现一个这个功能。 其实原理挺简单的&#xff0c;就是就是在一堆数字里随…

Google大法好

Google Search Central 前言&#xff1a; google的搜索方式&#xff1a; Google 是一款全自动搜索引擎&#xff0c;会使用名为“网页抓取工具”的软件定期探索网络&#xff0c;以找出可添加到 Google 索引中的网站。实际上&#xff0c;Google 搜索结果中收录的大多数网站都不…

ACM练习——第五天

还有两天就要比赛了&#xff0c;进入正题吧 题目一&#xff1a;小红的签到题 小红的签到题 (nowcoder.com) 这道题也就是热身水平&#xff0c;机会很清楚的发现只需要c/a就可以得出答案了 参考代码&#xff1a; #include <iostream>using namespace std;int main(){int a…

数学才是顶级码农的核心修养,码农怎样搞好数学?来看看这些网友强推的数学神作!文末评论区进行评论参与送书哟

文章目录 导读 一&#xff1a;基础篇 1&#xff1a;优美的数学思维&#xff1a;问题求解与证明 2&#xff1a;数学分析 3&#xff1a;线性代数 4&#xff1a;线性代数及其应用 5&#xff1a;代数 二&#xff1a;进阶篇 1&#xff1a;初等数论及其应用 2&#xff1a;数…

Linux 进程管理 实时调度类及SMP和NUMA

文章目录 一、 实时调度类分析1.1 实时调度实体sched_rt_entity数据结构1.2 实时调度类rt_sched_class数据结构1.3 实时调度类功能函数 二、SMP和NUMA2.1 SMP&#xff08;多对称处理器结构&#xff0c;UMA&#xff09;2.2 NUMA&#xff08;非一致内存访问结构&#xff09;2.3 C…

EtherCAT从站EEPROM分类附加信息详解:TXPDO(输出过程数据对象)

0 工具准备 1.EtherCAT从站EEPROM数据(本文使用DE3E-556步进电机驱动器)1 分类附加信息——TXPDO(输出过程数据对象) 1.1 分类附加信息规范 在EEPROM字64开始的区域存储的是分类附加信息,这里存储了包括设备信息、SM配置、FMMU配置在内的诸多信息。每个信息在一段连续的…

山西电力市场日前价格预测【2023-11-18】

1.日前价格预测 预测说明&#xff1a; 如上图所示&#xff0c;预测明日&#xff08;2023-11-18&#xff09;山西电力市场全天平均日前电价为202.44元/MWh。其中&#xff0c;最高日前电价为346.71元/MWh&#xff0c;预计出现在18:00。最低日前电价为0.00元/MWh&#xff0c;预计…

【Gradle构件工具深度学习】

Gradle构件工具深度学习 1. 课程大纲1.1 Gradle入门1.2 与Idea整合1.3 Gradle进阶 2. 常见项目构建工具3. 安装gradle 1. 课程大纲 1.1 Gradle入门 基本介绍、常用指令、项目目录、项目应用 1.2 与Idea整合 Groovy语法、整合IDEA、搭建web工程、项目部署 1.3 Gradle进阶 生命周…

使用maven命令打包依赖

1、maven仓库地址 阿里云地址&#xff1a;https://developer.aliyun.com/mvn/search 中央仓库地址&#xff1a;https://mvnrepository.com/ 2、下载方式 在地址栏中输入要搜索的依赖 选择需要的版本 &#xff08;1&#xff09;直接复制 &#xff08;2&#xff09;pom下载 …

什么是NoSQL?什么是redis?redis是做什么的?

redis官网 NoSQL泛指非关系型数据库&#xff0c;redis是其中的一种&#xff0c;Redis是发展最快的。 什么是NoSQL&#xff1f; NoSQL是一个广义的术语&#xff0c;指的是非关系型数据库&#xff0c;不同于传统的关系型数据库&#xff08;如MySQL、Oracle等&#xff09;。它没有…

山西电力市场日前价格预测【2023-11-19】

1.日前价格预测 预测说明&#xff1a; 如上图所示&#xff0c;预测明日&#xff08;2023-11-19&#xff09;山西电力市场全天平均日前电价为591.63元/MWh。其中&#xff0c;最高日前电价为1500.00元/MWh&#xff0c;预计出现在16:45~20:45。最低日前电价为268.57元/MWh&#x…

Mac安装Homebrew

方式一&#xff1a;官网&#xff08;很慢&#xff0c;不推荐&#xff09; curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh方式二&#xff1a; 1、执行以下命令 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/ma…