Codeforces Round #552 (Div. 3)

2023-11-08

A. Restoring Three Numbers

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Polycarp has guessed three positive integers ?a, ?b and ?c. He keeps these numbers in secret, but he writes down four numbers on a board in arbitrary order — their pairwise sums (three numbers) and sum of all three numbers (one number). So, there are four numbers on a board in random order: ?+?a+b, ?+?a+c, ?+?b+c and ?+?+?a+b+c.

You have to guess three numbers ?a, ?b and ?c using given numbers. Print three guessed integers in any order.

Pay attention that some given numbers ?a, ?b and ?c can be equal (it is also possible that ?=?=?a=b=c).

Input

The only line of the input contains four positive integers ?1,?2,?3,?4x1,x2,x3,x4 (2≤??≤1092≤xi≤109) — numbers written on a board in random order. It is guaranteed that the answer exists for the given number ?1,?2,?3,?4x1,x2,x3,x4.

Output

Print such positive integers ?a, ?b and ?c that four numbers written on a board are values ?+?a+b, ?+?a+c, ?+?b+c and ?+?+?a+b+c written in some order. Print ?a, ?b and ?c in any order. If there are several answers, you can print any. It is guaranteed that the answer exists.

Examples

input

Copy

3 6 5 4

output

Copy

2 1 3

input

Copy

40 40 40 60

output

Copy

20 20 20

input

Copy

201 101 101 200

output

Copy

1 100 100

签到题

#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 esp 1e-6
#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 a[5];
int main()
{
    for(int i=1; i<=4; i++) scanf("%d", &a[i]);
    sort(a + 1, a + 5);
    printf("%d %d %d\n", a[4] - a[1], a[4] - a[2], a[4] - a[3]);
    return 0;
}

B. Make Them Equal

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

You are given a sequence ?1,?2,…,??a1,a2,…,an consisting of ?n integers.

You can choose any non-negative integer ?D (i.e. ?≥0D≥0), and for each ??ai you can:

  • add ?D (only once), i. e. perform ??:=??+?ai:=ai+D, or
  • subtract ?D (only once), i. e. perform ??:=??−?ai:=ai−D, or
  • leave the value of ??ai unchanged.

It is possible that after an operation the value ??ai becomes negative.

Your goal is to choose such minimum non-negative integer ?D and perform changes in such a way, that all ??ai are equal (i.e. ?1=?2=⋯=??a1=a2=⋯=an).

Print the required ?D or, if it is impossible to choose such value ?D, print -1.

For example, for array [2,8][2,8] the value ?=3D=3 is minimum possible because you can obtain the array [5,5][5,5] if you will add ?D to 22 and subtract ?D from 88. And for array [1,4,7,7][1,4,7,7] the value ?=3D=3 is also minimum possible. You can add it to 11 and subtract it from 77 and obtain the array [4,4,4,4][4,4,4,4].

Input

The first line of the input contains one integer ?n (1≤?≤1001≤n≤100) — the number of elements in ?a.

The second line of the input contains ?n integers ?1,?2,…,??a1,a2,…,an (1≤??≤1001≤ai≤100) — the sequence ?a.

Output

Print one integer — the minimum non-negative integer value ?D such that if you add this value to some ??ai, subtract this value from some ??ai and leave some ??ai without changes, all obtained values become equal.

If it is impossible to choose such value ?D, print -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 esp 1e-6
#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 = 107;
int N, a[maxN], b[5];
set<int> st;
set<int>::iterator it;
int main()
{
    scanf("%d", &N);
    for(int i=1; i<=N; i++) { scanf("%d", &a[i]); st.insert(a[i]); }
    sort(a + 1, a + N + 1);
    if(st.size() == 1) printf("0\n");
    else if(st.size() == 2)
    {
        int ans = a[N] - a[1];
        if(ans & 1) printf("%d\n", ans);
        else printf("%d\n", ans>>1);
    }
    else if(st.size() == 3)
    {
        int i = 1;
        for(it = st.begin(); it!=st.end(); it++) b[i++] = *it;
        sort(b + 1, b + 4);
        if(b[2] - b[1] == b[3] - b[2]) printf("%d\n", b[3] - b[2]);
        else printf("-1\n");
    }
    else printf("-1\n");
    return 0;
}

C. Gourmet Cat

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Polycarp has a cat and his cat is a real gourmet! Dependent on a day of the week he eats certain type of food:

  • on Mondays, Thursdays and Sundays he eats fish food;
  • on Tuesdays and Saturdays he eats rabbit stew;
  • on other days of week he eats chicken stake.

Polycarp plans to go on a trip and already packed his backpack. His backpack contains:

  • ?a daily rations of fish food;
  • ?b daily rations of rabbit stew;
  • ?c daily rations of chicken stakes.

Polycarp has to choose such day of the week to start his trip that his cat can eat without additional food purchases as long as possible. Print the maximum number of days the cat can eat in a trip without additional food purchases, if Polycarp chooses the day of the week to start his trip optimally.

Input

The first line of the input contains three positive integers ?a, ?b and ?c (1≤?,?,?≤7⋅1081≤a,b,c≤7⋅108) — the number of daily rations of fish food, rabbit stew and chicken stakes in Polycarps backpack correspondingly.

Output

Print the maximum number of days the cat can eat in a trip without additional food purchases, if Polycarp chooses the day of the week to start his trip optimally.

贪心

  除了需要考虑几个周之后,我们对于剩下的材料,我们从周一~周日分别算作第一天开始,去跑最大值。

#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 esp 1e-6
#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;
#define MIN3(x, y, z) min(min(x, y), z)
const int week[7] = { 0, 1, 2, 0, 2, 1, 0 };
int a[3], b[3], minn, day;
int solve(int s)
{
    int ans = 0;
    for(int i=s, u; i<s+7; i++)
    {
        u = i % 7;
        if(b[week[u]]--) ans++;
        else break;
    }
    return ans;
}
int main()
{
    for(int i=0; i<3; i++) scanf("%d", &a[i]);
    minn = MIN3(a[0]/3, a[1]/2, a[2]/2);
    day += minn * 7;
    a[0] -= minn * 3;
    a[1] -= minn<<1;
    a[2] -= minn<<1;
    int tmp = 0;
    for(int i=0; i<7; i++)
    {
        for(int j=0; j<3; j++) b[j] = a[j];
        tmp = max(tmp, solve(i));
    }
    printf("%d\n", tmp + day);
    return 0;
}

D. Walking Robot

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

There is a robot staying at ?=0X=0 on the ??Ox axis. He has to walk to ?=?X=n. You are controlling this robot and controlling how he goes. The robot has a battery and an accumulator with a solar panel.

The ?i-th segment of the path (from ?=?−1X=i−1 to ?=?X=i) can be exposed to sunlight or not. The array ?s denotes which segments are exposed to sunlight: if segment ?i is exposed, then ??=1si=1, otherwise ??=0si=0.

The robot has one battery of capacity ?b and one accumulator of capacity ?a. For each segment, you should choose which type of energy storage robot will use to go to the next point (it can be either battery or accumulator). If the robot goes using the battery, the current charge of the battery is decreased by one (the robot can't use the battery if its charge is zero). And if the robot goes using the accumulator, the current charge of the accumulator is decreased by one (and the robot also can't use the accumulator if its charge is zero).

If the current segment is exposed to sunlight and the robot goes through it using the battery, the charge of the accumulator increases by one (of course, its charge can't become higher than it's maximum capacity).

If accumulator is used to pass some segment, its charge decreases by 1 no matter if the segment is exposed or not.

You understand that it is not always possible to walk to ?=?X=n. You want your robot to go as far as possible. Find the maximum number of segments of distance the robot can pass if you control him optimally.

Input

The first line of the input contains three integers ?,?,?n,b,a (1≤?,?,?≤2⋅1051≤n,b,a≤2⋅105) — the robot's destination point, the battery capacity and the accumulator capacity, respectively.

The second line of the input contains ?n integers ?1,?2,…,??s1,s2,…,sn (0≤??≤10≤si≤1), where ??si is 11 if the ?i-th segment of distance is exposed to sunlight, and 00 otherwise.

Output

Print one integer — the maximum number of segments the robot can pass if you control him optimally.

贪心

  我们在蓄电池没满电的时候遇到1优先充电,然后遇到0优先使用自身的电池,就是个贪心。

#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 esp 1e-6
#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;
#define MIN3(x, y, z) min(min(x, y), z)
const int maxN = 2e5 + 7;
int N, A, B, up, a[maxN];
int main()
{
    scanf("%d%d%d", &N, &B, &up); A = up;
    for(int i=1; i<=N; i++) scanf("%d", &a[i]);
    for(int i=1; i<=N; i++)
    {
        if(a[i])
        {
            if(up > A && B)
            {
                B--;
                A++;
            }
            else if(A == up) A--;
            else if(up > A && A) A--;
            else { printf("%d\n", i-1); return 0; }
        }
        else
        {
            if(A) A--;
            else if(B) B--;
            else { printf("%d\n", i-1); return 0; }
        }
    }
    printf("%d\n", N);
    return 0;
}

E. Two Teams

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

There are ?n students standing in a row. Two coaches are forming two teams — the first coach chooses the first team and the second coach chooses the second team.

The ?i-th student has integer programming skill ??ai. All programming skills are distinct and between 11 and ?n, inclusive.

Firstly, the first coach will choose the student with maximum programming skill among all students not taken into any team, and ?k closest students to the left of him and ?k closest students to the right of him (if there are less than ?k students to the left or to the right, all of them will be chosen). All students that are chosen leave the row and join the first team. Secondly, the second coach will make the same move (but all students chosen by him join the second team). Then again the first coach will make such move, and so on. This repeats until the row becomes empty (i. e. the process ends when each student becomes to some team).

Your problem is to determine which students will be taken into the first team and which students will be taken into the second team.

Input

The first line of the input contains two integers ?n and ?k (1≤?≤?≤2⋅1051≤k≤n≤2⋅105) — the number of students and the value determining the range of chosen students during each move, respectively.

The second line of the input contains ?n integers ?1,?2,…,??a1,a2,…,an (1≤??≤?1≤ai≤n), where ??ai is the programming skill of the ?i-th student. It is guaranteed that all programming skills are distinct.

Output

Print a string of ?n characters; ?i-th character should be 1 if ?i-th student joins the first team, or 2 otherwise.

数据结构+STL

  用了双set来做,一个存值,另一个存对应的连续位置,就是要捋清楚地址的继承性。

#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 esp 1e-6
#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 = 4e5 + 70;
set<int> num, pos;
set<int>::iterator it;
int a[maxN], b[maxN], N, K, ans[maxN];
int main()
{
    scanf("%d%d", &N, &K);
    for(int i=1; i<=N; i++)
    {
        scanf("%d", &a[i]);
        b[a[i]] = i;    //对应值的位置
        num.insert(i);   //插入值
        pos.insert(i);  //插入位子
    }
    int sum = 0, id, team = 2;
    while(sum < N)
    {
        team = team == 1 ? 2 : 1;
        it = --num.end();
        id = b[*it];
        ans[id] = team;
        it = pos.find(id);
        for(int i=1; i<=K; i++)
        {
            it = --num.end();
            id = b[*it];
            it = pos.find(id);
            if(it == pos.begin()) break;
            if(it == pos.end()) break;
            sum++;
            it--;
            ans[*it] = team;
            num.erase(a[*it]);
            pos.erase(it);
        }
        for(int i=1; i<=K; i++)
        {
            it = --num.end();
            id = b[*it];
            it = pos.find(id);
            if(it == pos.end()) break;
            if(it == --pos.end()) break;
            it++;
            if(it == pos.end()) break;
            sum++;
            ans[*it] = team;
            num.erase(a[*it]);
            pos.erase(*it);
        }
        sum++;
        it = --num.end();
        id = b[*it];
        num.erase(*it);
        pos.erase(id);
    }
    for(int i=1; i<=N; i++) printf("%d", ans[i]);
    printf("\n");
    return 0;
}

 

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

Codeforces Round #552 (Div. 3) 的相关文章

  • Codeforces Round #210 (Div. 2)

    本不想写 xff0c 毕竟就打了一个小时 xff08 训练题变成个人赛了T T xff09 xff0c 但是第一次水题4分钟搞定 xff0c 手速一点没涨 xff0c 纯粹就是脑子快 A Levko and Table 题意 xff1a 输
  • Codeforces游玩攻略

    Codeforces游玩攻略 1 简介2 网址3 使用1 主界面2 社区3 比赛名字颜色比赛种类比赛流程关于Codeforces赛制 xff1a 如何读懂排行榜Rating 4 题解 最后鸣谢 1 简介 Codeforces是全球最著名的在
  • Educational Codeforces Round 141 Editorial C~D

    1783C Yet Another Tournament 分析 正解思路是贪心 开始自己也想的贪心 xff1a 首先显然打败的人数越多越好 xff0c 然后选择权值最小的人打败 这个思路前半部分没问题 xff0c 后半部分过不了样例的第二个
  • Codeforces 1419B. Stairs 递归

    Codeforces 1419B Stairs 递归 原题链接https codeforces com problemset problem 1419 B 样例 输入 5 2 1 49 5 20 50 6 20 50 5 3 8 9 13
  • codeforces 1326 E.Bombs

    codeforces 1326 E Bombs 题意 xff1a 给定 1 n 1 n 1 n 的排列p q xff0c 将
  • Codeforces Round #677 (Div. 3) 题解

    Codeforces Round 677 Div 3 题解 A Boring Apartments 题目 题解 简单签到题 xff0c 直接数 xff0c 小于这个数的 43 10 43 10 43 1 0 代码 span class to
  • Codeforces Round 870 (Div. 2)【A、B、C、D】

    文章目录 A Trust Nobody 暴力 B Lunatic Never Content 数学 C Dreaming of Freedom 数学 暴力 D Running Miles 前缀 后缀 传送门 A Trust Nobody 暴
  • Codeforces Round #588 (Div. 1)

    Contest Page 因为一些特殊的原因所以更得不是很及时 A sol 不难发现当某个人diss其他所有人的时候就一定要被删掉 维护一下每个人会diss多少个人 xff0c 当diss的人数等于剩余人数 1 的时候放队列里 xff0c
  • Codeforces Round #291 (Div. 2)

    题目链接contest 514 A Chewba ca and Number 不允许有前导零 所以如果第一位是9的话 需要特别考虑 一开始理解错了题意 又WA了呜呜呜 include
  • coderforces round 894(div.3)

    Problem A Codeforces AC代码 include
  • Petya and Exam【Codeforces 1282 C】【贪心】

    Codeforces Round 610 Div 2 C 有N道题目 题目有简单与困难之分 简单的题目花费A分钟 困难的题目花费B分钟 那么考试时间一共有T的情况下 我们是可以提前交卷的 但是有些时间限制 就是譬如说你现在第x分钟交卷 但是
  • Codeforces Round #808 (Div. 2)C - Doremy‘s IQ

    C Doremy s IQ time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output D
  • 1200*A. You‘re Given a String...(枚举)

    include
  • 1600*C. Binary String Copying

    https codeforces com problemset problem 1849 C Binary String Copying 洛谷 解析 对于某个区间x y 他排序之后 最左侧的连续0和最右侧的连续1是不影响排序结果的 假设左侧
  • 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
  • 1400*C. No Prime Differences(找规律&数学)

    解析 由于 1 不是质数 所以我们令每一行的数都相差 1 对于行间 分为 n m之中有存在偶数和都为奇数两种情况 如果n m存在偶数 假设m为偶数 如果都为奇数 则 include
  • 1600*D. Road Map(数学

    解析 记录每个点的父节点和子节点 从新的根节点开始遍历 遍历所有的非父结点即可 include
  • 【codeforces #290(div 1)】ABC题解

    A Fox And Names time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard o
  • 1600*B. pSort(并查集)

    解析 并查集 将能够交换的位置相连 查看对应的位置能够交换 include
  • Codeforces 1475C. Ball in Berland(二元容斥)

    题目传送门 题意 一个班级有a个男生和b个女生 现在这个班级有k对男女愿意一起出席毕业典礼 这里注意k对男女中可能会有某个男生或女生出现在多个pair中 你从这k对中找出两对 使得这两对中的男生不相同 女生不相同 即一个男生或女生不可能在一

随机推荐

  • Symbol.iterator的理解

    es6中有三类结构生来就具有Iterator接口 数组 类数组对象 Map和Set结构 var arr 1 2 3 4 let iterator arr Symbol iterator console log iterator next v
  • MySQL 安装指南

    本教程教你如何在基于 Ubuntu 的 Linux 发行版上安装 MySQL 对于首次使用的用户 你将会学习到如何验证你的安装和第一次怎样去连接 MySQL Sergiu MySQL 是一个典型的数据库管理系统 它被用于许多技术栈中 包括流
  • c++ 写x64汇编 5参数_V8 引擎如何生成 x64 机器码——以浮点数加法为例

    摘要 本文将主要从以下两个方面介绍 V8 引擎如何在 Intel x64 平台下生成浮点数加法的机器码 首先 从 C 语言和 x64 汇编的角度举例说明为什么浮点数加法的运算结果不准确 然后 查看 V8 引擎中生成浮点数加法机器码相关的源码
  • Qt FTP地址下载中文乱码问题

    Qt FTP地址下载中文乱码问题 前言 一 为什么乱码 二 解决办法 1 使用QUrl的编码和解码函数 2 使用时遇到的其他问题 总结 前言 最近在做Qt项目 使用FTP下载 需要存储ftp地址 ftp地址中文直接复制出现乱码如下 正常 f
  • 【2022最新Java面试宝典】—— Java集合面试题(52道含答案)

    目录 一 集合容器概述 1 什么是集合 2 集合的特点 3 集合和数组的区别 4 使用集合框架的好处 5 常用的集合类有哪些 6 List Set Map三者的区别 7 集合框架底层数据结构 8 哪些集合类是线程安全的 9 Java集合的快
  • H.265的参考帧管理

    原文地址 https blog csdn net VioletHan7 article details 81384424 文章目录 HM参考帧管理分析 1 参考帧管理的基本知识 2 HEVC参考帧集技术 RPS 3 RPS预测 4 HM中的
  • js中对象数组根据对象id去重

    js中对象数组根据对象id去重 可以使用 Array filter 方法结合 Array findIndex 方法来去重 具体实现如下 const arr id 1 name apple id 2 name banana id 1 name
  • python 图像处理(5):图像的批量处理

    有些时候 我们不仅要对一张图片进行处理 可能还会对一批图片处理 这时候 我们可以通过循环来执行处理 也可以调用程序自带的图片集合来处理 图片集合函数为 skimage io ImageCollection load pattern load
  • 最新C51单片机毕业设计选题推荐

    文章目录 1前言 2 STM32 毕设课题 3 如何选题 3 1 不要给自己挖坑 3 2 难度把控 3 3 如何命名题目 1前言 更新单片机嵌入式选题后 不少学弟学妹催学长更新STM32和C51选题系列 感谢大家的认可 来啦 以下是学长亲手
  • 智能垃圾分类策略

    背景介绍 随着中国经济的快速发展以及城市化水平的进一步提升 城市生活垃圾产量急剧增加 如何有效治理 垃圾围城 问题 弱化 废弃资源 对环境和人体的危害 成为当今时代的主旋律 基于上述问题 想到是否可以通过智能化垃圾分类机器人 辅助人们进行垃
  • Vue/Vue-Cli/ElementUI报错bug+使用方案合集(持续更新,建议收藏)(23-05-26更新)

    持续更新 建议收藏关注 一 Vue Vue Cli 1 Vue Router路由跳转页面下移问题 问题 通过Vue Router跳转页面时 页面不是从页面顶部显示 解决方法 在src router index js中添加以下代码 解决路由跳
  • EasyExcel导入解析数据为空

    实体 Data AllArgsConstructor NoArgsConstructor public class LayerDTO 环号 private Integer ringNumber 地层名称 private String lay
  • 2021年系统集成项目管理工程师(软考中级)连夜整理考前重点

    第一章 信息化基础知识 发布在文章里的内容没有格式化 可在我的资源中下载 原文word版下载 一 信息与信息化 1 信息论奠基者香农认为 信息就是能够用来消除不确定性的东西 8种状态需要3位比特表示 5位比特则可表示64种状态 信息 物质材
  • HIVE判断题总结

    1 hive将元数据保存在关系数据库中 大大减少了在查询过程中执行语义检查的时间 Hive stores metadata in a relational database greatly reducing semantic checkin
  • 【推荐收藏】1000+ Python第三方库大合集

    awesome python 是 vinta 发起维护的 Python 资源大全 内容包括 Web 框架 网络爬虫 网络内容提取 模板引擎 数据库 数据可视化 图片处理 文本处理 自然语言处理 机器学习 日志 代码分析等 本文内容较多 喜欢
  • Docker搭建Redis主从复制模式

    前言 一 docker相关命令 二 用命令方式搭建 1 创建redis主服务器redis master 成功会输出一段字符 2 创建两个redis从服务器redis slave 1和redis slave 2 3 查看启动的容器 创建后会启
  • 在单页应用中,如何优雅的上报前端性能数据

    最近在做一个较为通用的前端性能监控平台 区别于前端异常监控 前端的性能监控主要需要上报和展示的是前端的性能数据 包括首页渲染时间 每个页面的白屏时间 每个页面所有资源的加载时间以及每一个页面中所以请求的响应时间等等 本文的介绍的是如何设计一
  • 2021-07-11

    如何使用Microsoft Your Phone 很多小伙伴在Win10上想要使用 Microsoft Your Phone 的时候 发现会提示 您所在的地区不可用 解决方法很简单 不需要翻墙 在设置里将 地区 改成国外 美国英国都可以 然
  • jsp中文乱码如何解决_Kali Linux 2020版 中文乱码和中文设置问题解决方案

    kali linux 2020版 虚拟机文件默认为英语状态 好多小伙伴表示英语看的太费劲了或者出现乱码的情况 下面来教大家如何处理 以乱码为例 包含中文设置 方便大家看 以中文演示 注 因为我的新装的kali 当前用户并不是root用户 并
  • Codeforces Round #552 (Div. 3)

    A Restoring Three Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output s