Educational Codeforces Round 67 (Rated for Div. 2)

2023-11-10

contest链接


A. Stickers and Toys

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

Your favorite shop sells ?n Kinder Surprise chocolate eggs. You know that exactly ?s stickers and exactly ?t toys are placed in ?n eggs in total.

Each Kinder Surprise can be one of three types:

  • it can contain a single sticker and no toy;
  • it can contain a single toy and no sticker;
  • it can contain both a single sticker and a single toy.

But you don't know which type a particular Kinder Surprise has. All eggs look identical and indistinguishable from each other.

What is the minimum number of Kinder Surprise Eggs you have to buy to be sure that, whichever types they are, you'll obtain at least one sticker and at least one toy?

Note that you do not open the eggs in the purchasing process, that is, you just buy some number of eggs. It's guaranteed that the answer always exists.

Input

The first line contains the single integer ?T (1≤?≤1001≤T≤100) — the number of queries.

Next ?T lines contain three integers ?n, ?s and ?t each (1≤?≤1091≤n≤109, 1≤?,?≤?1≤s,t≤n, ?+?≥?s+t≥n) — the number of eggs, stickers and toys.

All queries are independent.

Output

Print ?T integers (one number per query) — the minimum number of Kinder Surprise Eggs you have to buy to be sure that, whichever types they are, you'll obtain at least one sticker and one toy

 

就是问在已知物品总数和toy数还有sticker数的时候,求各要一个时候的最少购买的物品总数。

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <limits>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#define lowbit(x) ( x&(-x) )
#define pi 3.141592653589793
#define e 2.718281828459045
#define INF 0x3f3f3f3f
#define HalF (l + r)>>1
#define lsn rt<<1
#define rsn rt<<1|1
#define Lson lsn, l, mid
#define Rson rsn, mid+1, r
#define QL Lson, ql, qr
#define QR Rson, ql, qr
#define myself rt, l, r
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
int N, S, T;
int main()
{
    int Cas; scanf("%d", &Cas);
    while(Cas--)
    {
        scanf("%d%d%d", &N, &S, &T);
        printf("%d\n", max(N - S, N - T) + 1);
    }
    return 0;
}

B. Letters Shop

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

The letters shop showcase is a string ?s, consisting of ?n lowercase Latin letters. As the name tells, letters are sold in the shop.

Letters are sold one by one from the leftmost to the rightmost. Any customer can only buy some prefix of letters from the string ?s.

There are ?m friends, the ?i-th of them is named ??ti. Each of them is planning to estimate the following value: how many letters (the length of the shortest prefix) would s/he need to buy if s/he wanted to construct her/his name of bought letters. The name can be constructed if each letter is presented in the equal or greater amount.

  • For example, for ?s="arrayhead" and ??ti="arya" 55 letters have to be bought ("arrayhead").
  • For example, for ?s="arrayhead" and ??ti="harry" 66 letters have to be bought ("arrayhead").
  • For example, for ?s="arrayhead" and ??ti="ray" 55 letters have to be bought ("arrayhead").
  • For example, for ?s="arrayhead" and ??ti="r" 22 letters have to be bought ("arrayhead").
  • For example, for ?s="arrayhead" and ??ti="areahydra" all 99 letters have to be bought ("arrayhead").

It is guaranteed that every friend can construct her/his name using the letters from the string ?s.

Note that the values for friends are independent, friends are only estimating them but not actually buying the letters.

Input

The first line contains one integer ?n (1≤?≤2⋅1051≤n≤2⋅105) — the length of showcase string ?s.

The second line contains string ?s, consisting of exactly ?n lowercase Latin letters.

The third line contains one integer ?m (1≤?≤5⋅1041≤m≤5⋅104) — the number of friends.

The ?i-th of the next ?m lines contains ??ti (1≤|??|≤2⋅1051≤|ti|≤2⋅105) — the name of the ?i-th friend.

It is guaranteed that ∑?=1?|??|≤2⋅105∑i=1m|ti|≤2⋅105.

Output

For each friend print the length of the shortest prefix of letters from ?s s/he would need to buy to be able to construct her/his name of them. The name can be constructed if each letter is presented in the equal or greater amount.

It is guaranteed that every friend can construct her/his name using the letters from the string ?s.

 

这题给我的第一印象就是需要我们去手写一个二分了。还不需要排序,因为是给好的顺序。

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <limits>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#define lowbit(x) ( x&(-x) )
#define pi 3.141592653589793
#define e 2.718281828459045
#define INF 0x3f3f3f3f
#define HalF (l + r)>>1
#define lsn rt<<1
#define rsn rt<<1|1
#define Lson lsn, l, mid
#define Rson rsn, mid+1, r
#define QL Lson, ql, qr
#define QR Rson, ql, qr
#define myself rt, l, r
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int maxN = 2e5 + 7;
struct node
{
    int a[26], id;
    node() { memset(a, 0, sizeof(a)); id = 0; }
    node(int x[]) { for(int i=0; i<26; i++) a[i] = x[i]; }
    friend bool operator < (node e1, node e2)
    {
        bool flag = true;
        for(int i=0; i<26; i++) if(e1.a[i] > e2.a[i]) { flag = false; break; }
        return flag;
    }
}t[maxN];
bool cmp(node e1, node e2)
{
    bool flag = true;
    for(int i=0; i<26; i++) if(e1.a[i] > e2.a[i]) { flag = false; break; }
    return flag;
}
int N, M, a[26], tmp[26];
char s[maxN],q[maxN];
int erfen()
{
    int L = 1, R = N, mid = 0, ans = N;
    while(L <= R)
    {
        mid = (L + R)>>1;
        bool flag = true;
        for(int i=0; i<26; i++) if(t[mid].a[i] < tmp[i]) { flag = false; break; }
        if(flag)
        {
            R = mid - 1;
            ans = mid;
        }
        else L = mid + 1;
    }
    return ans;
}
int main()
{
    scanf("%d", &N);
    scanf("%s", s + 1);
    memset(a, 0, sizeof(a));
    for(int i=1; i<=N; i++)
    {
        t[i] = t[i-1];
        ++t[i].id;
        t[i].a[s[i] - 'a']++;
    }
    scanf("%d", &M);
    while(M--)
    {
        scanf("%s", q + 1);
        memset(tmp, 0, sizeof(tmp));
        int len = (int)strlen(q + 1);
        for(int i=1; i<=len; i++) tmp[q[i] - 'a']++;
        printf("%d\n", erfen());
    }
    return 0;
}

 


C. Vasya And Array

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Vasya has an array ?1,?2,…,??a1,a2,…,an.

You don't know this array, but he told you ?m facts about this array. The ?i-th fact is a triple of numbers ??ti, ??li and ??ri (0≤??≤1,1≤??<??≤?0≤ti≤1,1≤li<ri≤n) and it means:

  • if ??=1ti=1 then subbarray ???,???+1,…,???ali,ali+1,…,ari is sorted in non-decreasing order;
  • if ??=0ti=0 then subbarray ???,???+1,…,???ali,ali+1,…,ari is not sorted in non-decreasing order. A subarray is not sorted if there is at least one pair of consecutive elements in this subarray such that the former is greater than the latter.

For example if ?=[2,1,1,3,2]a=[2,1,1,3,2] then he could give you three facts: ?1=1,?1=2,?1=4t1=1,l1=2,r1=4 (the subarray [?2,?3,?4]=[1,1,3][a2,a3,a4]=[1,1,3] is sorted), ?2=0,?2=4,?2=5t2=0,l2=4,r2=5 (the subarray [?4,?5]=[3,2][a4,a5]=[3,2] is not sorted), and ?3=0,?3=3,?3=5t3=0,l3=3,r3=5 (the subarray [?3,?5]=[1,3,2][a3,a5]=[1,3,2] is not sorted).

You don't know the array ?a. Find any array which satisfies all the given facts.

Input

The first line contains two integers ?n and ?m (2≤?≤1000,1≤?≤10002≤n≤1000,1≤m≤1000).

Each of the next ?m lines contains three integers ??ti, ??li and ??ri (0≤??≤1,1≤??<??≤?0≤ti≤1,1≤li<ri≤n).

If ??=1ti=1 then subbarray ???,???+1,…,???ali,ali+1,…,ari is sorted. Otherwise (if ??=0ti=0) subbarray ???,???+1,…,???ali,ali+1,…,ari is not sorted.

Output

If there is no array that satisfies these facts in only line print NO (in any letter case).

If there is a solution, print YES (in any letter case). In second line print ?n integers ?1,?2,…,??a1,a2,…,an (1≤??≤1091≤ai≤109) — the array ?a, satisfying all the given facts. If there are multiple satisfying arrays you can print any of them.

 

这题是个构造问题,发现N不是很大,说明我们可以去走一个O(N * M)的时间来做,然后直接这样,如果要求是1的话,把这个区间直接弄成相等,要是这个区间不做要求,就按连续下降来写。

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <limits>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#define lowbit(x) ( x&(-x) )
#define pi 3.141592653589793
#define e 2.718281828459045
#define INF 0x3f3f3f3f
#define HalF (l + r)>>1
#define lsn rt<<1
#define rsn rt<<1|1
#define Lson lsn, l, mid
#define Rson rsn, mid+1, r
#define QL Lson, ql, qr
#define QR Rson, ql, qr
#define myself rt, l, r
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int maxN = 1e3 + 7;
int N, M, tot, lazy[maxN], ans[maxN];
struct node
{
    int l, r;
    node(int a=0, int b=0):l(a), r(b) {}
}q[maxN];
int main()
{
    tot = 0;
    scanf("%d%d", &N, &M);
    for(int i=1, op, l, r; i<=M; i++)
    {
        scanf("%d%d%d", &op, &l, &r);
        if(op)
        {
            for(int i = l + 1; i <= r; i++) lazy[i] = 1;
        }
        else
        {
            q[++tot] = node(l, r);
        }
    }
    ans[0] = N + 1;
    for(int i=1; i<=N; i++)
    {
        if(lazy[i]) ans[i] = ans[i-1];
        else ans[i] = ans[i-1] - 1;
    }
    for(int i=1; i<=tot; i++)
    {
        if(ans[q[i].l] == ans[q[i].r]) { printf("NO\n"); return 0; }
    }
    printf("YES\n");
    for(int i=1; i<=N; i++) printf("%d%c", ans[i], i == N ? '\n' : ' ');
    return 0;
}

 


E. Tree Painting

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

You are given a tree (an undirected connected acyclic graph) consisting of ?n vertices. You are playing a game on this tree.

Initially all vertices are white. On the first turn of the game you choose one vertex and paint it black. Then on each turn you choose a white vertex adjacent (connected by an edge) to any black vertex and paint it black.

Each time when you choose a vertex (even during the first turn), you gain the number of points equal to the size of the connected component consisting only of white vertices that contains the chosen vertex. The game ends when all vertices are painted black.

Let's see the following example:

Vertices 11 and 44 are painted black already. If you choose the vertex 22, you will gain 44 points for the connected component consisting of vertices 2,3,52,3,5 and 66. If you choose the vertex 99, you will gain 33 points for the connected component consisting of vertices 7,87,8 and 99.

Your task is to maximize the number of points you gain.

Input

The first line contains an integer ?n — the number of vertices in the tree (2≤?≤2⋅1052≤n≤2⋅105).

Each of the next ?−1n−1 lines describes an edge of the tree. Edge ?i is denoted by two integers ??ui and ??vi, the indices of vertices it connects (1≤??,??≤?1≤ui,vi≤n, ??≠??ui≠vi).

It is guaranteed that the given edges form a tree.

Output

Print one integer — the maximum number of points you gain if you will play optimally.

 

这道题挺难的,要推一个换树的根的树形DP的转移方程,结果可以看成S + N - 2 * size[v];S是父亲节点作为根时候的获得的值的大小。

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <limits>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#define lowbit(x) ( x&(-x) )
#define pi 3.141592653589793
#define e 2.718281828459045
#define INF 0x3f3f3f3f
#define HalF (l + r)>>1
#define lsn rt<<1
#define rsn rt<<1|1
#define Lson lsn, l, mid
#define Rson rsn, mid+1, r
#define QL Lson, ql, qr
#define QR Rson, ql, qr
#define myself rt, l, r
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int maxN = 2e5 + 7;
int N, head[maxN], cnt, siz[maxN];
struct Eddge
{
    int nex, to;
    Eddge(int a=-1, int b=0):nex(a), to(b) {}
}edge[maxN<<1];
inline void addEddge(int u, int v)
{
    edge[cnt] = Eddge(head[u], v);
    head[u] = cnt++;
}
inline void _add(int u, int v) { addEddge(u, v); addEddge(v, u); }
ll ans = 0, all = 0;
inline void pre_dfs(int u, int fa)
{
    siz[u] = 1;
    for(int i=head[u], v; ~i; i=edge[i].nex)
    {
        v = edge[i].to;
        if(v == fa) continue;
        pre_dfs(v, u);
        siz[u] += siz[v];
    }
    all += siz[u];
}
inline void dfs(int u, int fa, ll s)
{
    if(s > ans) ans = s;
    for(int i=head[u], v; ~i; i=edge[i].nex)
    {
        v = edge[i].to;
        if(v == fa) continue;
        dfs(v, u, s + N - 2 * siz[v]);
    }
}
inline void init()
{
    cnt = 0;
    memset(head, -1, sizeof(head));
}
int main()
{
    scanf("%d", &N);
    init();
    for(int i=1, u, v; i<N; i++)
    {
        scanf("%d%d", &u, &v);
        _add(u, v);
    }
    if(N == 2) { printf("3\n"); return 0; }
    if(N == 3) { printf("6\n"); return 0; }
    pre_dfs(1, 0);
    dfs(1, 0, all);
    printf("%lld\n", ans);
    return 0;
}

 

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

Educational Codeforces Round 67 (Rated for Div. 2) 的相关文章

  • NYOJ 586 疯牛 & POJ 2456(二分搜索 + 贪心)

    疯牛 时间限制 1000 ms 内存限制 65535 KB 难度 4 描述 农夫 John 建造了一座很长的畜栏 它包括N 2 lt N lt 100 000 个隔间 这些小隔间依次编号为x1 xN 0 lt xi lt 1 000 000
  • 动态动态规划(DDP)

    1 Problem E Codeforces 一 题目大意 给你一个无向图 第i和i 1条边的权值是w i 问你每个点不在自己原本的点的代价是多少 会有q组询问 表示修改第i条边的权值 二 解题思路 可以观察到 完成这个操作需要每条边经过两
  • 璀璨光滑【牛客】【题意解析+BFS+贪心】

    题目链接 中文题意 表面平静 实则暗藏玄机 而打开本题的突破口 也确确实实就在于题目的描述 也就是说 这张图的边的数目是确定的 并且这是一张连通图 而且图上的个点每个点连接出去的边的数目都是条 因为每个数都刚好只与个数在二进制位上差1 那么
  • 1500*B. The Walkway(贪心&规律)

    解析 把每个区间段分成左闭右开区间 我们可以观察到 每个区间的饼干数量为 r l d 上取整 所以先计算不删除某个点的饼干总和init 然后遍历所有点 将这个点删除 所以删除某个点后剩余数量为 找出最小值并且统计数量 需要注意的是 因为如果
  • Codeforces Round #553 (Div. 2)

    A Maxim and Biology time limit per test 1 second memory limit per test 256 megabytes input standard input output standar
  • 2605. 从两个数字数组里生成最小数字

    文章目录 Tag 题目来源 题目解读 解题思路 方法一 枚举比较法 方法二 集合的位运算表示法 写在最后 Tag 贪心 位运算 数组 题目来源 2605 从两个数字数组里生成最小数字 题目解读 给定两个各自只包含数字 1 到 9 的两个数组
  • Pineapple Incident【Codeforces 697 A】

    Codeforces Round 362 Div 2 A 简单题 include
  • Stall Reservations POJ - 3190

    这道题 是学长给我们布置的学习用的题目 重在给我们讲解了什么是优先队列以及其对应的贪心问题 好了 先送上 中文翻译过的题意 手动 滑稽 Oh those picky N 1 lt N lt 50 000 cows They are so p
  • 【前后缀 + 推公式整理】 Codeforces Round #813 (Div. 2) D. Empty Graph

    题意 给定 n n n 个点的点权 a i a i ai 这 n
  • 1400*C. No Prime Differences(找规律&数学)

    解析 由于 1 不是质数 所以我们令每一行的数都相差 1 对于行间 分为 n m之中有存在偶数和都为奇数两种情况 如果n m存在偶数 假设m为偶数 如果都为奇数 则 include
  • ArabellaCPC 2019 I:Bashar and Hamada 贪心

    Bashar and Hamada 给你一个长度为 n 的数组 选k个数 使F ai aj k个数 i j 求k 2 3 n时 F的最大值 首先n 2时 肯定选择数组中的最大值和最小值 这样F2 max min F2最大 n 3时 在F2的
  • 1096C - Polygon for the Angle-几何-性质

    思路 根 据 几 何 性 质 正 多 边 形 所 有 三 个 点组成的 角 都 是最小角的倍数 然后根据内角公式 可以求出 正多边形 最小角为 多边形内角 n 2 然后 打表发现 180边形最小角为1 最大角 178 所以 只有 179无法
  • 贪心——字典序最小问题

    https vjudge net problem POJ 3617 题目简单理解就是 给定长度为N的字符串为S 要构造一个长度为N的字符串T 起初 T 是一个空串 随后反复进行下列任意操作 从S的头部删除一个字符串 加到T的尾部 从S的尾部
  • LeetCode-1775. 通过最少操作次数使数组的和相等【贪心,数组,计数】

    LeetCode 1775 通过最少操作次数使数组的和相等 贪心 数组 计数 题目描述 解题思路一 让sum1
  • 1600*D. Road Map(数学

    解析 记录每个点的父节点和子节点 从新的根节点开始遍历 遍历所有的非父结点即可 include
  • How far away ? 【HDU - 2586】【DFS+链式前向星优化】

    题目链接 其实这道题可以不用链式前向星优化换做vector lt gt 也是可以跑的 只是会许会慢些而已 来换个中文题意好读些 勇气小镇是一个有着n个房屋的小镇 为什么把它叫做勇气小镇呢 这个故事就要从勇气小镇成立的那天说起了 修建小镇的时
  • Educational Codeforces Round 149 (Rated for Div. 2)A~D

    Grasshopper on a Line 题意 给出n和k 求从0到n最少走几步 以及步长 要求步长不能整除k 思路 从n往下找到 k不等于0的数 输出该数和n 该数即可 如果n k 0 那就只需要一步 代码 gt File Name a
  • 编程之美2015初赛第二场AB

    题目1 扑克牌 时间限制 2000ms 单点时限 1000ms 内存限制 256MB 描述 一副不含王的扑克牌由52张牌组成 由红桃 黑桃 梅花 方块4组牌组成 每组13张不同的面值 现在给定52张牌中的若干张 请计算将它们排成一列 相邻的
  • [POI2007]砝码Odw

    看这数据范围就不太可DP的样子 考虑贪心 首先注意到题目里有对于任意两个砝码其中一个是另一个质量整数倍的条件 所以砝码质量的种类不超过log INF 考虑按质量从小到大把砝码往容器里放 这样的话所有的砝码和容器的质量都可以除以当前砝码质量然
  • Match Points【Codeforces 1156C】【二分答案】

    题目链接 题意有点像上海EC某年的一道铜牌题 具体是哪年记不得了 我们要去N个的关系 使得最多的匹配对达到他们的差值 Z 这样的情况 有这样的一组数据可以很好的反映这道题为什么有人会WA了 4 3 1 4 5 7 但是 同时也证明了 我们取

随机推荐

  • 科目一考试系统服务器奔溃,科目一错误率最高的题 学员都崩溃了

    2017 02 28 09 07 59 做错这种基础题目的时候 与其有时间责怪出题人套路太深 不如反省一下自己为什么做题的时候没有多看选项一眼 在学习科目一的时候 很多学员都对科目一的题目感到头疼 有的是因为交通法规太难背 有的是对绕人的题
  • css video 样式,使用CSS修改 video 标签默认样式

    使用CSS修改 video 标签默认样式 时间 2019 11 08 17 42 14 来源 作者 效果展示 1 模拟直播 去除进度条 当前观看时间 剩余时间 效果 2 去除 video 标签全部控件 效果 Tags CSS 点击 评论 声
  • 10x倍加速PDE的AI求解:元自动解码器求解参数化偏微分方程

    研究背景 科学和工程中的许多应用需要求解具有不同方程系数 不同边界条件甚至不同求解域形状的偏微分方程 Partial Differential Equation PDE 即需要求解一个方程族而不是单个方程 这类应用经常在反问题求解 控制和优
  • 关于RxJava最友好的文章

    本篇文章已授权微信公众号 guolin blog 郭霖 独家发布 RxJava到底是什么 让我们直接跳过官方那种晦涩的追求精确的定义 其实初学RxJava只要把握两点 观察者模式和异步 就基本可以熟练使用RxJava了 异步在这里并不需要做
  • urllib.request.urlopen详解

    视频链接https www bilibili com video BV1Us41177P1 p 2 requests get详解见 https blog csdn net qq 41845823 article details 119516
  • 基于Multisim的四人抢答器设计与仿真

    功能 1 抢答器最多可供4名选手参赛 编号为1 4号 各队对应用一个按钮S1 S4中一个控制 并设置一个清零和抢答控制开关S5 该开关由主持人控制 2 抢答器具有锁存功能 直到主持人 清零 3 开关S作为清零及抢答控制开关 由主持人控制 当
  • 关于Navicat 报错1251连接不成功Mysql

    使用Navicat 连接数据库时候出现1251错误 解决方法 1 首先打开mysql exe 然后输入密码 mysql exe可以在安装的位置搜索一下 2 输入ALTER USER root localhost IDENTIFIED WIT
  • C#WinForm界面: 使用IrisSkin4实现美化换肤

    记录IrisSkin4应用过程 方便以后参考 步骤一 在网上下载IrisSkin4 dll和它的皮肤文件 步骤二 复制以下两个文件到winfrom项目的Debug文件夹下 步骤三 引用IrisSkin4 dll文件 步骤四 在工具箱空白处点
  • 数字图像处理(冈萨雷斯 第三版)

    1 1 图像与图像处理的概念 图像 Image 使用各种观测系统以不同形式和手段观测客观世界而获得的 可以直接或间接作用于人眼并进而产生视觉的实体 包括 各类图片 如普通照片 X光片 遥感图片 各类光学图像 如电影 电视画面 客观世界在人们
  • MySQL——索引详解

    目录 一 为什么要有索引 二 什么是索引 三 索引的原理 四 MySQL的存储引擎 五 索引的数据结构 六 聚簇和非聚簇索引 七 索引的设计原则 一 为什么要有索引 一般的应用系统 读写比例在10 1左右 而且插入操作和一般的更新操作很少出
  • 系统分析中的决策问题

    例如你设计一个图书馆系统支持用户预订被借出的书籍 有两个解决方案 一是 每一本书被归还时校验是否有人预订 如有预订则以某种方式如短信等通知预订客户 同时书籍做另类处理不会被流入馆内以节省时间 但是问题是预订的客户要来走一个预订的流程即管理员
  • 【B站】动态规划学习

    https www bilibili com video BV1ET4y1U7T6 p 6 spm id from pageDriver 暴力递归到动态规划 测试用例 include
  • 基于STM32F103C8T6的超声波模拟雷达设计。【C8T6最小系统板+标准固件库+1.8‘TFT-LCD屏】

    前言 之前为做毕设一直在网上浏览关于STM32单片机的DIY项目 大多数设计都是关于智能家居方面的应用 通过浏览不同平台的内容发现了一个采用超声波测距并通过屏幕反馈障碍物位置的模拟雷达设计 感觉很有创意 但网上关于此项目的内容大多都是采用a
  • 手撕 AVL 树——C++ 高阶数据结构详解

    目录 传统艺能 概念 AVL 树结构定义 数据插入 AVL 树旋转 左单旋 右单旋 左右双旋 右左双旋 验证 AVL 树 查找 删除 传统艺能 小编是双非本科大一菜鸟不赘述 欢迎各位指点江山 期待 QQ 1319365055 此前博客点我
  • 四、FTP服务

    四 FTP服务 FTP服务是Internet上最早应用于主机之间进行数据传输的基本服务之一 是目前Internet上使用最广泛的文件传送协议 FTP概述 ftp是典型的C S架构的应用层传输协议 需要由服务端软件 客户端软件两个部分共同实现
  • TCP是怎么处理长连接、短连接

    TCP 协议是一种面向连接的协议 即在通信双方之间建立连接后才能开始传输数据 TCP 协议通过三次握手建立连接 在连接建立后就可以保持长时间的连接 以实现长连接 在 TCP 协议中 数据被分成多个数据包进行传输 每个数据包都有序号和确认应答
  • mac idea spark运行报错WARN Utils: Service ‘sparkDriver‘ could not bind on port 0. Attempting port 1.

    报错截图如下 在hosts里加入 本机ip 机器名 如 192 168 22 22 centos7 解决 原因是sparkDriver会根据主机名去找地址 找不到就报错 增加环境变量即可 SPARK LOCAL IP 127 0 0 1 也
  • efficientdet在gpu训练好的模型无法再cpu上使用

    AssertionError The NVIDIA driver on your system is too old found version 9010 Please update your GPU driver by downloadi
  • hdu 1069 Monkey and Banana

    Problem acm hdu edu cn showproblem php pid 1069 Reference www cnblogs com kuangbin archive 2011 08 04 2127291 html 题意 给
  • Educational Codeforces Round 67 (Rated for Div. 2)

    contest链接 A Stickers and Toys time limit per test 2 seconds memory limit per test 256 megabytes input standard input out