RN open source component React-Native-Video usage

2023-01-19   ES  

Great violence

Positive solution is the merger of the line segment tree or two -point+line segment tree sorting

But the violence can pass, then violence

barrels can be passed, and then it’s gone

code

//By AcerMo
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int M=100050;
int n,m,vis[M],a[M];
inline int read()
{
    int x=0;char ch=getchar();
    while (ch>'9'||ch<'0') ch=getchar();
    while (ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar();
    return x;   
}  
signed main()
{
    n=read();m=read();
    for (int i=1;i<=n;i++) a[i]=read();
    while (m--)
    {
        int fl=read(),l=read(),r=read(),mi=2e9,ma=0;
        for (int i=l;i<=r;vis[a[i]]=1,i++)
        {
            mi=a[i]<mi?a[i]:mi;
            ma=a[i]>ma?a[i]:ma;
        }
        if (!fl)
        {
            for (int i=mi;i<=ma;i++)
            if (vis[i]) a[l++]=i,vis[i]=0;
            continue;
        }
        for (int i=ma;i>=mi;i--)
        if (vis[i]) a[l++]=i,vis[i]=0;
    }
    int e=read();printf("%d",a[e]);
    return 0;
}

source

Related Posts

Vue project often ignored tips Rainbow

NIPS 2018 thesis interpret

Before design mode-Seven major software architecture design principles

neural network and deep learning notes (3) The activation function and parameter initialization

RN open source component React-Native-Video usage

Random Posts

Java Written year and month to query the calendar class

ANT component tool | Configuration information | batch processing command | cloning

ANT component tool | Configuration information | batch processing command | cloning

Protective measures for vulnerabilities of Android application

SUBLIME Text formatting JSON-PRETTY JSON