SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)(A~F)(最爱线段树的一集)

A - Sanitize Hands

        题意:

        模拟

// Problem: A - Sanitize Hands
// Contest: AtCoder - SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)
// URL: https://atcoder.jp/contests/abc357/tasks/abc357_a
// Memory Limit: 1024 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 = 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 , m;
	cin >> n >> m;
	for(int i = 0 ; i < n ; i++){
		cin >> a[i];
	}	
	int cnt = 0;
	for(int i = 0 ; i < n ; i ++){
		if(m >= a[i]){
			cnt ++;
			m -= a[i];
		}
		else{
			m = 0;
		}
	}
	cout << cnt << 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;
}

 B - Uppercase and Lowercase

        题意:

        还是模拟

// Problem: B - Uppercase and Lowercase
// Contest: AtCoder - SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)
// URL: https://atcoder.jp/contests/abc357/tasks/abc357_b
// Memory Limit: 1024 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 = 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 cnt1 = 0;
	string s;
	cin >> s;	
	for(auto c : s){
		if(c >= 'a' && c <= 'z'){
			cnt1++;
		}
	}
	if(cnt1 * 2 > s.size()){
		for(auto c : s){
			if(c >= 'a' && c <= 'z'){
				cout << c;
			}
			else{
				cout << (char)(c + 32);
			}
		}
	}
	else{
		for(auto c : s){
			if(c >= 'a' && c <= 'z'){
				cout << (char)(c - 32);
			}
			else{
				cout << (char)c;
			}
		}		
	}
}            
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;
}

C - Sierpinski carpet 

题意:

依旧是模拟..不知道前排大佬怎么能写这么快的

// Problem: C - Sierpinski carpet
// Contest: AtCoder - SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)
// URL: https://atcoder.jp/contests/abc357/tasks/abc357_c
// Memory Limit: 1024 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 = 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;
	}
}
vector<vector<string>>v(7 , vector<string>(10101));
void solve() 
{
	int n;
	cin >> n;
	for(int i = 1 ; i <= (int)pow(3 , n) ; i ++){
		cout << v[n][i] <<endl;
	}
}            
int main() 
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout.precision(10);
	int t = 1;
	v[0][1] = '#';
	for(int i = 1 ; i < 7 ; i ++){
		int pre = (int)pow(3 , i - 1);
		for(int j = 1 ; j <= 3 * pre ; j ++){
			if((j - 1) / pre != 1){
				for(int t = 0 ; t < 3 ; t ++){
					v[i][j] += v[i - 1][(j - 1) % pre + 1];				
				}
			}
			else{
				v[i][j] += v[i - 1][(j - 1) % pre + 1];
				for(int t = 0 ; t < pre ; t ++){
					v[i][j] += '.';
				}
				v[i][j] += v[i - 1][(j - 1) % pre + 1];
			}
		}
	}
    while(t--)
    {
    	solve();
    }
    return 0;
}

 

D - 88888888

        

思路:将答案拆成加和的形式:假设N的位数为x,那么最终答案为n +n * pow(10 , x)+n*pow(10,2 * x)...n * pow(10 ,( n - 1) * x),然后可以将 N提出来之后,其余的是一个等比数列,因此有等比数列求和公式将答案化简为:n * (pow(10 , n * x) - 1 )/( pow(10 ,x ) -1)

注意n*x可能爆longlong

// Problem: D - 88888888
// Contest: AtCoder - SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)
// URL: https://atcoder.jp/contests/abc357/tasks/abc357_d
// Memory Limit: 1024 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 = 5e05+10;
const LL mod = 998244353;
const int inf = 0x3f3f3f3f;
const LL llinf = 5e18;
#define int unsigned long long
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() 
{
	cin >> n;
	int tmp = n;
	int len = 0;
	while(tmp){
		len ++;
		tmp /= 10;
	}
	int t = n % mod;
	int fenzi = qpow(qpow(10 , n) , len) - 1 + mod;
	fenzi %= mod;
	int bei = qpow(10 , len) - 1 + mod;
	int tbei = qpow(bei , mod - 2);
	int ans = t;
	t *= fenzi;
	t %= mod;
	t *= tbei;
	t %= mod;
	cout << t;
}            
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;
}

 

E - Reachability in Functional Graph

        题意:

        思路:将有向图通过SCC缩点形成一个有向无环图(DAG), 然后思考答案:同一个强连通分量的点两两互相连通,然后与该连通分量相连的所有点与该连通分量上的所有点相连通,因此本题变成了DAG图上DP,直接逆拓扑序走一遍。考虑单独存储每一个强连通分量上的点,与能够连接到该连通分量上的点即可。 (SCC知识快忘记的差不多了..只记得bel从大到小就是逆拓扑序)

// Problem: E - Reachability in Functional Graph
// Contest: AtCoder - SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)
// URL: https://atcoder.jp/contests/abc357/tasks/abc357_e
// Memory Limit: 1024 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 = 5e05+10;
const LL mod = 1e09+7;
const int inf = 0x3f3f3f3f;
#define int long long
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;
	}
}
struct SCC {
    int n;
    std::vector<std::vector<int>> adj;//邻边
    std::vector<int> stk;//存储同一个SCC
    std::vector<int> dfn, low, bel;//dfn : dfs的时间戳 low : 子树能跳到的最上方的点 bel : 结点位于哪块强连通分量上 
    int cur, cnt;
    
    SCC() {}
    SCC(int n) {
        init(n);
    }
    
    void init(int n) {
        this->n = n;
        adj.assign(n, {});
        dfn.assign(n, -1);
        low.resize(n);
        bel.assign(n, -1);
        stk.clear();
        cur = cnt = 0;
    }
    
    void addEdge(int u, int v) {
        adj[u].push_back(v);
    }
    
    void dfs(int x) {
        dfn[x] = low[x] = cur++;
        stk.push_back(x);
        
        for (auto y : adj[x]) {
            if (dfn[y] == -1) {
                dfs(y);
                low[x] = std::min(low[x], low[y]);
            } else if (bel[y] == -1) {
                low[x] = std::min(low[x], dfn[y]);
            }
        }
        
        if (dfn[x] == low[x]) {
            int y;
            do {
                y = stk.back();
                bel[y] = cnt;
                stk.pop_back();
            } while (y != x);
            cnt++;
        }
    }
    
    std::vector<int> work() {
        for (int i = 0; i < n; i++) {
            if (dfn[i] == -1) {
                dfs(i);
            }
        }
        return bel;
    }
};

void solve() 
{
	int n;
	cin >> n;
	SCC scc(n + 5);
	for(int i = 1 ; i <= n ; i ++){
		int x;
		cin >> x;
		if(x != i){
			scc.addEdge(i , x);
		}
	}
	vector<int>t = scc.work();
	vector<int>dp(n + 5 , 0);
	vector<int>cnt(n + 5 , 0);
	vector<int>chan[n + 5];
	int ma = -1;
	for(int i = 1; i <= n ; i ++){
		//cout << t[i] << endl;
		cnt[t[i]]++;
		chan[t[i]].pb(i);
		ma = max(ma , t[i]);
	}
	int ans = 0;
	vector<int>vis(n + 5, 0);
	for(int i = ma ; i >= 1 ; i --){
		int tmp = cnt[i];
		ans += cnt[i] * cnt[i];
		ans += dp[i] * cnt[i];
		cnt[i] += dp[i];
		vector<int>path;
		for(auto it : chan[i]){
			int next;
			if(scc.adj[it].size() != 0){
				next = scc.adj[it][0];
			}
			else{
				continue;
			}
			int belo = scc.bel[next];
			if(!vis[belo]){
				path.pb(belo);
				vis[belo] = 1;
				dp[belo] += cnt[i];
			}
		}
		for(auto it : path){
			vis[it] = 0;
		}
	}
	//cout << cnt[3] << endl;
	cout << ans;
}            
signed main() 
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout.precision(10);
    int t=1;
    while(t--)
    {
    	solve();
    }
    return 0;
}

F - Two Sequence Queries 

        题意:

        思路:很明显的线段树题目(在这几天做的题里面算简单的了)。一个区间需要维护的信息有:区间点的个数(act)、区间中A数组的和(asum)、区间中B数组的和(bsum)、以及区间A*B的和(tot)。区间合并非常简单,全部相加即可。主要考虑tag怎么设置,可以发现,若区间A都加上X,那么其asum += act * X , tot += bsum * X。反之B区间也是一样。然后本题就完成了

        

// Problem: F - Two Sequence Queries
// Contest: AtCoder - SuntoryProgrammingContest2024(AtCoder Beginner Contest 357)
// URL: https://atcoder.jp/contests/abc357/tasks/abc357_f
// Memory Limit: 1024 MB
// Time Limit: 5000 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 int long long
#define endl '\n'
const LL maxn = 4e05+7;
const LL N = 5e05+10;
#define i64 long long
const LL mod =  998244353;
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;
}
template<class Info, class Tag>
struct LazySegmentTree {
    const int n;
    std::vector<Info> info;
    std::vector<Tag> tag;
    LazySegmentTree(int n) : n(n), info(4 << std::__lg(n)), tag(4 << std::__lg(n)) {}
    LazySegmentTree(std::vector<Info> init) : LazySegmentTree(init.size()) {
        std::function<void(int, int, int)> build = [&](int p, int l, int r) {
            if (r - l == 1) {
                info[p] = init[l];
                return;
            }
            int m = (l + r) / 2;
            build(2 * p, l, m);
            build(2 * p + 1, m, r);
            pull(p);
        };
        build(1, 0, n);
    }
    void pull(int p) {
        info[p] = info[2 * p] + info[2 * p + 1];
    }
    void apply(int p, const Tag &v) {
        info[p].apply(v);
        tag[p].apply(v);
    }
    void push(int p) {
        apply(2 * p, tag[p]);
        apply(2 * p + 1, tag[p]);
        tag[p] = Tag();
    }
    void modify(int p, int l, int r, int x, const Info &v) {
        if (r - l == 1) {
            info[p] = v;
            return;
        }
        int m = (l + r) / 2;
        push(p);
        if (x < m) {
            modify(2 * p, l, m, x, v);
        } else {
            modify(2 * p + 1, m, r, x, v);
        }
        pull(p);
    }
    void modify(int p, const Info &v) {
        modify(1, 0, n, p, v);
    }
    Info rangeQuery(int p, int l, int r, int x, int y) {
        if (l >= y || r <= x) {
            return Info();
        }
        if (l >= x && r <= y) {
            return info[p];
        }
        int m = (l + r) / 2;
        push(p);
        return rangeQuery(2 * p, l, m, x, y) + rangeQuery(2 * p + 1, m, r, x, y);
    }
    Info rangeQuery(int l, int r) {
        return rangeQuery(1, 0, n, l, r);
    }
    void rangeApply(int p, int l, int r, int x, int y, const Tag &v) {
        if (l >= y || r <= x) {
            return;
        }
        if (l >= x && r <= y) {
            apply(p, v);
            return;
        }
        int m = (l + r) / 2;
        push(p);
        rangeApply(2 * p, l, m, x, y, v);
        rangeApply(2 * p + 1, m, r, x, y, v);
        pull(p);
    }
    void rangeApply(int l, int r, const Tag &v) {
        return rangeApply(1, 0, n, l, r, v);
    }
    void half(int p, int l, int r) {
        if (info[p].act == 0) {
            return;
        }
        if ((info[p].min + 1) / 2 == (info[p].max + 1) / 2) {
            apply(p, {-(info[p].min + 1) / 2});
            return;
        }
        int m = (l + r) / 2;
        push(p);
        half(2 * p, l, m);
        half(2 * p + 1, m, r);
        pull(p);
    }
    void half() {
        half(1, 0, n);
    }
};
struct Tag {
    i64 adda = 0;
    i64 addb = 0;
    void apply(Tag t) {
        adda += t.adda;
        adda %= mod;
        addb += t.addb;
        addb %= mod;
    }
};
struct Info {
	int asum = 0;
	int bsum = 0;
	int tot = 0;
    int act = 0;
    void apply(Tag t) {
		asum += (t.adda * act) % mod;
		asum %= mod;
		tot += (bsum * t.adda) % mod;
		tot %= mod;
		bsum += (t.addb * act) % mod;
		bsum %= mod;
		tot += ((asum % mod) *( t.addb % mod)) % mod;
		tot %= mod;
    }
};
Info operator + (Info a, Info b) {
    Info c;
	c.asum = a.asum + b.asum;
	c.asum %= mod;
    c.bsum = a.bsum + b.bsum;
    c.bsum %= mod;
    c.act = a.act + b.act;
    c.act %= mod;
    c.tot = a.tot + b.tot;
    c.tot %= mod;
    return c;
}
void solve() 
{
	int n , m;
	cin >> n >> m;
	vector<Info>v(n);
	for(int i = 0 ; i < n ; i ++){
		cin >> v[i].asum;
	}
	for(int i = 0 ; i < n ; i ++){
		cin >> v[i].bsum;
	}
	for(int i = 0 ; i < n ; i ++){
		v[i].act = 1;
		v[i].tot = v[i].asum * v[i].bsum;
		v[i].tot %= mod;
	}
	LazySegmentTree <Info , Tag> seg(v);
	for(int i = 0 ; i < m; i ++){
		int op;
		cin >> op;
		if(op == 1){
			int l , r , x;
			cin >> l >> r >> x;
			Tag tmp;
			tmp.adda = x;
			seg.rangeApply(l - 1 , r , tmp);
		}
		else if(op == 2){
			int l , r , x;
			cin >> l >> r >>x;
			Tag tmp;
			tmp.addb = x;
			seg.rangeApply(l - 1 , r , tmp);
		}
		else{
			int l , r;
			cin >> l >> r;
			cout << seg.rangeQuery(l - 1 , r).tot << 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.mfbz.cn/a/691700.html

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

相关文章

量化视频1---qmt实盘交易链接,提供源代码

量化视频1---qmt实盘交易链接&#xff0c;提供源代码 量化视频1---qmt实盘交易链接&#xff0c;提供源代码 (qq.com) 源代码 from qmt_trader.qmt_trader import qmt_tradertraderqmt_trader(path rD:/国金QMT交易端模拟/userdata_mini, session_id 123456…

【Ardiuno】使用ESP32网络功能调用接口数据(图文)

接着上文连通wifi后&#xff0c;我们通过使用HTTPClient库进行网络相关操作&#xff0c;这里我们通过http协议进行接口调用。 为了简化操作&#xff0c;这里使用了本地服务器上的文件作为接口&#xff0c;正常操作时会调用接口后&#xff0c;将服务器返回的数据进行解析&#…

LeetCode热题100—链表(二)

19.删除链表的倒数第N个节点 题目 给你一个链表&#xff0c;删除链表的倒数第 n 个结点&#xff0c;并且返回链表的头结点。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5], n 2 输出&#xff1a;[1,2,3,5] 示例 2&#xff1a; 输入&#xff1a;head [1], n 1 …

46-1 护网溯源 - 钓鱼邮件溯源

一、客户提供钓鱼邮件样本 二、行为分析 三、样本分析 对钓鱼邮件中的木马程序1111.exe文件进行了分析,提交了360安全大脑沙箱云和微步在线云沙箱。 360安全大脑沙箱云显示,该1111.exe文件存在危险,因此在解压时需要谨慎操作,以免触发木马程序。 建议使用360压缩软件进行…

操作系统总结

进程和线程的区别 本质区别&#xff1a; 进程是资源调度以及分配的基本单位。线程是 CPU 调度的基本单位。 所属关系&#xff1a;一个线程属于一个进程&#xff0c;一个进程可以拥有多个线程。地址空间&#xff1a; 进程有独立的虚拟地址空间。线程没有独立的虚拟地址空间&…

Python数据分析I

目录 注&#xff1a;简单起见&#xff0c;下文中"df"均写为"表名"&#xff0c;"函数"均写为"HS"&#xff0c;"属性"均写为"SX"&#xff0c;"范围"均写为"FW"。 1.数据分析常用开源库 注释…

【python报错】list indices must be integers or slices, not tuple

【Python报错】list indices must be integers or slices, not tuple 在Python中&#xff0c;列表&#xff08;list&#xff09;是一种常用的数据结构&#xff0c;用于存储一系列的元素。当你尝试使用不支持的索引类型访问列表元素时&#xff0c;会遇到list indices must be in…

[ssi-uploader插件]解决如何接收服务器返回数据+修改参数名称

前言 ssi-uploader是一款非常好用的多文件上传插件&#xff0c;源码是开源的&#xff0c;在github上面即可下载&#xff1a; https://github.com/ssbeefeater/ssi-uploader 但是源码有些微小的不足&#xff0c;今天我们解决两点问题&#xff1a; 上传文件完成后&#xff0c…

QT: 读写ini配置文件(实现qml界面登录,修改)

目录 一.功能介绍 二.暴露属性 三.指定INI文件的路径和格式。 四.登录操作 1.检查INI文件中是否含有登录信息&#xff1b; 2.读取存储的ID&#xff1b; 3.读取存储的密码; 4.成功返回1&#xff1b;失败返回2&#xff1b; 五.修改账号 1.检查INI文件中是否含有登录信…

C++面向对象程序设计 - 字符串流

文件流是以外存文件为输入输出对象的数据流&#xff0c;字符串流不是以外存文件为输入输出的对象&#xff0c;而以内存中用户定义的字符数组&#xff08;字符串&#xff09;为输入输出的对象&#xff0c;即将数据输出到内存中的字符数组&#xff0c;或者从字符数组&#xff08;…

中间代码生成

一&#xff0e;实验题目 DO-WHILE循环语句的中间代码生成 二&#xff0e;实验目的 通过设计、编制、调试一个 do-while 循环语句的语法及语义分析程序&#xff0c;加深对 法及语义分析原理的理解&#xff0c;并实现词法分析程序对单词序列的词法检查和分析。 三&#xff0e; 实…

c++【入门】正多边形每个内角的度数

限制 时间限制 : 1 秒 内存限制 : 128 MB 题目 根据多边形内角和定理&#xff0c;正多边形内角和等于&#xff1a;&#xff08;n &#xff0d; 2&#xff09;180(n大于等于3且n为整数&#xff09;&#xff08;如下图所示是三角形、四边形、五边形、六边形的形状&#xff09…

云服务器CPU和内存直接被zzh恶意挖矿程序打满,如何解决?

回顾 最近在服务器上面部署网站&#xff0c;刚开始使用还是没问题的&#xff0c;当时一段时间之后发现CPU和内存总是被打满&#xff0c;本地没有跑大的应用&#xff0c;主要有mysql、nginx、redis&#xff0c;一度还以为是nginx 的问题&#xff0c;但是后来排除了。之后使用ht…

Python私教张大鹏 Vue3整合AntDesignVue之Anchor 锚点

用于跳转到页面指定位置。 何时使用 需要展现当前页面上可供跳转的锚点链接&#xff0c;以及快速在锚点之间跳转。 案例&#xff1a;锚点的基本使用 核心代码&#xff1a; <template><a-anchor:items"[{key: part-1,href: #part-1,title: () > h(span, {…

GAT1399协议分析(10)--单图像删除

一、官方接口 由于批量删除的接口&#xff0c;图像只能单独删除。 二、wireshark实例 这个接口比较简单&#xff0c;调用request delete即可 文本化&#xff1a; DELETE /VIID/Images/34078100001190001002012024060513561300065 HTTP/1.1 Host: 10.0.201.56:31400 User-Age…

【Proteus8.16】Proteus8.16.SP3.exe的安装包,安装方法

下载&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/14ZlETF7g4Owh8djLaHwBOw?pwd2bo3 提取码&#xff1a;2bo3 管理员打开proteus8.16.SP3.exe一路装就行了&#xff0c;许可证选Licence2.lxk,点安装后关闭&#xff0c;然后继续装完。 然后打开Patch-Proteus-8.16-…

树莓派4B 零起点(一) 树莓派 无屏 从购买到启动

目录 背景 一. 准备工作 二、烧录系统 三、连接系统 背景 准备开发ROS机器人&#xff0c;在淘宝上购买的树莓派4B(4G)到货了&#xff0c;配件都很齐全&#xff0c;那么就直接开箱验货。 一. 准备工作 1 、硬件&#xff1a;(如下图) (我的购买链接: 树莓派4B 4g 套件) 2…

pikachu靶场全流程

目录​​​​​​​ 暴力破解&#xff1a; 1.基于表单的暴力破解&#xff1a; 2.验证码绕过(on server)&#xff1a; 3.验证码绕过(on client)&#xff1a; token防爆破&#xff1a; XSS&#xff1a; 1.反射型xss(get)&#xff1a; 2.反射性xss(post)&#xff1a; 3.存…

搭建python虚拟环境,并在VSCode中使用

创建环境 python -m venv E:\python\flask\venv激活环境 运行下图所示的bat文件 退出环境 执行下面的语句 deactivateVSCode中配置&#xff1a; ①使用CTRLshiftp命令&#xff0c;使用CTRLshiftp命令&#xff0c;输入&#xff1a; Python: Select Interpreter②选择之前创建…

据报道,FTC 和 DOJ 对微软、OpenAI 和 Nvidia 展开反垄断调查

据《纽约时报》报道&#xff0c;联邦贸易委员会 (FTC) 和司法部 (DOJ) 同意分担调查微软、OpenAI 和 Nvidia 潜在反垄断违规行为的职责。 美国司法部将牵头对英伟达进行调查&#xff0c;而联邦贸易委员会将调查 OpenAI 与其最大投资者微软之间的交易。 喜好儿网 今年 1 月&a…