mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 19:16:27 +00:00
64 lines
1.7 KiB (Stored with Git LFS)
C++
64 lines
1.7 KiB (Stored with Git LFS)
C++
#include "testlib.h"
|
|
#include<bits/stdc++.h>
|
|
namespace my_std{
|
|
using namespace std;
|
|
#define pii pair<int,int>
|
|
#define fir first
|
|
#define sec second
|
|
#define MP make_pair
|
|
#define rep(i,x,y) for (int i=(x);i<=(y);i++)
|
|
#define drep(i,x,y) for (int i=(x);i>=(y);i--)
|
|
#define go(x) for (int i=head[x];i;i=edge[i].nxt)
|
|
#define templ template<typename T>
|
|
typedef long long ll;
|
|
typedef double db;
|
|
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
|
|
templ inline T rnd(T l,T r) {return uniform_int_distribution<T>(l,r)(rng);}
|
|
templ inline bool chkmax(T &x,T y){return x<y?x=y,1:0;}
|
|
templ inline bool chkmin(T &x,T y){return x>y?x=y,1:0;}
|
|
templ inline void read(T& t)
|
|
{
|
|
t=0;char f=0,ch=getchar();double d=0.1;
|
|
while(ch>'9'||ch<'0') f|=(ch=='-'),ch=getchar();
|
|
while(ch<='9'&&ch>='0') t=t*10+ch-48,ch=getchar();
|
|
if(ch=='.'){ch=getchar();while(ch<='9'&&ch>='0') t+=d*(ch^48),d*=0.1,ch=getchar();}
|
|
t=(f?-t:t);
|
|
}
|
|
template<typename T,typename... Args>inline void read(T& t,Args&... args){read(t); read(args...);}
|
|
void file()
|
|
{
|
|
#ifdef NTFOrz
|
|
freopen("a.in","r",stdin);
|
|
#endif
|
|
}
|
|
inline void chktime()
|
|
{
|
|
#ifdef NTFOrz
|
|
cerr<<clock()/1000.0<<'\n';
|
|
#endif
|
|
}
|
|
#ifdef mod
|
|
ll ksm(ll x,int y){ll ret=1;for (;y;y>>=1,x=x*x%mod) if (y&1) ret=ret*x%mod;return ret;}
|
|
ll inv(ll x){return ksm(x,mod-2);}
|
|
#else
|
|
ll ksm(ll x,int y){ll ret=1;for (;y;y>>=1,x=x*x) if (y&1) ret=ret*x;return ret;}
|
|
#endif
|
|
}
|
|
using namespace my_std;
|
|
|
|
int main() {
|
|
registerValidation();
|
|
int n = inf.readInt(1, 100'000, "n");
|
|
inf.readSpace();
|
|
int m = inf.readInt(1, 100'000, "m");
|
|
inf.readEoln();
|
|
rep(i,1,n) {
|
|
inf.readInt(1, 1'000'000'000, "a[i]");
|
|
if (i!=n) inf.readSpace();
|
|
else inf.readEoln();
|
|
}
|
|
inf.readEof();
|
|
return 0;
|
|
}
|
|
|