Codeforces Round 881 (Div. 3) 题解

2023-11-07

目录

A. Sasha and Array Coloring

题意:

思路:

代码:

B. Long Long

题意:

思路:

代码:

C. Sum in Binary Tree

题意:

思路:

代码:

D. Apple Tree(树形dp)

题意:

思路:

代码:

E. Tracking Segments(二分答案)

题意:

思路:

代码:

F1. Omsk Metro (simple version)(树形dp)

题意:

思路:

代码:


A. Sasha and Array Coloring

Sasha found an array a consisting of n integers and asked you to paint elements.

You have to paint each element of the array. You can use as many colors as you want, but each element should be painted into exactly one color, and for each color, there should be at least one element of that color.

The cost of one color is the value of max(S)−min(S) where S is the sequence of elements of that color. The cost of the whole coloring is the sum of costs over all colors.

For example, suppose you have an array a=[1,5,6,3,4], and you painted its elements into two colors as follows: elements on positions 1, 2 and 5 have color 11; elements on positions 3 and 4 have color 2. Then:

  • the cost of the color 1 is max([1,5,4])−min([1,5,4])=5−1=4
  • the cost of the color 2 is max([6,3])−min([6,3])=6−3=3;
  • the total cost of the coloring is 7.

For the given array a, you have to calculate the maximum possible cost of the coloring.

Input

The first line contains one integer t (1≤t≤1000) — the number of test cases.

The first line of each test case contains a single integer n (1≤n≤50) — length of a.

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

Output

For each test case output the maximum possible cost of the coloring.

Example

input

6

5

1 5 6 3 4

1

5

4

1 6 3 9

6

1 13 9 3 7 2

4

2 2 2 2

5

4 5 2 2 3

output

7
0
11
23
0
5

题意:

给一个数组,拆分成若干个子序列,求所有子序列最大值减最小值的和

思路:

贪心,每次选最大的和最小的两个数组成一个子序列

代码:

#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cout<<#x<<'='<<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF=0x3f3f3f3f;

#define int long long
void solve(){
    int n;
    cin>>n;
    int ans=0;
    vector<int>a(n+1);
    for(int i=1;i<=n;i++)cin>>a[i];
    sort(a.begin()+1,a.end());
    for(int i=1;i<=n;i++){
        int l=i,r=n+1-i;
        if(l<r)ans+=a[r]-a[l];
        else break;
    }
    cout<<ans<<endl;
    return;
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int T=1;
    cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


B. Long Long

Today Alex was brought array a1,a2,…,an of length n. He can apply as many operations as he wants (including zero operations) to change the array elements.

In 11 operation Alex can choose any l and r such that 1≤l≤r≤n, and multiply all elements of the array from l to r inclusive by −1−1. In other words, Alex can replace the subarray [al,al+1,…,ar] by [−al,−al+1,…,−ar] in 11 operation.

For example, let n=5, the array is [1,−2,0,3,−1], l=2 and r=4, then after the operation the array will be [1,2,0,−3,−1].

Alex is late for school, so you should help him find the maximum possible sum of numbers in the array, which can be obtained by making any number of operations, as well as the minimum number of operations that must be done for this.

Input

The first line contains a single integer t (1≤t≤104) — number of test cases. Then the descriptions of the test cases follow.

The first line of each test case contains one integer n (1≤n≤2⋅105) — length of the array.

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

It is guaranteed that the sum of n for all test cases does not exceed 2⋅105

Output

For each test case output two space-separated numbers: the maximum possible sum of numbers in the array and the minimum number of operations to get this sum.

Pay attention that an answer may not fit in a standard integer type, so do not forget to use 64-bit integer type.

Example

input

5

6

-1 7 -4 -2 5 -8

8

-1 0 0 -2 1 0 -3 0

5

2 -1 0 -3 -7

5

0 -17 0 1 0

4

-1 0 -2 -1

output

27 3
7 2
13 1
18 1
4 1

题意:

给一个序列,每次把一个区间内的数取相反数,求全部变正的最小次数和最后的元素和

思路:

贪心,从头开始,如果需要取反,则以当前点为起点往后尽可能延伸

代码:

#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cout<<#x<<'='<<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF=0x3f3f3f3f;

#define int long long
void solve(){
    int n;
    cin>>n;
    vector<int>a(n+1);
    for(int i=1;i<=n;i++)cin>>a[i];
    int ans=0;
    int cnt=0;
    int flag=0;
    for(int i=1;i<=n;i++){
        if(a[i]>0){
            flag=0;
            ans+=a[i];
        }
        else{
            ans-=a[i];
            if(flag==0&&a[i]<0){
                flag=1;
                cnt++;
            }
        }
    }
    cout<<ans<<' '<<cnt<<endl;
    return;
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int T=1;
    cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


C. Sum in Binary Tree

Vanya really likes math. One day when he was solving another math problem, he came up with an interesting tree. This tree is built as follows.

Initially, the tree has only one vertex with the number 11 — the root of the tree. Then, Vanya adds two children to it, assigning them consecutive numbers — 22 and 33, respectively. After that, he will add children to the vertices in increasing order of their numbers, starting from 22, assigning their children the minimum unused indices. As a result, Vanya will have an infinite tree with the root in the vertex 11, where each vertex will have exactly two children, and the vertex numbers will be arranged sequentially by layers.

Part of Vanya's tree.

Vanya wondered what the sum of the vertex numbers on the path from the vertex with number 11 to the vertex with number n in such a tree is equal to. Since Vanya doesn't like counting, he asked you to help him find this sum.

Input

The first line contains a single integer t (1≤t≤104) — the number of test cases.

This is followed by  t lines — the description of the test cases. Each line contains one integer n (1≤n≤1016) — the number of vertex for which Vanya wants to count the sum of vertex numbers on the path from the root to that vertex.

Output

For each test case, print one integer — the desired sum.

Example

input

6

3

10

37

1

10000000000000000

15

output

4
18
71
1
19999999999999980
26

题意:

对于一个完全二叉树,求根节点到n号节点的路径和

思路:

不断往上跳即可

代码:

#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cout<<#x<<'='<<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF=0x3f3f3f3f;

#define int long long
void solve(){
    int n;
    cin>>n;
    int ans=0;
    while(n!=1){
        ans+=n;
        n/=2;
    }
    cout<<ans+1<<endl;
    return;
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int T=1;
    cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


D. Apple Tree(树形dp)

Timofey has an apple tree growing in his garden; it is a rooted tree of n vertices with the root in vertex 1 (the vertices are numbered from 1 to n). A tree is a connected graph without loops and multiple edges.

This tree is very unusual — it grows with its root upwards. However, it's quite normal for programmer's trees.

The apple tree is quite young, so only two apples will grow on it. Apples will grow in certain vertices (these vertices may be the same). After the apples grow, Timofey starts shaking the apple tree until the apples fall. Each time Timofey shakes the apple tree, the following happens to each of the apples:

Let the apple now be at vertex u.

  • If a vertex u has a child, the apple moves to it (if there are several such vertices, the apple can move to any of them).
  • Otherwise, the apple falls from the tree.

It can be shown that after a finite time, both apples will fall from the tree.

Timofey has q assumptions in which vertices apples can grow. He assumes that apples can grow in vertices x and y, and wants to know the number of pairs of vertices (a, b) from which apples can fall from the tree, where a — the vertex from which an apple from vertex x will fall, b — the vertex from which an apple from vertex y will fall. Help him do this.

Input

The first line contains integer t (1≤t≤104) — the number of test cases.

The first line of each test case contains integer n (2≤n≤2⋅105) — the number of vertices in the tree.

Then there are n−1 lines describing the tree. In line i there are two integers ui and vi (1≤ui,vi≤n, ui≠vi) — edge in tree.

The next line contains a single integer q (1≤q≤2⋅105) — the number of Timofey's assumptions.

Each of the next q lines contains two integers xi and yi (1≤xi,yi≤n) — the supposed vertices on which the apples will grow for the assumption i.

It is guaranteed that the sum of n does not exceed 2⋅105. Similarly, It is guaranteed that the sum of q does not exceed 2⋅105.

Output

For each Timofey's assumption output the number of ordered pairs of vertices from which apples can fall from the tree if the assumption is true on a separate line.

Examples

input

2

5

1 2

3 4

5 3

3 2

4

3 4

5 1

4 4

1 3

3

1 2

1 3

3

1 1

2 3

3 1

output

2
2
1
4
4
1
2

题意:

给一棵有根树,树上有两个苹果,沿着儿子往下掉落,最终位于叶子,求可能的掉落位置数对(pos1,pos2)的个数

思路:

树形dp,dfs统计每个点形成的子树的根节点个数即可,边界为叶子节点(度为1判断)

每次询问,O(1) 计算每个苹果的掉落位置并相乘

代码:

#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cout<<#x<<'='<<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF=0x3f3f3f3f;

#define int long long
const int N=200005,M=200005;

int head[N],cntt=0;
struct Edge{
    int to,next,val;
}edge[2*M];
void add(int u,int v,int x){
    edge[++cntt].to=v;
    edge[cntt].val=x;
    edge[cntt].next=head[u];
    head[u]=cntt;
}

int dp[N],dis[N],du[N];
void dfs(int x){
    dp[x]=0;
    if(du[x]==1&&x!=1){
        dp[x]=1;
        return;
    }
    for(int i=head[x];i;i=edge[i].next){
        int y=edge[i].to;
        if(dis[y])continue;
        dis[y]=dis[x]+1;
        dfs(y);
        dp[x]+=dp[y];
    }
}
void solve(){
    int n;
    cin>>n;
    cntt=0;
    for(int i=1;i<=n;i++)head[i]=0,dis[i]=0,dp[i]=0,du[i]=0;
    for(int i=1;i<n;i++){
        int u,v;
        cin>>u>>v;
        du[u]++,du[v]++;
        add(u,v,1);
        add(v,u,1);
    }
    dis[1]=1;
    dfs(1);
    int q;
    cin>>q;
    while(q--){
        int u,v;
        cin>>u>>v;
        cout<<dp[u]*dp[v]<<endl;
    }
    return;
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int T=1;
    cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


E. Tracking Segments(二分答案)

You are given an array a consisting of n zeros. You are also given a set of m not necessarily different segments. Each segment is defined by two numbers li and ri (1≤li≤ri≤n) and represents a subarray ali,ali+1,…,ari of the array a.

Let's call the segment li,ri beautiful if the number of ones on this segment is strictly greater than the number of zeros. For example, if a=[1,0,1,0,1], then the segment [1,5] is beautiful (the number of ones is 3, the number of zeros is 2), but the segment [3,4] is not is beautiful (the number of ones is 1, the number of zeros is 1).

You also have q changes. For each change you are given the number 1≤x≤, which means that you must assign an element ax the value 1.

You have to find the first change after which at least one of m given segments becomes beautiful, or report that none of them is beautiful after processing all q changes.

Input

The first line contains a single integer t (1≤t≤104) — the number of test cases.

The first line of each test case contains two integers n and m (1≤m≤n≤105) — the size of the array a and the number of segments, respectively.

Then there are m lines consisting of two numbers li and ri (1≤li≤ri≤n) —the boundaries of the segments.

The next line contains an integer q (1≤q≤n) — the number of changes.

The following q lines each contain a single integer x (1≤x≤n) — the index of the array element that needs to be set to 1 It is guaranteed that indexes in queries are distinct.

It is guaranteed that the sum of n for all test cases does not exceed 105.

Output

For each test case, output one integer  — the minimum change number after which at least one of the segments will be beautiful, or −1 if none of the segments will be beautiful.

Example

input

6

5 5

1 2

4 5

1 5

1 3

2 4

5

5

3

1

2

4

4 2

1 1

4 4

2

2

3

5 2

1 5

1 5

4

2

1

3

4

5 2

1 5

1 3

5

4

1

2

3

5

5 5

1 5

1 5

1 5

1 5

1 4

3

1

4

3

3 2

2 2

1 3

3

2

3

1

output

3
-1
3
3
3
1

题意:

给一个长为n的全为0的数组,给m个线段,有q次操作顺序执行,每次将位置x的数变成1

求满足 某一个线段 1的个数大于0的个数 的最小操作次数

思路:

发现操作次数具有单调性,可以二分答案,用前缀和预处理,可以O(1)求出 线段 中1的个数,暴力判断能否满足,复杂度为O(mlogq)

代码:

#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cout<<#x<<'='<<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF=0x3f3f3f3f;
#define int long long
const int N=100005;

int op[N],ans[N],l[N],r[N];
int n,m;

bool check(int x){
    vector<int>vis(n+1,0),pre(n+1,0);
    for(int i=1;i<=x;i++)vis[op[i]]=1;
    for(int i=1;i<=n;i++)pre[i]=pre[i-1]+vis[i];
    for(int i=1;i<=m;i++)
        if(pre[r[i]]-pre[l[i]-1]>=ans[i])return 1;
    return 0;
}

void solve(){
    cin>>n>>m;
    for(int i=1;i<=m;i++){
        cin>>l[i]>>r[i];
        ans[i]=(r[i]-l[i]+1)/2+1;
    }
    int q;
    cin>>q;
    for(int i=1;i<=q;i++)cin>>op[i];
    int l=1,r=q;
    while(l<r){
        int mid=(l+r)/2;
        if(check(mid))r=mid;
        else l=mid+1;
    }
    if(check(l)){
        cout<<l<<endl;
        return;
    }
    cout<<-1<<endl;
    return;
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int T=1;
    cin>>T;
    while(T--){
        solve();
    }
    return 0;
}


F1. Omsk Metro (simple version)(树形dp)

This is the simple version of the problem. The only difference between the simple and hard versions is that in this version u=1.

As is known, Omsk is the capital of Berland. Like any capital, Omsk has a well-developed metro system. The Omsk metro consists of a certain number of stations connected by tunnels, and between any two stations there is exactly one path that passes through each of the tunnels no more than once. In other words, the metro is a tree.

To develop the metro and attract residents, the following system is used in Omsk. Each station has its own weight x∈{−1,1}. If the station has a weight of −1−1, then when the station is visited by an Omsk resident, a fee of 11 burle is charged. If the weight of the station is 11, then the Omsk resident is rewarded with 11 burle.

Omsk Metro currently has only one station with number 11 and weight x=1. Every day, one of the following events occurs:

  • A new station with weight x is added to the station with number vi, and it is assigned a number that is one greater than the number of existing stations.
  • Alex, who lives in Omsk, wonders: is there a subsegment†† (possibly empty) of the path between vertices uand v such that, by traveling along it, exactly k burles can be earned (if k<0, this mens that k burles will have to be spent on travel). In other words, Alex is interested in whether there is such a subsegment of the path that the sum of the weights of the vertices in it is equal to k. Note that the subsegment can be empty, and then the sum is equal to 0.

You are a friend of Alex, so your task is to answer Alex's questions.

††Subsegment — continuous sequence of elements.

Input

The first line contains a single number t (1≤t≤104) — the number of test cases.

The first line of each test case contains the number n (1≤n≤2⋅105) — the number of events.

Then there are n lines describing the events. In the i-th line, one of the following options is possible:

  • First comes the symbol "+" (without quotes), then two numbers vi and xi (xi∈{−1,1}, it is also guaranteed that the vertex with number vi exists). In this case, a new station with weight xi is added to the station with number vi.
  • First comes the symbol "?" (without quotes), and then three numbers ui, vi, and ki (−n≤ki≤n). It is guaranteed that the vertices with numbers ui and vi exist. In this case, it is necessary to determine whether there is a subsegment (possibly empty) of the path between stations ui and vi with a sum of weights exactly equal to ki. In this version of the task, it is guaranteed that ui=1

It is guaranteed that the sum of n over all test cases does not exceed 2⋅105.

Output

For each of Alex's questions, output "Yes" (without quotes) if the subsegment described in the condition exists, otherwise output "No" (without quotes).

You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).

Examples

input

1

8

+ 1 -1

? 1 1 2

? 1 2 1

+ 1 1

? 1 3 -1

? 1 1 1

? 1 3 2

? 1 1 0

output

NO
YES
NO
YES
YES
YES

题意:

给一棵有根树,每次给定点 v,询问从根节点到 v 路径上的某个字段的和能否等于k

思路:

树形dp,我们发现每个点的值是1或-1,所以 所有字段和 形成的区间是连续的,中间不会出现断点,我们用dp数组记录当前点必须选的最值,用 mx/mn 记录整体最值,状态转移方程为dpmax[cnt]=max(x,dpmax[v]+x) ,每个点v能取的区间就是 [mn,mx] ,判断即可

代码:

#include<bits/stdc++.h>
#define endl '\n'
#define debug(x) cout<<#x<<'='<<x<<endl;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
const int INF=0x3f3f3f3f;

#define int long long

void solve(){
    int n;
    cin>>n;
    int cnt=1;
    vector<int>dpmax(n+10),dpmin(n+10),mx(n+10),mn(n+10);
    dpmax[1]=1;
    dpmin[1]=1;
    mx[1]=1;
    mn[1]=0;
    for(int _=1;_<=n;_++){
        char op;
        cin>>op;
        if(op=='+'){
            int v,x;
            cin>>v>>x;
            cnt++;
            dpmax[cnt]=max(x,dpmax[v]+x);
            dpmin[cnt]=min(x,dpmin[v]+x);
            mx[cnt]=max(mx[v],dpmax[cnt]);
            mn[cnt]=min(mn[v],dpmin[cnt]);
        }
        else{
            int u,v,x;
            cin>>u>>v>>x;
            //u=1
            if(x>=mn[v]&&x<=mx[v])cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }
    }
    return;
}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    int T=1;
    cin>>T;
    while(T--){
        solve();
    }
    return 0;
}

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Codeforces Round 881 (Div. 3) 题解 的相关文章

随机推荐

  • 在html5中播放RTSP/RTMP/HLS/HTTP视频流媒体的几种方案,并支持H.265

    经过多年的项目实战和研发经验的积累 总结了一下对于H5视频可视化在视频播放上如何做到无插件H5展示的方法 尤其是契合安防行业的方案 除了HTTP WebSocket类的传输协议 其他是无法通用地传输到浏览器的 所以 如果要做一款通用的H5视
  • PyPy 安装

    目录 前言 1 下载 2 安装 2 1 安装包解压缩 2 2 添加路径至系统变量 3 cmd 调用 4 对比 Python 3 8的界面 总结 前言 提示 这里可以添加本文要记录的大概内容 听说 PyPy 的纯 Python 环境的运行速度
  • mysql查询性能相关

    1 mysql innodb查询与什么因素有关 这张ppt说的相当详细 http tech uc cn wp content uploads 2013 10 MySQL Innodb E9 AB 98 E6 80 A7 E8 83 BD E
  • 【HTML】创建 <h2>-<h6> 标签

    任务描述 本关任务 依次创建 h2 h6 标签 文本内容为创建不同字体大小的标题 查看它们的区别 实现的效果如下 相关知识 第一关已经创建了h1标签 它是干什么的呢 它一般用来创建标题 另外 h2 也用来创建标题 它们有什么区别呢 h1的字
  • 快速掌握正则表达式

    文章目录 限定符 Qualifier 第一个常用限定符 第二个常用限定符 第三个常用限定符 或运算符 字符类 元字符 Meta characters d 数字字符 w 单词字符 空白符 s 任意字符 行首行尾 贪婪与懒惰匹配 Greedy
  • c++设计模式

    C 是一种面向对象的编程语言 支持许多设计模式 以下是几种常见的设计模式 1 单例模式 Singleton Pattern 确保一个类只有一个实例 并提供一个全局访问点 来访问该实例 2 工厂模式 Factory Pattern 定义一个接
  • kafka笔记3--快速部署KRaft版本的kafka3.1.1

    kafka笔记3 快速部署KRaft版本的kafka3 1 1 1 介绍 2 部署测试 2 1 部署 2 2 测试 3 注意事项 4 说明 1 介绍 Apache Kafka Raft 是一种共识协议 它的引入是为了消除 Kafka 对 Z
  • 【Java愚公】gitlab设置中文

    gitlab设置中文 设置步骤 设置完成后效果图 设置步骤 gitlab版本自带了中文语言包 可以通过上述方式直接切换 设置流程说明如下 访问gitlab服务 在用户偏好设置中设置用户语言类别 如下图所示 设置完成后效果图
  • 【STM32】电子时钟(1)

    一直想系统的学习STM32 但是公司的项目主要是电机算法 每天看到头都快炸了 打算仿照手机上的时钟应用写一个电子时钟 因为这个任务的定位是 好吧 就没有定位 主要是边玩边学 也不设时间期限和具体的功能指标 有空了就搞搞 想到了什么就加上去
  • 成功解决Myeclipse2017破解时遇到的crack.bat文件闪退问题

    解决问题 解决Myeclipse2017破解时遇到的crack bat文件闪退问题 解决方法 是环境变量设置有错 1 新建系统环境变量 JAVA HOME D Program Files MyEclipse2017CI7 binary co
  • Linux 音视频开发杂记之一-环境配置使用vscode

    开发环境 开发环境选择window10 Visual Studio Code ubuntu20 64 虚拟机 一Windows 安装 1 安装git for windows 安装过程直接下一步 主要原因是windows OpenSSH在vs
  • Flutter - Route传参

    Navigator 组件支持通过使用通用标识符从应用程序的任何地方导航到特定路由 在某些情况下 你可能还希望能够传递参数给特定路由 例如 你希望导航到 user 路由并携带上用户信息 在 Flutter 中 你能通过提供额外的 argume
  • 博客使用方法

    这里写自定义目录标题 凯哥英语视频 欢迎使用Markdown编辑器 新的改变 功能快捷键 合理的创建标题 有助于目录的生成 如何改变文本的样式 插入链接与图片 如何插入一段漂亮的代码片 生成一个适合你的列表 创建一个表格 设定内容居中 居左
  • 数据模型所描述的内容包括三个部分:数据结构、数据操作、数据约束。

    http www cnblogs com joechinochl articles 5252518 html 数据模型所描述的内容包括三个部分 数据结构 数据操作 数据约束 1 数据结构 数据模型中的数据结构主要描述数据的类型 内容 性质以
  • 大数据毕业设计题目选题推荐

    文章目录 0 前言 1 如何选题 1 1 选题技巧 如何避坑 重中之重 1 2 为什么这么说呢 1 3 难度把控 1 4 题目名称 1 5 最后 2 大数据 选题推荐 2 1 大数据挖掘类 2 2 大数据处理 云计算 区块链 毕设选题 2
  • if语句c语言编程题,c语言if语句的练习题答案

    1 编写程序输入a和b 求a和b的余数和商 includevoid main int a b scanf printf 商为 d 余数为 d 2 输入一个整型数据 分别求出各位数字 如 469 则个位数是9 十位数是6 百位数 是4 inc
  • 某型雷达的报文收发实录

    某型雷达的报文收发实录 前言 工作中需要与某型激光雷达进行通讯 读写报文解析出相应的角度 位置 在目前的工作中 切实遇到的问题是报文的收发 这里记录之 以下内容尚未进过实践检验2020 6 20 激光雷达的报文的接收 使用的API为wins
  • matlab怎么搭建神经网络,matlab实现神经网络算法

    怎样用matlab建立bp神经网络 net train net p t 把这句改成net train net p t 试试 matlab应该默认使用列向量 或者直接使用matlab提供的图形界面取训练 在命令行输入nnstart 谷歌人工智
  • 递归求解迷宫问题

    package com yg recursion author GeQiLin date 2020 2 24 16 01 public class MiGong private static int col 7 private static
  • Codeforces Round 881 (Div. 3) 题解

    目录 A Sasha and Array Coloring 题意 思路 代码 B Long Long 题意 思路 代码 C Sum in Binary Tree 题意 思路 代码 D Apple Tree 树形dp 题意 思路 代码 E T