篮球杯小白+强者

2. 宣读数字【算法赛】

        

        思维题,注意到完全平方数的约数是奇数个,其余都是偶数个。

	#include <bits/stdc++.h>using namespace std;#define LL long long#define pb push_back#define x first#define y second #define int long long #define endl '\n'const LL maxn = 4e05+7;const LL N = 5e05+10;const LL mod = 988244353;const int inf = 0x3f3f3f3f;const LL llinf = 5e18;typedef pair<int,int>pl;priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆priority_queue<LL> ma;//大根堆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;vector<int>a(N , 0);void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}}LL qpow(LL a , LL b)//快速幂{LL sum=1;while(b){if(b&1){sum=sum*a%mod;}a=a*a%mod;b>>=1;}return sum;}std::vector<int> minp, primes;void sieve(int n) {minp.assign(n + 1, 0);primes.clear();for (int i = 2; i <= n; i++) {if (minp[i] == 0) {minp[i] = i;primes.push_back(i);}for (auto p : primes) {if (i * p > n) {break;}minp[i * p] = p;if (p == minp[i]) {break;}}}}void solve() {cin >> n;if((int)sqrt(n) * (int)sqrt(n) == n){cout <<"L\n";}else{cout <<"Q\n";}}            signed main() {ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;sieve(N); cin>>t;while(t--){solve();}return 0;}

3. 最大质因子个数【算法赛】

        贪心:用尽可能多的质数来构造这个数。

        

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define int long long 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 5e05+10;
const LL mod = 988244353;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>a(N , 0);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
LL qpow(LL a , LL b)//快速幂
{LL sum=1;while(b){if(b&1){sum=sum*a%mod;}a=a*a%mod;b>>=1;}return sum;
}
std::vector<int> minp, primes;
void sieve(int n) {minp.assign(n + 1, 0);primes.clear();for (int i = 2; i <= n; i++) {if (minp[i] == 0) {minp[i] = i;primes.push_back(i);}for (auto p : primes) {if (i * p > n) {break;}minp[i * p] = p;if (p == minp[i]) {break;}}}
}void solve() 
{int n;cin >> n;int cnt = 0;int tmp = 1;for(auto it : primes){if(n / it >= tmp){cnt++;tmp *= it;		}else{break;}}cout << cnt << endl;
}            
signed main() 
{ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout.precision(10);int t=1;sieve(N); cin>>t;while(t--){solve();}return 0;
}

4. 物流选址【算法赛】

        

注意到无论怎么改变,这两个数的差值不会变,因此考虑到差值的每个约数能否满足题意,记录最小值即可。

        

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define int long long 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 5e05+10;
const LL mod = 988244353;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>a(N , 0);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
LL qpow(LL a , LL b)//快速幂
{LL sum=1;while(b){if(b&1){sum=sum*a%mod;}a=a*a%mod;b>>=1;}return sum;
}
void solve() 
{int n , m;cin >> n >> m;int k = m - n;if(k == 0 || m % n == 0){cout << 0 << endl;}else if(k == 1 || n >= k){cout << -1 << endl;}else{int ans = llinf;for(int i = 2 ; i * i <= k ; i ++){//可能的倍数if(k % i == 0){if(n % i == m % i){int tmpn = n + i - (n % i);int tmpm = m + i - (m % i);if(tmpm % tmpn == 0){ans = min(ans , i - n % i);}}if(n % (k / i) == m % (k / i)){int tmpn = n + (k / i) - (n % (k / i));int tmpm = m + (k / i) - (m % (k / i));if(tmpm % tmpn == 0){ans = min(ans , k / i - m % (k / i));}}}}int i = k;int tmpn = n + i - (n % i);int tmpm = m + i - (m % i);if(tmpm % tmpn == 0){ans = min(ans , i - n % i);}		if(ans == llinf){cout << -1 << endl;}else{cout << ans << endl;}}
}            
signed 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;
}

5. 小蓝的MEX问题【算法赛】

        

计数问题,对于每次询问,大于k的数全部可以选或者不选,而小于k的数至少选一个,然后可以预处理出所有的MEX取值情况,最后输出即可。

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define int long long 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 5e05+10;
const LL mod = 998244353;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>a(N , 0);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
LL qpow(LL a , LL b)//快速幂
{LL sum=1;while(b){if(b&1){sum=sum*a%mod;}a=a*a%mod;b>>=1;}return sum;
}
void solve() 
{int n , m;cin >> n >> m;vector<int>cnt(n + 5 ,0);for(int i = 0 ; i < n ; i ++){cin >> a[i];cnt[a[i]] ++;}	int MEX = 0;while(cnt[MEX] > 0){MEX++;}int pre = 1;vector<int>ans(n + 5 , 0);int tot = n;for(int i = 0 ; i <= MEX ; i ++){tot -= cnt[i];//这些随便选if(i == 0){ans[i] = qpow(2 , tot);ans[i]--;ans[i] += mod;ans[i] %= mod;}else{ans[i] = pre * qpow(2 , tot);ans[i] %= mod;}pre *= ((qpow(2 , cnt[i]) - 1 + mod) % mod);pre %= mod;}for(int i = 0 ; i < m ; i ++){int x;cin >> x;cout << ans[x] << endl;}
}            
signed 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;
}

6. 平摊购买费用【算法赛】

首先发现排序后没影响,因此先排个序,然后发现若要使得 l - f 最小,必然选取的是前y个数和后m-y个数。pre[c - y] + y * x - (pre[n] - pre[n - y] - y * x)

构建关于y的函数,发现这是一个有波谷的函数,因此考虑三分求波谷即可。

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define int long long 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 5e05+10;
const LL mod = 988244353;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>a(N , 0);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
LL qpow(LL a , LL b)//快速幂
{LL sum=1;while(b){if(b&1){sum=sum*a%mod;}a=a*a%mod;b>>=1;}return sum;
}
void solve() 
{int n , m;cin >> n >> m;int a[n + 5];set<int>st;vector<int>pre(n + 5 , 0);for(int i = 1 ; i <= n ; i ++)cin >> a[i] , st.insert(a[i]);sort(a + 1, a + n + 1);for(int i = 1 ; i <= n ; i ++){pre[i] = pre[i - 1] + a[i];}map<int,int>mp;int idx = 1;for(auto it :st){mp[it] = idx++;}map<int,int>pm;for(int i = 1 ; i <= n ; i ++){int id = mp[a[i]];if(!pm.count(id)){pm[id] = i;}}//先找比x大的位置for(int i = 0 ; i < m ; i ++){int x , c;cin >> x >> c;auto it = st.lower_bound(x);if(it == st.end()){cout << pre[c] << endl;}else{int tmp = *it;//取前几个跟最后几个int ans = pre[c];auto check =[&] (int t){return pre[c - t] + t * x - (pre[n] - pre[n - t] - t * x); };int l = 0 , r = c;while(l < r){int mid = (r - l) / 3;if(r - l < 3){for(int j = l ; j <= r ; j ++){ans = min(ans , check(j));}break;}int m1 = l + mid;int m2 = m1 + mid;if(check(m1) > check(m2)){l = m1;}else{r = m2;}}cout << ans << endl;}}
}            
signed 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;
}

4. 电力之城【算法赛】

观察到一次只会使得电能增加1/2,而最终总的电能是可以确定的,因此变成了一个NIM问题,每次能拿一个或两个石头,求最终谁拿走了最后的石头。

#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 = 5e05+10;
const LL mod = 1e09+7;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>a(N , 0);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
void solve() 
{int n;cin >> n;string s;cin >> s;int cnt = 0;for(int i = 1 ; i < n ;i ++){cnt += (s[i] == s[i - 1]);}	if(cnt % 3 == 0){cout << "qiao\n";}else{cout <<"lan\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;
}

 5. 价值共性度【算法赛】

此题类似于昆明邀请赛的E题,需要知道这么一个事实:一个长度为n的数列,前缀GCD的数量不会超过logn个,因此我们只需要维护以某个数结尾,向前能够组成多少个GCD即可,并且记录这些GCD的最左侧位置,然后暴力求答案即可。

        

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define x first
#define y second 
#define int long long 
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 1e6+10;
const LL mod = 988244353;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>a(N , 0);
void init(int n){for(int i = 0 ; i <= n ; i ++){a[i] = 0;}
}
LL qpow(LL a , LL b)//快速幂
{LL sum=1;while(b){if(b&1){sum=sum*a%mod;}a=a*a%mod;b>>=1;}return sum;
}
std::vector<int> minp, primes;
void sieve(int n) {minp.assign(n + 1, 0);primes.clear();for (int i = 2; i <= n; i++) {if (minp[i] == 0) {minp[i] = i;primes.push_back(i);}for (auto p : primes) {if (i * p > n) {break;}minp[i * p] = p;if (p == minp[i]) {break;}}}
}void solve() 
{set< pair<int,int> >st;//前缀gcdset< pair<int,int> >pre;int n , k;cin >> n >> k;for(int i = 1 ; i <= n ; i ++){cin >> a[i];}vector<int>S(n + 5 , 0);for(int i = 1 ; i <= n ; i ++){S[i] = S[i - 1] + a[i];}int ans = 0;for(int i = 1 ; i <= n ; i ++){st.empty();set< pair<int,int> >tmp;tmp.insert({a[i] , i});for(auto it : pre){tmp.insert({gcd(a[i] , it.first) , it.second});}pre.clear();map<int,int>mp;for(auto it : tmp){if(mp.count(it.first)){continue;}else{mp[it.first] = 1;if(i - it.second + 1 >= k){ans = max(ans , it.first * (S[i] - S[it.second - 1]));}st.insert(it);}}swap(st , pre);}cout << ans << endl;
}            
signed 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;
}

6. 小蓝的逆序对问题【算法赛】

        

(不是正解..但卡过去了)

如此复杂度,想到用根号分治来解决问题,考虑交换两数后的逆序对该如何变化,然后想办法维护每个区间的信息

        

#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;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
const int B = 800;
typedef pair<int,int>pl;
priority_queue<LL , vector<LL>, greater<LL> >mi;//小根堆
priority_queue<LL> ma;//大根堆
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;
vector<int>num(N , 0);
long long sum = 0;
void merge(int s1, int e1, int s2, int e2){vector<int> temp;int p1 = s1;int p2 = s2;while(p1 <= e1&&p2 <= e2){if(num[p1] <= num[p2]){temp.push_back(num[p1++]);}else{sum += (e1-p1+1);temp.push_back(num[p2++]);}}while(p1 <= e1){temp.push_back(num[p1++]);}while(p2 <= e2){temp.push_back(num[p2++]);}for(int i = 0;i < (int)temp.size();i++){num[s1+i] = temp[i];}
}
void mergesort(int str, int end){if(str < end){int mid = (str + end)/2;mergesort(str,mid);mergesort(mid+1,end);merge(str,mid,mid+1,end);}
} 
struct BIT{//Binary indexed Tree(树状数组)int n;vector<int> t;BIT(int n) : n(n) , t(n + 1 , 0){}int lowbit(int x){return x & -x;}void modify(int k, int v) {while (k <= n) {t[k] += v;k += lowbit(k);}}void modify(int l, int r, int v) {modify(l, v), modify(r + 1, -v);  // 将区间加差分为两个前缀加}int query(int k) {int ret = 0;while(k) {ret += t[k];k -= lowbit(k);}return ret;}int query(int l , int r){return query(r) - query(l - 1);}
};
int ans[500][N];
void solve() 
{int n , k;cin >> n >> k;vector<int>idx(n + 5 , 0);memset(ans , -1 , sizeof ans);int tot = 505;vector<BIT>bit;for(int i = 0 ; i < tot ; i ++){BIT tmp(N);bit.pb(tmp);}for(int i = 1 ; i <= n ; i ++){cin >> num[i];idx[i] = (i - 1) / B;}int a[n + 5];for(int i = 1 ; i <= n ; i ++){a[i] = num[i];}unordered_map<int,int>mp;set<int>st;for(int i = 1 ; i <= n ; i ++){st.insert(num[i]);}int id = 1;for(auto it : st){mp[it] = id++;}for(int i = 1 ; i <= n ; i ++){int id = idx[i];int tp = mp[a[i]];bit[id].modify(tp + 1, 1);}mergesort(1,n);
//    cout << bit[0].query(4) << endl;for(int i = 0 ; i < k; i ++){int l , r;cin >> l >> r;long long tmp = sum;int ll = idx[l] , rr = idx[r];//    cout << ll << " " << rr << endl;if(ll == rr){for(int i = l ; i <= r ; i ++){if(a[r] < a[i]){tmp--;}if(a[l] > a[i]){tmp--;}if(a[l] < a[i]){tmp++;}if(a[r] > a[i]){tmp++;}}}else{for(int i = ll ; i <= rr ; i ++){if(i == ll){for(int j = l ; j <= (ll + 1) * B ; j ++){if(a[r] < a[j]){tmp--;}if(a[l] > a[j]){tmp--;}if(a[l] < a[j]){tmp++;}if(a[r] > a[j]){tmp++;}}}else if(i == rr){for(int j = rr * B + 1 ; j <= r ; j ++){if(a[r] < a[j]){tmp--;}if(a[l] > a[j]){tmp--;}if(a[l] < a[j]){tmp++;}if(a[r] > a[j]){tmp++;}}                    }else{int id1 = mp[a[r]];if(ans[i][id1] != -1){tmp += ans[i][id1];}else{ans[i][id1] = bit[i].query(id1);tmp += ans[i][id1];                        }if(ans[i][id1 + 1] != -1){tmp -= B - ans[i][id1 + 1];//比a[r]大的                        }else{ans[i][id1 + 1] = bit[i].query(id1 + 1);tmp -= B - ans[i][id1 + 1];//比a[r]大的                               }int id2 = mp[a[l]];if(ans[i][id2] != -1){tmp -= ans[i][id2];}else{ans[i][id2] = bit[i].query(id2);tmp -= ans[i][id2];                        }if(ans[i][id2 + 1] != -1){tmp += B - ans[i][id2 + 1];//比a[r]大的                        }else{ans[i][id2 + 1] = bit[i].query(id2 + 1);tmp += B - ans[i][id2 + 1];//比a[r]大的                               }}//cout << tmp << endl;}}if(a[l] > a[r]) tmp++;if(a[l] < a[r]) tmp--;cout << tmp << endl;}
}            
signed 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.rhkb.cn/news/351777.html

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

相关文章

最适合程序员的编程字体,漂亮、独特、优雅!(2024-06-17)

Monaco Monaco 字体是一款专为编程和代码编辑设计的等宽字体&#xff0c;以其简洁明了的无衬线设计风格、高可读性和清晰的字符区分度&#xff0c;受到开发者们的青睐&#xff0c;Mac 自带 Monaco 字体。 Consolas Consolas 是一款等宽无衬线字体&#xff0c;专为编程和代码编…

【Linux应用】Linux系统的设备管理——Udev

1.udev概述 udev是 Linux2.6内核里的一个功能&#xff0c;它替代了原来的 devfs&#xff0c;成为当前 Linux 默认的设备管理工具&#xff0c;能够根据系统中的硬件设备的状态动态更新设备文件&#xff0c;包括设备文件的创建&#xff0c;删除等。 udev以守护进程的形式运行&am…

面向对象初级--封装

封装 封装从字面上来理解就是包装的意思 比如鼠标&#xff0c;外部有一个元件&#xff0c;将内部的原件封装起来&#xff0c;至于鼠标内部的细节是什么&#xff0c;我们不需要关心&#xff0c;只需要知道鼠标对外提供了左键、右键、滚动滑轮这三个简单的操作。对于用户来说只…

计算机网络复习

2024年whut 概述 1.计算机网络的目标&#xff1a;信息传输和资源共享 2.网络协议的要素&#xff08;必考&#xff09;&#xff1a; 语法&#xff1a;数据信息和控制信息的结构或格式 语义&#xff1a;要发出何种控制信息&#xff0c;完成何种动作&#xff0c;做出何种响应 同…

安装VM虚拟机并创建一个Linux CentOS 7无桌面系统

一、安装vm虚拟机软件 1 下载vm压缩包 百度网盘链接 链接&#xff1a;https://pan.baidu.com/s/1ipiWatBr0wHKMt5c5nQirw?pwdwoy2 提取码&#xff1a;woy2 2.下载完毕后&#xff0c;先将杀毒软件关闭 全部关闭 3. 解压后按照步骤安装即可 按照按照步骤&#xff0c;观看…

计算机网络 —— 应用层(应用层概述及服务方式)

计算机网络 —— 应用层&#xff08;应用层概述及服务方式&#xff09; 应用层服务方式C/S&#xff08;客户端-服务器&#xff08;C/S&#xff09;模型&#xff09;基本概念特点B/S&#xff08;Browser/Server&#xff09;基本概念特点应用场景 p2p &#xff08;对等网络&#…

Java17 --- SpringSecurity之OAuth2

一、OAuth2 1.1、使用github以授权码方式 1.1.1、注册应用程序 1.1.2、测试代码 pom依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-oauth2-client</artifactId></dependency> spring…

一些个人电脑用的小工具软件

1 个人电脑信息管理 如下&#xff1b; 整理自己的电脑信息&#xff1b;录入&#xff0c;保存&#xff0c;查询&#xff1b;添加和更新界面如下&#xff0c; 每次添加、更新之后重新点一下菜单的浏览&#xff1b; 下载&#xff0c; https://download.csdn.net/download/bcb…

自主可控数据库沙龙(北京站 |线下| 报名中)

**数据库沙龙**是一个致力于推动数据库技术创新和发展的高端交流平台&#xff0c;旨在增强国内数据库产业的自主可控性和高质量发展。这个平台汇集了学术界和产业界的顶尖专家、学者以及技术爱好者&#xff0c;通过专题演讲、案例分享和技术研讨等丰富多样的活动形式&#xff0…

LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS

文章汇总 总体来看像是一种带权重的残差&#xff0c;但解决的如何高效问题的事情。 相比模型的全微调&#xff0c;作者提出固定预训练模型参数不变&#xff0c;在原本权重矩阵旁路添加低秩矩阵的乘积作为可训练参数&#xff0c;用以模拟参数的变化量。 模型架构 h W 0 x △…

vue3 中实现 验证码发送 刷新不变倒计时

今天实现一个倒计时的功能 在平常开发前端的功能的时候 不管是 移动端还是web端 我们都会有注册 登录 中的发送验证码功能 实现绑定以及注册功能。今天我主要分享一下当前的验证码实现原理。 有两种做法(我目前认为以及看到的) ① 做一个简单的倒计时 ② 实时监测倒计时 刷…

Web的UI自动化基础知识

目录 1 Web自动化入门基础1.1 自动化知识以及工具1.2 主流web自动化测试工具1.3 入门案例 2 使用工具的API2.1 元素定位2.1.1 id选择器2.1.2 name2.1.3 class_name选择器2.1.4 tag_name选择器2.1.5 link_text选择器2.1.6 partial_link_text选择器2.1.7 xpath选择器2.1.8 CSS选择…

使用python绘制三维直方图

使用python绘制三维直方图 三维直方图定义特点 效果代码 三维直方图 维直方图&#xff08;3D直方图&#xff09;是一种用于展示三维数据分布情况的图表。它扩展了二维直方图的概念&#xff0c;通过在三维空间中绘制柱体来表示数据在三个维度&#xff08;X、Y、Z&#xff09;上…

Excel中多条件判断公式怎么写?

在Excel里&#xff0c;这种情况下的公式怎么写呢&#xff1f; 本题有两个判断条件&#xff0c;按照题设&#xff0c;用IF函数就可以了&#xff0c;这样查看公式时逻辑比较直观&#xff1a; IF(A2>80%, 4, IF(A2>30%, 8*(A2-30%),0)) 用IF函数写公式&#xff0c;特别是当…

Spring配置那些事

一、引言 配置是一个项目中不那么起眼&#xff0c;但却有非常重要的东西。在工程项目中&#xff0c;我们一般会将可修改、易变、不确定的值作为配置项&#xff0c;在配置文件/配置中心中设置。 比方说&#xff0c;不同环境有不同的数据库地址、不同的线程池大小等&#xff0c…

XSKY 在金融行业:新一代分布式核心信创存储解决方案

近日&#xff0c;国家金融监督管理总局印发了《关于银行业保险业做好金融“五篇大文章”的指导意见》&#xff0c;在数字金融领域提出明确目标&#xff0c;要求银行业保险业数字化转型成效明显&#xff0c;数字化经营管理体系基本建成&#xff0c;数字化服务广泛普及&#xff0…

opencv-python(八)

import cv2 import numpy as npheight 160 width 280 image np.zeros((height, width),np.uint8) cv2.imshow(image,image) cv2.waitKeyEx(0) cv2.destroyAllWindows() 二维数组代表一幅灰度图像。 import cv2 import numpy as npheight 160 width 280 image np.zeros((he…

为何云原生是未来?企业IT架构的颠覆与重构(上)

&#x1f407;明明跟你说过&#xff1a;个人主页 &#x1f3c5;个人专栏&#xff1a;《未来已来&#xff1a;云原生之旅》&#x1f3c5; &#x1f516;行路有良友&#xff0c;便是天堂&#x1f516; 目录 一、引言 1、什么是云原生 2、云原生的背景和起源 背景 起源 关…

ROS机器人小车建模仿真与SLAM

文章目录 一、URDF二、创建小车模型1.创建功能包2.导入依赖3.创建urdf,launch文件&#xff1a;4.可视化 三、添加雷达1.xacro文件2.集成和修改launch3.添加摄像头和雷达 三.GAZEBO仿真四、orbslam2kitti1.下载2.安装编译ORB_SLAM23.运行Kitee数据集 一、URDF ​ URDF&#xff…