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];
				else
					now = 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.mfbz.cn/a/162603.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

计算机msvcr120.dll丢失的解决方法,分享多种亲测可靠的方法

在使用计算机的过程中&#xff0c;我们有时可能会遇到一些技术问题&#xff0c;其中之一就是提示丢失msvcr120.dll文件。当计算机提示丢失msvcr120.dll文件时&#xff0c;可能是由于某些程序无法找到这个文件&#xff0c;从而导致程序无法正常运行。那么我们需要如何解决修复好…

微服务下整合knife4j接口文档

前言:本文旨在解决微服务下通过网关访问所用服务的knife4j文档&#xff0c;无需再通过其他服务单独访问 功能模块配置&#xff1a; 1.配置类&#xff1a; 在这个文件中注意下basePackage的扫描路径&#xff0c;修改为对应controller下的路径。 Configuration EnableSwagger…

教你轻松解决win系统ucrtbased.dll丢失的问题,亲测有效!

ucrtbased.dll是一个动态链接库文件&#xff08;DLL&#xff09;&#xff0c;它是Windows操作系统中的一部分&#xff0c;主要负责提供操作系统和应用程序所需的函数和接口。这个文件包含了操作系统和应用程序共同使用的通用代码&#xff0c;以确保不同程序之间的兼容性和稳定性…

人工智能发展前景

随着人工智能的快速发展&#xff0c;这个行业对人才的需求也在不断增长。越来越多的有志之士开始关注人工智能&#xff0c;希望通过自学获得相关技能&#xff0c;进而在人工智能领域找到心仪的职业。本文将探讨人工智能职业发展的前景&#xff0c;并为大家提供自学人工智能的途…

cesium雷达扫描(雷达扫描线)

cesium雷达扫描(雷达扫描线) 下面富有源码 实现思路 使用ellipse方法加载圆型,修改ellipse中‘material’方法重写glsl来实现当前效果 示例代码 index.html <!DOCTYPE html> <html lang="en"><head>

Golang环境搭建Win10(简洁版)

Golang环境搭建Win10 Golang环境搭建(Win10)一、前言二、Golang下载三、配置环境变量3.1、配置GOROOT3.2、配置GOPATH3.3、配置GOPROXY代理 Golang环境搭建(Win10) 一、前言 Go&#xff08;又称 Golang&#xff09;是 Google 的 Robert Griesemer&#xff0c;Rob Pike 及 Ken…

亚马逊云Amazon OpenSearch Serverless“利刃在手,‘向量’八方“

全Serverless架构新价值 随着Amazon OpenSearch Serverless正式上线“商用”&#xff0c;亚马逊云科技的全栈“Serverless”应用架构也“初见雏形”&#xff0c;这也意味着&#xff0c;未来企业可以在亚马逊云科技之上简单和轻松的搭建完整的无服务器应用架构。 数据也显示&am…

十二、Docker的简介

目录 一、介绍 Docker 主要由以下三个部分组成&#xff1a; Docker 有许多优点&#xff0c;包括&#xff1a; 二、Docker和虚拟机的差异 三、镜像和容器 四、Docker Hub 五、Docker架构 六、总结 一、介绍 Docker 是一种开源的应用容器平台&#xff0c;可以在容器内部…

一键云端,AList 整合多网盘,轻松管理文件多元共享

hello&#xff0c;我是小索奇&#xff0c;本篇教大家如何使用AList实现网盘挂载 可能还是有小伙伴不懂&#xff0c;所以简单介绍一下哈 AList 是一款强大的文件管理工具&#xff0c;为用户提供了将多种云存储服务和文件共享协议集成在一个平台上的便利性。它的独特之处在于&am…

2023-2024华为ICT大赛-计算赛道-广东省省赛初赛-高职组-部分赛题分析【2023.11.18】

2023-2024华为ICT大赛 计算赛道 广东省 省赛 初赛 高职组 部分赛题 分析【2023.11.18】 文章目录 单选题tpcds模式中存在表customer&#xff0c;不能成功删除tpcds模式是&#xff08; &#xff09;以下哪个函数将圆转换成矩形&#xff08; &#xff09;下列哪个选项表示依赖该D…

jvm 内存模型概述

一、类加载子系统 1、类加载的过程&#xff1a;装载、链接、初始化&#xff0c;其中&#xff0c;链接又分为验证、准备和解析 装载&#xff1a;加载class文件 验证&#xff1a;确保字节流中包含信息符合当前虚拟机要求 准备&#xff1a;分配内存&#xff0c;设置初始值 解析&a…

计算机算法分析与设计(23)---二分搜索算法(C++)

文章目录 1. 算法介绍2. 代码编写 1. 算法介绍 1. 二分搜索&#xff08;英语&#xff1a;binary search&#xff09;&#xff0c;也称折半搜索&#xff08;英语&#xff1a;half-interval search&#xff09;、对数搜索&#xff08;英语&#xff1a;logarithmic search&#xf…

十. Linux关机重启命令与Vim编辑的使用

关机重启命令 shutdown命令 其他关机命令 其他重启命令 系统运行级别 系统默认运行级别与查询 退出登录命令logout 文本编辑器Vim Vim简介 没有菜单,只有命令Vim工作模式 Vim常用命令 插入命令 定位命令 删除命令 复制和剪切命令 替换和取消命令 搜索和搜索替换命令 保存和退出…

Clickhouse初认识

技术主题-clickhouse 一什么是clickHouse 1&#xff09;本质上就是一款数据库管理系统&#xff0c;能提供海量数据的存储和检索 2&#xff09;基于列存储&#xff0c;数据是按照列进行存储的&#xff08;数据格式一样&#xff0c;方便进行压缩&#xff09; 3&#xff09;具备…

【Rust】快速教程——闭包与生命周期

前言 你怎么向天生的瞎子说清颜色&#xff1f;怎么用手势向天生的聋子描述声音&#xff1f; 鲜花就在眼前&#xff0c;雷鸣就在头顶&#xff0c;对他们来说却都毫无意义 眼睛看不到&#xff0c;鼻子可以嗅闻花香&#xff0c;耳朵听不见&#xff0c;手指可以触碰窗纸的震动。 犯…

【C语言】数组下标为啥从0开始?下标越界访问一定报错吗?

本篇文章目录 0. 相关文章1. 下标从0开始问题2. 数组下标越界不报错问题 0. 相关文章 指针与指针变量数组名不是首元素地址的的2个例外拨开指针和数组名之间的迷雾 1. 下标从0开始问题 原因是&#xff1a;数组下标访问本质是“指针解引用操作”&#xff0c;而指针又是地址&am…

C++之map容器

C之map容器 map构造和赋值 #include<iostream> #include<string> using namespace std; #include<map>void printMap(map<int,int>&m) {for (map<int,int>::iterator it m.begin();it ! m.end();it){//cout <<"key is: "&l…

LeetCode994.腐烂的橘子

看完题我觉得这不是和上一道岛屿的题一样简单嘛&#xff0c;然后写了将近2个小时才写出来&#xff0c;我的思路就是&#xff0c;用check()先对grid检查一下&#xff0c;是否有以下情况&#xff1a; &#xff08;如果有1的周围都是空&#xff0c;则这个位置用不腐烂&#xff0c;…

[Docker]六.Docker自动部署nodejs以及golang项目

一.自动部署nodejs 1.创建node项目相关文件 app.js代码如下: var express require(express);var appexpress();app.get(/,function(req,res){res.send(首页update); }) app.get(/news,function(req,res){res.send(首页); })//docker做端口映射的时候不要指定ip app.listen(30…

2.2 调用星火大模型的API

调用星火大模型的API 1 申请API调用权限&#xff1a;2 调用原生星火 API3 统一API调用方式 项目仓库地址&#xff1a;https://github.com/datawhalechina/llm-universe 讯飞星火认知大模型&#xff0c;由科大讯飞于2023年5月推出的中文大模型&#xff0c;也是国内大模型的代表…
最新文章