Codeforces911题解

华为HPLC模组全拆解之电力载波收发原理分析 电力线载波通信(PLC)是一种使用电力线进行数据传输的通信技术,即利用现有电网作为信号的传输介质,使电网在传输电力的同时可以进行数据传输。目前根据所用频段的不同,低压电力线载波通信一般分为窄带电力线载波通信(10KHz~500KHz)和宽带电力线载波通信(2MHz~20MHz)。这里的频率可以简单理解为单片机串口的通信波特率,频率越小通信速度越慢,频率越大通信速度越快。为了研究电力载波通信原理,笔者以华为的一款宽带电力载波模组为例进行详细的分析,该模组主控采用的是海思芯片,型号为Hi3921EV100。 阅读详情

A. Nearest Minimums

You are given an array of n integer numbers a0, a1, …, an - 1. Find the distance between two closest (nearest) minimums in it. It is guaranteed that in the array a minimum occurs at least two times.

Input
The first line contains positive integer n (2 ≤ n ≤ 105) — size of the given array. The second line contains n integers a0, a1, …, an - 1 (1 ≤ ai ≤ 109) — elements of the array. It is guaranteed that in the array a minimum occurs at least two times.

Output
Print the only number — distance between two nearest minimums in the array.

Examples
input
2
3 3
output
1
input
3
5 6 5
output
2
input
9
2 1 3 5 4 1 2 3 1
output
3

  • 题意:问你最近的两个最小数的距离是多少
  • 题解:。。。。直接xjb求。。。
#include<bits/stdc++.h>
using namespace std;


int main()
{
    int n;
    while (cin >> n)
    {
        vector<int> v;
        int Min = 1e9 + 7;
        for (int i = 0; i < n; i ++)
        {
            int x;
            cin >> x;
            v.push_back(x);
            Min = min(x, Min);
        }
        int cur = -1;
        int dis = 1e9;
        for (int i = 0; i < n; i ++)
        {
            if (v[i] != Min)
                continue;
            if (cur == -1)
                cur = i;
            else
            {
                dis = min(i - cur, dis);
                cur = i;
            }
        }
        cout << dis << endl;
    }
}

B. Two Cakes

It’s New Year’s Eve soon, so Ivan decided it’s high time he started setting the table. Ivan has bought two cakes and cut them into pieces: the first cake has been cut into a pieces, and the second one — into b pieces.

Ivan knows that there will be n people at the celebration (including himself), so Ivan has set n plates for the cakes. Now he is thinking about how to distribute the cakes between the plates. Ivan wants to do it in such a way that all following conditions are met:

Each piece of each cake is put on some plate;
Each plate contains at least one piece of cake;
No plate contains pieces of both cakes.
To make his guests happy, Ivan wants to distribute the cakes in such a way that the minimum number of pieces on the plate is maximized. Formally, Ivan wants to know the maximum possible number x such that he can distribute the cakes according to the aforementioned conditions, and each plate will contain at least x pieces of cake.

Help Ivan to calculate this number x!

Input
The first line contains three integers n, a and b (1 ≤ a, b ≤ 100, 2 ≤ n ≤ a + b) — the number of plates, the number of pieces of the first cake, and the number of pieces of the second cake, respectively.

Output
Print the maximum possible number x such that Ivan can distribute the cake in such a way that each plate will contain at least x pieces of cake.

Examples
input
5 2 3
output
1
input
4 7 10
output
3
Note
In the first example there is only one way to distribute cakes to plates, all of them will have 1 cake on it.

In the second example you can have two plates with 3 and 4 pieces of the first cake and two plates both with 5 pieces of the second cake. Minimal number of pieces is 3.

  • 题意:现在有n个盘子,a个第一种披萨,b个第二种披萨,每个盘子只能装若干块同种披萨,问你最多能让最少的盘子里有几个披萨。
  • 题解:不如再瞎搞一下。对他就是问你哪种分配策略能让最少的盘子里装的最多。我们确定一种分配需要确定有几个盘子放a或者几个盘子放b,然后再贪心放披萨就能得到当前的最优质,在所有的最优里面取最优就行了。我们暴力i个盘子放a种披萨。
#include<bits/stdc++.h>
using namespace std;


int main()
{
    int n, a, b;
    while (cin >> n >> a >> b)
    {
        int Max = 0;
        for (int i = 1; i < n; i++)
        {
            int ret = n - i;
            Max = max(Max, min(b / ret, a / i));
        }
        cout << Max << endl;
    }
}

C. Three Garlands

Mishka is decorating the Christmas tree. He has got three garlands, and all of them will be put on the tree. After that Mishka will switch these garlands on.

When a garland is switched on, it periodically changes its state — sometimes it is lit, sometimes not. Formally, if i-th garland is switched on during x-th second, then it is lit only during seconds x, x + ki, x + 2ki, x + 3ki and so on.

Mishka wants to switch on the garlands in such a way that during each second after switching the garlands on there would be at least one lit garland. Formally, Mishka wants to choose three integers x1, x2 and x3 (not necessarily distinct) so that he will switch on the first garland during x1-th second, the second one — during x2-th second, and the third one — during x3-th second, respectively, and during each second starting from max(x1, x2, x3) at least one garland will be lit.

Help Mishka by telling him if it is possible to do this!

Input
The first line contains three integers k1, k2 and k3 (1 ≤ ki ≤ 1500) — time intervals of the garlands.

Output
If Mishka can choose moments of time to switch on the garlands in such a way that each second after switching the garlands on at least one garland will be lit, print YES.

Otherwise, print NO.

Examples
input
2 2 3
output
YES
input
4 2 3
output
NO
Note
In the first example Mishka can choose x1 = 1, x2 = 2, x3 = 1. The first garland will be lit during seconds 1, 3, 5, 7, …, the second — 2, 4, 6, 8, …, which already cover all the seconds after the 2-nd one. It doesn’t even matter what x3 is chosen. Our choice will lead third to be lit during seconds 1, 4, 7, 10, …, though.

In the second example there is no way to choose such moments of time, there always be some seconds when no garland is lit.

  • 题意:给你3个灯,每个灯有一个闪烁间隔,问你能不能找到一种让每个灯的开始时间,使在三个灯全部亮过一遍之后每个时刻都至少有一个灯在亮。
  • 题解:不会 下一个。
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int a, b, c;
    while (cin >> a >> b >> c)
    {
        int cnt[5];
        memset(cnt, 0, sizeof(cnt));
        if (a < 5)
            cnt[a] ++;
        if (b < 5)
            cnt[b] ++;
        if (c < 5)
            cnt[c] ++;
        if (cnt[1])
            cout << "YES" << endl;
        else if (cnt[2] >= 2)
            cout << "YES" << endl;
        else if (cnt[3] == 3)
            cout << "YES" << endl;
        else if (cnt[4] == 2 && cnt[2] == 1)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}

D. Inversion Counting

A permutation of size n is an array of size n such that each integer from 1 to n occurs exactly once in this array. An inversion in a permutation p is a pair of indices (i, j) such that i > j and ai < aj. For example, a permutation [4, 1, 3, 2] contains 4 inversions: (2, 1), (3, 1), (4, 1), (4, 3).

You are given a permutation a of size n and m queries to it. Each query is represented by two indices l and r denoting that you have to reverse the segment [l, r] of the permutation. For example, if a = [1, 2, 3, 4] and a query l = 2, r = 4 is applied, then the resulting permutation is [1, 4, 3, 2].

After each query you have to determine whether the number of inversions is odd or even.

Input
The first line contains one integer n (1 ≤ n ≤ 1500) — the size of the permutation.

The second line contains n integers a1, a2, …, an (1 ≤ ai ≤ n) — the elements of the permutation. These integers are pairwise distinct.

The third line contains one integer m (1 ≤ m ≤ 2·105) — the number of queries to process.

Then m lines follow, i-th line containing two integers li, ri (1 ≤ li ≤ ri ≤ n) denoting that i-th query is to reverse a segment [li, ri] of the permutation. All queries are performed one after another.

Output
Print m lines. i-th of them must be equal to odd if the number of inversions in the permutation after i-th query is odd, and even otherwise.

Examples
input
3
1 2 3
2
1 2
2 3
output
odd
even
input
4
1 2 4 3
4
1 1
1 4
1 4
2 3
output
odd
odd
odd
even

  • 题意:给你一个排列,有m次操作,每次操作翻转一个区间,问你翻转后的排列逆序对是奇数个还是偶数个
  • 题解:给定的区间将原排列分为三段,翻转区间,区间左侧区间,区间右侧区间。显然,区间翻转对该区间左右侧的区间的逆序对没有影响。只需要考虑翻转区间。设翻转区间的逆序对有x个,那么翻转后逆序对都变成顺序对,顺序对变成逆序对。对整个排列的贡献为原排列逆序对 - 翻转前逆序对 + 翻转前顺序对。又可知对一个区间,他的总数对 = 顺序对 + 逆序对 = 区间长度 * (区间长度 - 1) / 2。分类讨论如果区间总对数为偶数,那么顺序对逆序对奇偶性相同,不影响总的奇偶性。同理为奇数会影响,所以我们只需要计算区间总数对就可以了。
#include<bits/stdc++.h>
using namespace std;

int a[10000];
int dp[2000][2000];
int main()
{
    int n;
    while (cin >> n)
    {
        for (int i = 1; i <= n; i++)
            cin >> a[i];
        int ans = 0;
        for (int i = 1; i <= n; i++)
        {
            for (int j = i + 1; j <= n; j++)
            {
                if (a[i] > a[j])
                    ans ++;
            }
        }
        int flag ;
        if (ans % 2)
            flag = 1;
        else flag = 0;
        int m;
        cin >> m;
        for (int i = 0; i < m; i++)
        {
            int l, r;
            cin >> l >> r;
            long long temp = (r - l + 1) * (r - l) / 2;
            flag ^= (temp % 2);
            if (flag)
                cout << "odd" << endl;
            else
                cout << "even" << endl;
        }
    }
}

E. Stack Sorting

  • 题意:给你一排列的一部分,让你补全整个排列使其字典序最大并且经过一个栈调整顺序之后能够顺序输出
  • 题解:他给了你开头,我们先检验他给的部分会不会已经不满足条件,如果可能可以满足条件,那么我们自己开始构造。他给你的序列是完整序列被切割成几段,每段使其倒序,就可以构造出字典序最大,最后再检验一下可不可以就行了。
    不过我看我们学校大佬都不是这样做的好像?
#include<bits/stdc++.h>
using namespace std;

const int N = 1e6;

int a[N];
int vis[N];
int main()
{
    int n, k;
    while (cin >> n >> k)
    {
        int Max = 0;
        memset(vis, 0, sizeof(vis));
        for (int i = 1; i <= k; i++)
        {
            cin >> a[i];
            Max = max(a[i], Max);
        }
        int cur = 1;
        stack<int> st;
        for (int i = 1; i <= k; i++)
        {
            vis[a[i]] = 1;
            if (a[i] == cur)
            {
                cur ++;
                while (!st.empty() && st.top() == cur)
                {
                    st.pop();
                    cur ++;
                }
            }
            else
                st.push(a[i]);
        }
        if (vis[cur] && st.top() != cur)
            cout << -1 << endl;
        else
        {
            int curcnt = k;
            vector<int> v;
            for (int i = 1; i <= Max; i++)
            {
                if (!vis[i])
                {
                    v.clear();
                    while (!vis[i])
                        v.push_back(i++);
                    reverse(v.begin(), v.end());
                    for (auto x : v)
                        a[++curcnt] = x;
                    i--;
                }

            }
            for (int i = n; i > Max; i--)
                a[++curcnt] = i;
            for (int i = k + 1; i <= n; i++)
            {
                vis[a[i]] = 1;
                if (a[i] == cur)
                {
                    cur ++;
                    while (!st.empty() && st.top() == cur)
                        st.pop(), cur ++;
                }
                else
                    st.push(a[i]);
            }
            if (!st.empty())
                cout << -1 << endl;
            else
            {
                for (int i = 1; i <= n; i++)
                {
                    if (i != 1)
                        cout << " ";
                    cout << a[i];
                }
            }
            cout << endl;
        }
    }
}

F. Tree Destruction

You are given an unweighted tree with n vertices. Then n - 1 following operations are applied to the tree. A single operation consists of the following steps:

choose two leaves;
add the length of the simple path between them to the answer;
remove one of the chosen leaves from the tree.
Initial answer (before applying operations) is 0. Obviously after n - 1 such operations the tree will consist of a single vertex.

Calculate the maximal possible answer you can achieve, and construct a sequence of operations that allows you to achieve this answer!

Input
The first line contains one integer number n (2 ≤ n ≤ 2·105) — the number of vertices in the tree.

Next n - 1 lines describe the edges of the tree in form ai, bi (1 ≤ ai, bi ≤ n, ai ≠ bi). It is guaranteed that given graph is a tree.

Output
In the first line print one integer number — maximal possible answer.

In the next n - 1 lines print the operations in order of their applying in format ai, bi, ci, where ai, bi — pair of the leaves that are chosen in the current operation (1 ≤ ai, bi ≤ n), ci (1 ≤ ci ≤ n, ci = ai or ci = bi) — choosen leaf that is removed from the tree in the current operation.

See the examples for better understanding.

Examples
input
3
1 2
1 3
output
3
2 3 3
2 1 1
input
5
1 2
1 3
2 4
2 5
output
9
3 5 5
4 3 3
4 1 1
4 2 2

  • 题意:给你一棵树,每次挑选这棵树的两个叶子,加上他们之间的边数,然后将其中一个点去掉,问你边数之和最大可以是多少。
  • 题解:其实。。。很简单。首先离每个叶子最远的点必定是在树的直径上。那么我们可以先把这棵树的直径找出来,把树的点分为在直径上和不在直径上两种。首先我们如果 先处理直径直径会变短贡献肯定会变小。所以我们先处理非直径上的点,他必定会挑直径两端点中的一个点然后把自己去掉。这样处理完之后只剩直径了,直径只能慢慢缩短。。。从哪边都一样。
#include<bits/stdc++.h>
using namespace std;

const int N = 3e5 + 7;

vector<int> path;
vector<int> G[N];
int dis[N];
int fa[N][22];
int inpath[N];
int L[N];
int tot = 0;
int Max_Len = 0;
int root_u, root_v;
void init()
{
    Max_Len = 0;
    path.clear();
    tot = 0;
    memset(inpath,0,sizeof(inpath));
    for(int i = 0;i < N;i++)
        G[i].clear();
}
void add_edge(int u,int v)
{
    G[u].push_back(v);
    G[v].push_back(u);
}
void init_lca(int u,int f,int d)
{
    dis[u] = d;
    fa[u][0] = f;
    if(dis[u] >= Max_Len)
        Max_Len = dis[u], root_u = u;
    for(int i = 1;i<22;i++)
        fa[u][i] = fa[fa[u][i - 1]][i - 1];
    for(auto v : G[u])
    {
        if(v == f)
            continue;
        init_lca(v,u,d+1);
    }
}
int lca(int u,int v)
{
    if(dis[u] < dis[v])
        swap(u,v);
    for(int i = 21;i >= 0;i--)
        if(dis[fa[u][i]] >= dis[v])
            u = fa[u][i];
    if(u == v)
        return u;
    for(int i = 21;i >= 0;i--)
        if(fa[u][i] != fa[v][i])
            u = fa[u][i], v = fa[v][i];
    return fa[u][0];
}
void find_root(int u,int fa,int d)
{
    L[u] = ++ tot;
    if(d >= Max_Len)
        root_v = u,Max_Len = d;
    for(auto v : G[u])
    {
        if(v == fa)
            continue;
        find_root(v,u,d + 1);
    }
}
bool find_path(int u,int fa)
{
    if(u == root_v)
    {
        inpath[u] = 1;
        path.push_back(u);
        return true;
    }
    for(auto v : G[u])
    {
        if(v == fa)
            continue;
        if(find_path(v,u))
        {
            inpath[u] = 1;
            path.push_back(u);
            return true;
        }
    }
    return false;
}
vector<pair<int,int> > ans;
int main()
{
    ios :: sync_with_stdio(false);
    int n;
    while(cin >> n)
    {
        init();
        for(int i = 0;i < n - 1;i++)
        {
            int u,v;
            cin >> u >> v;
            add_edge(u,v);      
        }
        init_lca(1,1,0);
        find_root(root_u,root_u,0);
        find_path(root_u,root_u);
        ans.clear();
        long long sum = 0;
        //cout << root_u << " " << root_v << " " << Max_Len << endl;
        for(int i = 1;i <= n;i++)
        {
            if(!inpath[i])
            {
                long long ans1 = dis[root_u] + dis[i] - 2 * dis[lca(root_u,i)];
                long long ans2 = dis[root_v] + dis[i] - 2 * dis[lca(root_v,i)];
                sum += max(ans1,ans2);
                if(ans1 > ans2)
                    ans.push_back(make_pair(root_u,i));
                else
                    ans.push_back(make_pair(root_v,i));
            }
        }
        sort(ans.begin(),ans.end(),[](pair<int,int> a,pair<int,int> b){
            return L[a.second] > L[b.second];
        });
        for(int i = 0;i < path.size() - 1;i ++)
        {
            sum += dis[path[i]] + dis[root_u] - 2 * dis[lca(path[i],root_u)];
            ans.push_back(make_pair(root_u,path[i]));
        }
        cout << sum << endl;
        for(auto temp : ans)
            cout << temp.first <<  " " << temp.second << " " << temp.second << endl;
    }
}

G. Mass Change Queries

You are given an array a consisting of n integers. You have to process q queries to this array; each query is given as four numbers l, r, x and y, denoting that for every i such that l ≤ i ≤ r and ai = x you have to set ai equal to y.

Print the array after all queries are processed.

Input
The first line contains one integer n (1 ≤ n ≤ 200000) — the size of array a.

The second line contains n integers a1, a2, …, an (1 ≤ ai ≤ 100) — the elements of array a.

The third line contains one integer q (1 ≤ q ≤ 200000) — the number of queries you have to process.

Then q lines follow. i-th line contains four integers l, r, x and y denoting i-th query (1 ≤ l ≤ r ≤ n, 1 ≤ x, y ≤ 100).

Output
Print n integers — elements of array a after all changes are made.

Example
input
5
1 2 3 4 5
3
3 5 3 5
1 5 5 1
1 5 1 5
output
5 2 5 4 5

  • 题意:给你一个数组,若干次更新,每次更新l,r区间内值为x的元素将它们改为y
  • 题解:观察到元素只有100种,我们先不更新元素,考虑更新这个变换。初始变换posi = i可暴力更新变换。最后查询的时候将所有变换全部更新到叶子,就是这个位置最终的变换。
#include<bits/stdc++.h>
using namespace std;

const int N = 3e5 + 7;

int a[N];

struct Tree
{
    int l,r;
    int pos[101];
    int vis;
}t[N*4];
void build(int l,int r,int step)
{
    t[step].l = l, t[step].r = r;
    for(int i = 1;i <= 100;i++)
        t[step].pos[i] = i;
    if(l == r)
        return;
    int mid = (l + r) / 2;
    build(l, mid, step * 2);
    build(mid + 1, r,step * 2 + 1);
}
void push_down(int step)
{
    if(!t[step].vis)
        return;
    for(int i = 1;i <= 100;i++)
    {
        t[step * 2].pos[i] = t[step].pos[t[step * 2].pos[i]];
        t[step * 2 + 1].pos[i] = t[step].pos[t[step * 2 + 1].pos[i]];
    }
    for(int i = 1;i <= 100;i++)
        t[step].pos[i] = i;
    t[step].vis = 0;
    t[step * 2].vis = t[step * 2 + 1].vis = 1;
}
void update(int l,int r,pair<int,int> change,int step)
{
    if(t[step].l == l && t[step].r == r)
    {
        for(int i = 1;i <= 100;i++)
        {
            if(t[step].pos[i] == change.first)
                t[step].pos[i] = change.second;
        }
        t[step].vis = 1;
        return;
    }
    int mid = (t[step].l + t[step].r) / 2;
    push_down(step);
    if(r <= mid)
        update(l,r,change,step * 2);
    else if(l > mid )
        update(l,r,change,step * 2 + 1);
    else
        update(l,mid,change,step * 2), update(mid + 1,r,change,step * 2 + 1);
}
void query(int l,int r,int step)
{
    if(l == r)
    {
        a[l] = t[step].pos[a[l]];
        return;
    }
    push_down(step);
    int mid = (t[step].l + t[step].r) / 2;
    query(l,mid,step*2);
    query(mid + 1,r,step *2 + 1);
}
int main()
{
    ios :: sync_with_stdio(false);
    int n;
    while(cin >> n)
    {
        for(int i = 1;i <= n;i ++)
            cin >> a[i];
        build(1,n,1);
        int m;
        cin >> m;
        while(m --)
        {
            int l,r,x,y;
            cin >> l >> r >> x >> y;
            update(l,r,make_pair(x,y),1);
        }
        query(1,n,1);
        for(int i = 1;i <= n;i++)
        {
            if(i != 1)
                cout << " ";
            cout << a[i];
        }
        cout << endl;
    }
}
arkts编译报错-arkts-limited-stdlib错误【Bug已完美解决-鸿蒙开发】 在使用 Deveco Studio 4.0 beta2 开发应用时,报错。ERROR: ArkTS:ERROR File: D:/prRevivw/3792/applications_appsamg优快云o”见台难忘Usage of standardlibrary is restricted (arkts-limited-stdlib)这是 ArkTS 新增的语法规则。 阅读详情

相关推荐

cadence capture CIS 之添加数据库

2021-08-20 cadence capture CIS 之添加数据库准备一、添加数据源 准备 1、数据库文件(*.mdb) 2、电脑上安装好 cadence 软件 一、添加数据源 打开“ ODBC数据源管理器” ( 路径:C:\Windows\SysWOW64\odbcad32.exe ) ...

weixin_42256550的博客 6050

leetcode题解16-20@python

16 3sum Closest Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that ...

sinat_41547532的博客 288

如何用 Python 实现自动化测试?详细步骤和代码示例

Python自动化测试实战指南 本文系统介绍了使用Python构建自动化测试体系的完整方案。主要内容包括: 环境搭建:Python 3.8+虚拟环境配置,安装pytest、Selenium等核心测试库 分层测试实现: 单元测试:通过计算器示例演示pytest断言和异常测试 API测试:使用requests库进行RESTful接口验证 UI测试:Selenium WebDriver实现网页交互测试 高级特性: 使用fixture管理测试依赖 参数化实现数据驱动测试 生成HTML和Allure测试报告 GitH

m0_64424835的博客 448

逆序数 技巧题

A permutation of size n is an array of size n such that each integer from 1 to n occurs exactly once in this array. An inversion in a permutation p is a pair of indices (i, j) such that i > j and...

weixin_33674976的博客 327

Ollama部署本地大模型详细教程

创建ModelfilePARAMETER num_gpu 50 # GPU 层卸载比例(0~100)场景是否推荐本地开发/测试 Agent✅ 强烈推荐内部知识库问答(RAG)✅ 推荐(配合 Pgvector)生产环境高并发服务⚠️ 谨慎(建议评估 vLLM / Triton)需要 Function Calling 的 Agent❌ 不推荐(改用 DashScope API)🔑核心价值Ollama 是“本地大模型的 Docker”——让开源模型像容器一样 easy to run。

我们的征途是星辰大海 2614

VMwareWorkstation安装UOS系统(1070版本)教程

UOS系统是一款国产信创操作系统。目前市面上主流的系统版本是1070,下面我们用虚拟机来安装一下这款系统。

欲买桂花同载酒的博客 4290

Codeforces911 D. Inversion Counting(逆序数)

题目链接:http://codeforces.com/problemset/problem/911/D D. Inversion Counting A permutation of size n is an array of size n such that each integer from 1 to n occurs exactly once in this array. An inver...

FFOYeah的博客 462

高级Salesforce开发面试题

自定义设置允许您创建自定义数据集,以及为组织、配置文件或特定用户创建和关联自定义数据。自定义元数据类似于自定义设置,但是自定义元数据类型中的记录被视为元数据而不是数据。自定义设置有列表和层次自定义设置两种。自定义元数据中没有此类类型。此外,自定义元数据不支持基于用户配置文件或特定用户的层次结构类型的数据。自定义设置现在不再支持关系字段。但您可以在自定义元数据对象之间创建查找。元数据查询不占用查询sql次数的限制。

weixin_45663522的博客 1238

Educational Codeforces Round 57 (Rated for Div. 2)F. Inversion Expectation【期望逆序对】

F. Inversion Expectation time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A permutation of sizennis an array of sizennsuch tha...

微微风簇浪,散作满河星 732

YOLO11实战 第001期-基于yolo11的CrowdHuman密集行人目标检测实战文档(yolo格式数据免费获取)

1.数据阶段在拥挤/遮挡场景下,使用crowdhuman数据集重训练后的yolo11,效果表现较好。crowdhuman数据集标签如下,有Head BBox、Visible BBox、Full BBox。如下图显示:数据集介绍CrowdHuman数据集是旷世发布的用于行人检测的数据集,图片数据大多来自于google搜索。CrowdHuman数据集数据量比较大,15000张,5000张,验证集4370张。训练集和验证集中共有470K个实例,约每张图片包含23个人,同时存在各种各样的遮挡。

深度学习算法工程师,专注于前沿算法研究与实战应用。在这里,我将分享深度学习领域的实战经验、优质数据集资源以及最新论文解读与精度分析,旨在与广大技术爱好者共同探索人工智能的奥秘,助力技术成长与创新。 2161

从XSA到Linux应用:Petalinux与Vitis的嵌入式开发全流程解析

本文详细解析了从XSA文件到Linux应用的嵌入式开发全流程,重点介绍了Petalinux与Vitis工具链的使用技巧和实战经验。通过XSA硬件描述、Petalinux工程搭建、系统镜像优化及Vitis开发配置等关键步骤,帮助开发者高效完成ZYNQ平台开发,解决常见问题并提升开发效率。

weixin_29195217的博客 191

C. The Third Problem Codeforces Round #804 (Div. 2)

You are given a permutation a1,a2,…,ana1,a2,…,an of integers from 00 to n−1n−1. Your task is to find how many permutations b1,b2,…,bnb1,b2,…,bn are similar to permutation aa.Two permutations aa and bb of size nn are considered similar if for all intervals

qq_61903556的博客 443

自定义View系列教程04--Draw源码分析及其实践

通过之前的详细分析,我们知道:在measure中测量了View的大小,在layout阶段确定了View的位置。 完成这两步之后就进入到了我们相对熟悉的draw阶段,在该阶段真正地开始对视图进行绘制。按照之前的惯例,我们来瞅瞅View中draw( )的源码 public void draw(Canvas canvas) { final int privateFlags = mPriv

谷哥的小弟 2万+

codeforces 911E 题解

E. Stack Sortingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's suppose you have an array a, a stack s (initially empty) and an array b (als

AngrySword的博客 765

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

D._Small_GCD题解(codeforces 911 div.2)

新建一个vector,进行因数分解,统计出所有的因数数量,那么假如枚举的第二个数是它,它对距离的贡献,就是之前有了的这些因数的数量,乘上现在这个数到右端点的距离,所以遍历这个数的因数,记为。然后我就去翻那道题的代码,顺便学了下这个小知识点,把代码一贴。的取值,容易发现,题意就是求数组中所有的三元组的较小两个数的gcd求和。从暴力的角度来看,可以两层for循环枚举i和j,求一次gcd,并且乘上。这样处理出所有的因数的贡献和,最后一步利用容斥,将因数的贡献。我维护不来,想照猫画虎也用容斥处理,但是失败了。

Fun_Total的博客 1436

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

Codeforces Round 911 (Div. 2) --- D题题解

给你一个数组,你可以在里面任选三个数ai aj ak,要求i j k 互不相同, 现定义一个函数f(a,b,c)=gcd(a,b),其中a 和 b为a,b,c中较小的两个。求f(a,b,c)的累加和。之前的个数因数为t的数有nums[num[arr[i]][j]]个,所以对于当前这个b来说他的a有nums[num[arr[i]][j]]个选择,然后乘以c能选择的个数。,因为对于 ai aj定了之后 ak可以是任意的(ak > ai, ak > aj),即k能选取的范围就是gcd(ai, aj)的次数。

weixin_73936404的博客 694

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

CodeForces - 911C - Three Garlands(思维+xjb乱搞+与其它题解不同的做法)

题目:戳戳戳 题意:一共有3盏灯,闪烁时间为分别k1,k2,k3,若开灯时间为x1,x2,x3, 则第1盏灯在x1,x1+k1,x1+2*k1,x1+3*k1 . . . 的时候发光,问能否找到一组x1,x2,x3使得任何1秒都有亮光 题解:(跟别的题解不一样)对于从max(x1,x2,x3)后的时间,每个时间点都是要选的,那么我们从其中max(x1,x2,x3)开始记为1节点,然后2...

Rotepad的博客 467

Educational Codeforces Round 35 (Rated for Div. 2)

传送门:http://codeforces.com/contest/911 A. Nearest Minimums 题意:和题目的名字一样,求最小的数的最近距离(保证最小的数字有2个以上) 思路:直接找最小值。然后记录没两个相邻的最小值的距离,求最小值。 #include #include #include #include #include #include using name

yyy_3y的博客 266

codeforce 911F

传送门:http://codeforces.com/problemset/problem/911/F题意: 给你一棵树,每次选两个点,答案加上这两个点的距离,然后删除其中一个点,重复直到只剩下一个点,求最大的答案及每次的操作 题解: (1)树的直径:树上最长的简单路径即为树的直径 (2)选择一个在直径外的点,与它距离最远的点一定是直径的两个端点之一 (3)每次从直径外找一个点,直

u011237384的专栏 345

Educational Codeforces Round 35 A B C D题解

= =

animalcoder 396

Codeforces Round 911

Codeforces Round 911

青少年趣味编程 1097

Codeforces Round 987

Codeforces Round 987

青少年趣味编程 1398

Codeforces Round 926

Codeforces Round 926

青少年趣味编程 1095

Codeforces Round 972

Codeforces Round 972

青少年趣味编程 1053

Codeforces Round 936

Codeforces Round 936

青少年趣味编程 995

Codeforces Round 988

Codeforces Round 988

青少年趣味编程 1489
上一篇: ACM 这一路走来
下一篇: 退役了
OneDay_pyf
博客等级 码龄10年 6粉丝 35原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值