Codeforces Round #839 (Div. 3) A~G all answer

news2025/2/2 14:46:52

Dashboard - Codeforces Round #839 (Div. 3) - Codeforces

        最近状态奇差无比,还有点生病,低烧反复横跳,应该没阳?(虽然家人都阳了,就剩我一个了wuwuwu~(A B C就不作解释了,看下题面和代码应该就能懂~)

———————————————————————————————————————————

目录

A. A+B?

B. Matrix Rotation

C. Different Differences

 D. Absolute Sorting

E. Permutation Game

F. Copy of a Copy of a Copy

G. Gaining Rating


 

A. A+B?

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}


void wanyurukong(){
    string s;
    cin>>s;
    printf("%d\n",s[0]+s[2]-2*'0');
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    cin>>t;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}
 

B. Matrix Rotation

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}

int a1,a2,a3,a4;
void wanyurukong(){
    cin>>a1>>a2>>a3>>a4;
    for (int i =0; i<4; i++) {
        if (a1<a2&&a3<a4&&a1<a3&&a2<a4) {
            printf("YES\n");return;
        }
        swap(a1, a2);
        swap(a1, a3);
        swap(a3, a4);
    }
    printf("NO\n");
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    cin>>t;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}
 

C. Different Differences

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}
int k;
int ssr[1005];
void wanyurukong(){
    cin>>n>>k;
    int kl=1;
    int ff=0;
    int jk=1;
     ssr[1]=1;
    for (int i =2; i<=n; i++) {
        ssr[i] = ssr[i - 1] + jk;
        jk++;
       if (ssr[i]  > k+i-n) {
           ssr[i] = ssr[i - 1] + 1;
           jk--;
       }
     }
    for (int i =1; i<=n; i++) {
        printf("%d ",ssr[i]);
    }printf("\n");
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    cin>>t;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}
 

 D. Absolute Sorting

题目:

您将得到一个由𝑛个整数组成的数组𝑎。

你想让数组𝑎通过应用下面的操作进行排序:

选择一个整数𝑥,然后为每个𝑖∈(1,𝑛),取代𝑎𝑖由|𝑎𝑖−𝑥|。
找到任何将使数组排序的𝑥值,或者报告没有这样的值。

排序成𝑎1≤𝑎2≤⋯≤𝑎𝑛。

思路:如果a[i]>=a[i-1],那么当他们减去 (a[i]+a[i-1])/2 ,仍然会保持这种状态,如果a[i-1]>a[i],(a[i]+a[i-1]+1)/2,则会将其反转过来,变成a[i]>a[i-1],所以我们需要保证数组中a[i]>=a[i-1]的状态,反转a[i-1]>a[i]的状态即可,所以我们只需要遍历一遍,在反转所有的同时,还维护原有的情况时否存在即可。

代码:

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}

ll a[200005];
void wanyurukong(){
    cin>>n;
    for (int i =1; i<=n; i++) {
        cin>>a[i];
    }
    ll ff=1e8+5,fl=0;
    for (int i =2; i<=n; i++) {
        if (a[i]>a[i-1]) {
            ff=min(ff, (a[i]+a[i-1])/2);
        }
        else if(a[i-1]>a[i])
        {
            fl=max(fl, (a[i]+a[i-1]+1)/2);
        }
    }
    if (ff>=fl) {
        printf("%lld\n",ff);
    }
    else{
        printf("-1\n");
    }
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    cin>>t;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}
 

E. Permutation Game

题意:

两个玩家在玩游戏。它们有一个整数的排列1 2…,𝑛(排列是一个数组,其中从1到𝑛的每个元素恰好出现一次)。排列不是按升序或降序(即。排列没有形式[1,2,…,𝑛]或[𝑛,𝑛−1,…,1])。

最初,排列的所有元素都是红色的。选手们轮流上场。在他们的回合中,玩家可以做以下三种行动之一:

重新排列排列的元素,使所有红色元素保持它们的位置(注意,蓝色元素可以相互交换,但这不是强制性的);
将一个红色元素的颜色改为蓝色;
跳过。
如果排列是按升序排列的(即第一个玩家赢。它变成[1,2,…,𝑛])。如果排列是按降序排列的,那么第二个玩家获胜。变成[𝑛,𝑛−1,…,1])。如果游戏持续100500回合,没有人赢,则以平局结束。

你的任务是确定游戏的结果,如果两个玩家都玩得很好。

思路:

每次改颜色,或者重新排列,或者跳过。想赢的话,就需要把每个不符合自己位置的染色排列。

这就出现了两种情况,一种是一个人需要染色这个,另一种是两个人都需要染色这个,最优的情况肯定是先染自己需要染的,因为共同染的,对方也想赢,如果对方自己染的已经染完了,为了胜利就会去染共同的对吧。

这时候我们模拟一下,就会发现,如果都将自己的染完,最后一起染共同的,那么当剩最后一块的时候,谁染谁输,因为染色过后就可以排列了,所以在这种情况下就是平局对吧?

那么怎么样才能赢了,如果第一个人独自需要染的+共同染的<=第二个人要染的,这种情况下第一个人就能赢,因为是第一个人先手,同时染完,那么第一个人就直接排列 胜利。

第二个人同理,第二个人独自需要染的+共同染的<第一个人要染的。

代码:

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}

int a[500005];
int b[500005];
int c[500005];
bool cmp(int a,int b){
    return a>b;
}
void wanyurukong(){
    cin>>n;
    for (int i =1; i<=n; i++) {
        cin>>a[i];
        b[i]=a[i];
        c[i]=a[i];
    }
    sort(b+1, b+1+n,cmp);
    sort(c+1, c+1+n);
    int a1=0,b1=0;
    map<int,int>q;
    for (int i=1  ; i<=n; i++) {
        if (a[i]!=b[i]) {
            a1++;
            q[i]++;
        }
    }
    for (int i =1; i<=n; i++) {
        if (a[i]!=c[i]) {
            b1++;
            q[i]++;
        }
    }
    
    int xu=0;
    int ff=0;
    for(auto [x,y]:q){
        if (y==0) {
            xu++;
        }
        if (y==2) {
            ff++;
        }
    }
    a1-=ff;
    b1-=ff;
//    printf("%d %d %d\n",a1,b1,ff);
//    if ((a1==n&&b1>=n-1)&&(a1+xu==b1||b1+xu==a1)) {
//        printf("Tie\n");return;
//    }
//
//
    
//    if (xu>=ff) {
//        printf("Tie\n");return;
//    }
    
    if (b1+ff<=a1) {
        printf("First\n");
    }
    else if(a1+ff<b1){
        printf("Second\n");
    }
    else{
        printf("Tie\n");
    }
    
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    cin>>t;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}

 

F. Copy of a Copy of a Copy

题意:

这一切都始于一张黑白图片,可以表示为𝑛×𝑚矩阵,其所有元素都是0或1。行编号为1 ~𝑛,列编号为1 ~𝑚。

对图片执行了几种操作(可能是0),每种操作都是以下两种:

1 选择一个不在边框上的单元格(既不是第1行或𝑛,也不是第1列或𝑚),它被四个相反颜色的单元格包围(如果是1,则是4个0,反之亦然),并将其本身涂成相反的颜色;
2 复制当前图片。
注意,操作的顺序可以是任意的,它们不一定是交替的。

您将看到结果:已生成的所有𝑘副本。此外,你会得到最初的图片。但是,所有𝑘+1的图片都被打乱了。

恢复操作顺序。如果有多个答案,打印其中任何一个。这些测试是根据实际的操作序列构造的,即。至少有一个答案总是存在的。


思路:实际操作序列,我们找到初始的第一个,然后拿第一个与之后的比较,然后排序,模拟即可。

那么第一个要怎么找呢,对矩阵有影响的只有操作一,那么对于操作一,我们发现它不具有可逆性,那么肯定是可操作是逐渐变少,所以我们拿可改变性最多的当初始即可,这个仔细想一下的就能懂什么的了。

之后我们再与其一一比较,排序,按顺序模拟即可。(结构体排序,vector或者queue套结构体也可以,此代码用的重载优先队列+vector元组,看起来比较奇怪可能~?

代码:

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}

char as[105][35][35];
ll ff[105];
int m,k;
struct cc{
    bool operator()(pair<int, int>a,pair<int, int>b){
        return a.first>b.first;
    }
};
void wanyurukong(){
    cin>>n>>m>>k;
    for (int i =0; i<=k; i++) {
        ff[i]=0;
    }
//    cin>>as[0][0];
//    printf("%d %d %d",n,m,k);
    for (int i =0; i<=k; i++) {
        for (int j =0; j<n; j++) {
            cin>>as[i][j];
//            printf("i:%d %d %s\n",i,j,as[i][j]);
        }
    }
    if (k==0) {
        printf("1\n0\n");return;
    }
//    for (int i =0; i<=k; i++) {
//        for (int j =0; j<n; j++) {
//            printf("%s\n",as[i][j]);
//        }
//    }
//
    for (int i =0; i<=k; i++) {
        for (int j =1; j<n-1; j++) {
            for (int d=1; d<m-1; d++) {
                if (as[i][j][d]==as[i][j+1][d]) {
                    continue;
                }
                if (as[i][j][d]==as[i][j-1][d]) {
                    continue;
                }
                if (as[i][j][d]==as[i][j][d+1]) {
                    continue;
                }
                if (as[i][j][d]==as[i][j][d-1]) {
                    continue;
                }
                ff[i]++;
            }
        }
    }
    int ssr=0;
    for (int i =1; i<=k; i++) {
        if (ff[i]>ff[ssr]) {
            ssr=i;
        }
    }
//    for (int i =0; i<=k; i++) {
//        printf("%lld\n",ff[i]);
//    }
    priority_queue<pair<int,int>,vector<pair<int,int>>,cc>q;
    for (int i =0; i<=k; i++) {
        int kkl=0;
        for (int j=0; j<n; j++) {
            for (int d=0; d<m; d++) {
                if (as[i][j][d]!=as[ssr][j][d]) {
                    kkl++;
                }
            }
        }
        q.push({kkl,i});
    }

    vector<tuple<int,int,int>>ans;
    printf("%d\n",ssr+1);
    pair<int, int>ff,now;
//    while (!q.empty()) {
//        printf("%d %d\n",q.top().first,q.top().second);q.pop();
//    }
    while (q.size()!=1) {
        ff=q.top();q.pop();
        now=q.top();
        for (int j=0; j<n; j++) {
            for (int d=0; d<m; d++) {
                if (as[ff.second][j][d]!=as[now.second][j][d]) {
                    ans.push_back({1,j+1,d+1});
                }
            }
        }
        ans.push_back({2,now.second+1,-9});
    }
    printf("%lu\n",ans.size());
    for (int i =0; i<ans.size(); i++) {
        printf("%d %d ",get<0>(ans[i]),get<1>(ans[i]));
        if (get<2>(ans[i])!=-9) {
            printf("%d",get<2>(ans[i]));
        }
        printf("\n");
    }

}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    t=1;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}
 

G. Gaining Rating

题意:

Monocarp在一个流行网站上下棋。他有𝑛个可以一起玩的对手。𝑖-th对手的等级等于𝑎𝑖。Monocarp的初始评级是𝑥。Monocarp想要提高他的评级值𝑦(𝑦>𝑥)。

当Monocarp与对手对抗时,如果他当前的评级大于或等于对手的评级,他将获胜。如果Monocarp赢了,他的评分增加1,否则减少1。对手的评分不会改变。

Monocarp想要获得评级𝑦玩尽可能少的游戏。但他不能只是磨磨蹭蹭,和弱小的对手比赛。这个网站有一个规则,你应该尽可能平等地与所有对手比赛。正式地说,如果Monocarp想要对阵对手𝑖,就不应该有其他对手𝑗,这样Monocarp对阵𝑖的比赛次数就会比对阵𝑗的比赛次数多。

计算Monocarp获得评级𝑦所需的最小游戏数量,否则就说这是不可能的。注意,Monocarp对手的评级没有变化,而Monocarp的评级却发生了变化。

思路:我们看一下题目+样例,就可以判断出不可能的情况,我们可以首先将其剔除。当可以加的平分小于等于减去的评分,那么就将无法到达期望的评级。但是要判断一个在还未减的过程中,直接到达y。

之后,每轮我们都可以加到分,我们如果获胜赢下一个,那便可以一直加,如果下一个评级比我们加的+x大的话,那么之后都是输的。不过我们每轮可以加上赢得和输掉的差值,知道可与获胜,根据这个直接模拟即可。(但是需要多注意些细节!

代码:

/*Looking! The blitz loop this planet to search way
 
 Only my RAILGUN can shoot it 今すぐ
 
 身体中を  光の速さで
 
 駆け巡った確かな予感
 
 掴め! 望むものなら残さず
 
 輝ける自分らしさで
 
 信じてるよ  あの日の誓いを
 
 この瞳に光る涙それさえも  強さになるから
 
 */
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<numeric>
#include<stack>
using namespace::std;
typedef long long  ll;
int n,t;
inline __int128 read(){
    __int128 x = 0, f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9'){
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9'){
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
inline void print(__int128 x){
    if(x < 0){
        putchar('-');
        x = -x;
    }
    if(x > 9)
        print(x / 10);
    putchar(x % 10 + '0');
}

ll x,y;
ll a[200005];
void wanyurukong(){
    cin>>n>>x>>y;
    for (int i =1; i<=n; i++) {
        cin>>a[i];
    }
    sort(a+1, a+1+n);
    int j=-1;
    ll an=0;
    ll ff=x;
    ll k=0;
    for (int i =1; i<=n; i++) {
        if (a[i]<=ff) {
            ff++;j=i;
        }
    }
//    printf("%d\n",j);
    if (j<=n-j&&ff<y) {
        printf("-1\n");return;
    }
    j=1;
    ff=0;
    ll df;
    while (1) {
        while (j<=n&&a[j]<=x+k) {
            j++;
            k++;
        }
        if (x+k>=y||j==n+1) {
            an+=y-x;
            printf("%lld\n",an);return;
        }
        ff=k-(n-k);
//        printf("%d\n",j);
        df=(min(y,a[j])-x-k+ff-1)/ff;
        an+=n*df;
//        printf("%lld %lld %lld\n",an,df,ff);
        x+=df*ff;
    }
    
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(); cout.tie();
    cin>>t;
    while (t--) {
        wanyurukong();
    }
    //wanyurukong
    return 0;
}

 

感觉最近菜的不行,,,,,不对一直都菜的不行

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/104023.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【小5聊】Python3 使用selenium模块实现简单爬虫系列一

第一次听说Python还是在工作的时候&#xff0c;还是一位女生在用&#xff0c;当时她说可以用来处理excel文档&#xff0c;特别是一些统计分析。第二次让我真正进入python世界&#xff0c;还是在一次C站举办的大赛上。聊聊你是因为什么机缘巧合进入到python圈的呢&#xff1f;不…

金盾杯2022-AGCTFS战队 wp

文章目录Web图书馆EzPHPeZphp2SQLSkip有来无回反败为胜Crypto小菜一碟RRSSAAsimpleRrandMISC盗梦空间qianda0_Sudoku数据泄露01-账号泄露追踪数据泄露02-泄露的密码数据泄露03-泄露的密钥ReverseTeaPwnLoginWtfWeb 图书馆 根据提示找到 干货&#xff5c;最全的Tomcat漏洞复现…

Qt5 网页标题、关键词提取工具Findyou

Qt5 网页标题、关键词提取工具Findyou 一、程序运行 运行界面 辅助功能&#xff0c;可用于将扫描器的扫描结果转换为url 二、所涉及的重要知识点 1、Qt爬取https的网页 来自宇龍_ https://blog.csdn.net/qq_45809384/article/details/122049295?spm1001.2014.3001.5506 打…

Foxmail客户端添加163账号和邮件备份163邮箱

文章目录一、Foxmail添加163账号1. 点击图标2. 账号管理3. 新建4. 手动设置5. 填写信息6. 创建二、邮件转移备份2.1. 邮件折叠2.2. 选择目标邮箱2.3. 同步服务端Foxmail客户端添加163账号的具体步骤如下&#xff1a;一、Foxmail添加163账号 1. 点击图标 首先打开Foxmail客户端…

51寻找数组中出现次数超一半的数

51寻找数组中出现次数超一半的数 一看题目就想用hash表&#xff0c;但是要求空间复杂度为1&#xff0c;说明不可以用哈希表去存。一直在原地数组上思考&#xff0c;类似桶排序&#xff0c;可是这取决于数值的大小&#xff0c;最后还是看了题解&#xff0c;学到了。 思想是&…

外汇天眼:一笔赚了12600美元 你羡慕吗?

在外汇投资中&#xff0c;黑平台一直是外汇投资圈的一枚毒瘤&#xff0c;不能顺利出金也是外汇投资面临的最大风险之一。 对于外汇投资者而言&#xff0c;外汇交易平台的选择至关重要。 选择好的外汇交易平台&#xff0c;最重要的是&#xff1a;选择安全可靠的平台&#xff0…

Blackmagic黑魔法摄像机braw视频帧损坏文件修复方法

Blackmagic是全球知名的影视级产品供应商&#xff0c;其高清摄像机是国内外各种剧组的最爱。Blackmagic的新产品目前使用braw格式&#xff0c;其编码采用自定义的raw编码&#xff0c;视频的效果和阿莱不相上下。之前我们已经多次介绍过这种braw文件的修复&#xff0c;近期我们处…

grpc的使用

GRPC学习 本文包括grpc的入门使用和四种实现方式 文章目录一、GRPC 安装和hello world1、什么是GRPC2、安装grpc和代码3、服务端3.1、取出 server3.2、挂载方法3.3、注册服务3.4、创建监听4、客户端二、protobuf语法三、GRPC server 的使用1、普通服务2、流式传入&#xff08;客…

通达信破解接口怎么委托下单?

通达信破解接口主要是利用数学公式建立模型&#xff0c;通过大量数据判断未来价格走势&#xff0c;通过程序选股。虽然选股也比较广泛&#xff0c;但也能覆盖A股市场的四千多只股票&#xff0c;能排除强行涨跌等人为因素&#xff0c;执行的纪律性强。所以对于通达信破解接口对股…

【笔记】git 修改之前的提交记录信息(git commit -m ‘...‘)

文章目录一、修改最后一条提交记录信息二、修改前面某条或某几条提交记录信息一、修改最后一条提交记录信息 git commit --amend进入vi编辑器后&#xff1a; 按i下方出现’- - 插入 - -‘的提示时&#xff0c;便可编辑提交记录信息按ESC&#xff0c;输入:wq保存退出&#xff0…

ICG衍生物ICG-Sulfo-OSu的产品描述及保存建议

中文名称 ICG-Sulfo-OSu 英文名字 ICG-Sulfo-OSu 凯新生物描述: &#xff08;ICG&#xff09;是一种用于医学诊断的菁染料它用于测定心输出量、肝功能和肝血流&#xff0c;以及眼科血管造影它的峰值光谱吸收接近800 nm这些红外频率穿透视网膜层&#xff0c;使ICG血管造影能够比…

【STA】(2)概念

目录 1.CMOS逻辑设计 1.1 基本MOS结构 1.2 COMS逻辑门 1.3 标准单元 2.CMOS单元建模 3.电平翻转波形 4.传播延迟 5.波形的转换率 6.信号之间的偏移 7. 时序弧和单调性 8.最小和最大时序路径 9.时钟域 10.工作条件 1.CMOS逻辑设计 1.1 基本MOS结构 MOS(Metal Oxide…

2022年Python笔试选择题及答案(秋招)

2022年Python笔试选择题及答案&#xff08;秋招&#xff09; &#x1f3e0;个人主页&#xff1a;编程ID &#x1f9d1;个人简介&#xff1a;大家好&#xff0c;我是编程ID&#xff0c;一个想要与大家共同进步的程序员儿 &#x1f9d1;如果各位哥哥姐姐在准备面试&#xff0c;找…

【Redis-11】Redis事务实现原理

Redis通过MULTI、EXEC、WATCH等命令来实现事务的功能&#xff0c;事务提供了一种将多个命令请求打包&#xff0c;然后一次性&#xff0c;顺序性的执行多个命令的机制。在事务执行期间&#xff0c;服务器不会中断事务去执行其他客户端的命令&#xff0c;他会讲事务中所有命令执行…

谈主成分分析/因子分析中的特征值“矩阵近似”

主成分分析和因子分析是数据降维的常用手段&#xff0c;其中以特征值为载体&#xff0c;在不断降维“近似”原本的协方差矩阵。 CSDN中一些文章在介绍这个问题或者叫“特征值分解”时&#xff0c;讲得都比较学术化&#xff0c;今天用一个小例子&#xff0c;还是面向新人&#…

Redis高可用之哨兵机制实现细节

Redis高可用之哨兵机制实现细节 本文来自我的 technotes [1] Redis篇&#xff0c;欢迎你常来逛逛。 正文 在上一篇的文章《Redis高可用全景一览》中&#xff0c;我们学习了 Redis 的高可用性。高可用性有两方面含义&#xff1a;一是服务少中断&#xff0c;二是数据少丢失。主…

【树莓派不吃灰】兄弟连篇⑥ Linux系统进程管理

目录1、进程查看1.1 ps1.2 top1.3 pstree2、终止进程2.1 kill2.2 killall2.3 pkill3、工作管理4、系统资源查看4.1 vmstat 监控系统资源4.2 dmesg 开机内核检测信息4.3 free 查看内存使用4.4 查看cpu信息4.5 uptime4.6 uname4.7 判断当前系统位数4.8 查询当前linux发行版本4.9 …

Windows及Kail安装配置

apache在kali环境搭建 Kali虚拟机中是包含有Apache的&#xff0c;在/etc目录下ls即可显示出来&#xff0c; 所以这里只需要进行配置就可以了。 图1.1 Apache2目录 打开Apache服务&#xff0c;开启后可以使用status命令查看服务状态。 /etc/init.d/apache2 start /etc/init.d…

【5】控制语句

指针 Go中不用“->”运算符&#xff0c;用的是 “.” 选择符“&”&#xff1a;取地址符“*”&#xff1a;访问目标对象符默认值为&#xff1a;nil (不是NULL)、- -:作为语句&#xff0c;只可以自己放一行&#xff0c;而且放在右边&#xff08;不是表达式&#xff09; …

一款强大的API接口文档管理工具(Smart-Doc + Torna)

【本文由龙飞同学供稿】 在团队协作开发项目的时候&#xff0c;接口文档承担着向其他开发人员说明接口相关信息的重要任务&#xff0c;因此&#xff0c;一份清晰而又相近的接口文档至关重要。 但是&#xff0c;写接口文档的痛苦想必各位开发人员都体验过&#xff0c;明明写接…