teamplate
unknown
c_cpp
3 years ago
2.5 kB
14
Indexable
/* Author : Nguyen Ngoc Hung, Ngo Gia Tu high school */ /* #pragma GCC optimize("Ofast") #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") */ #include <bits/stdc++.h> using namespace std; namespace FastInput{ template<typename Ty> Reimu read(Ty &x) { x = 0; int f = 0; char c = getchar(); for (; !isdigit(c); c = getchar()) f |= c == '-'; for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48); if (f) x = -x; } template<> Reimu read(double &x) { x = 0; int f = 0; char c = getchar(); for (; !isdigit(c); c = getchar()) f |= c == '-'; for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48); if (c == '.') { double e = 1; for (c = getchar(); isdigit(c); c = getchar()) x += (c ^ 48) * (e *= .1); } if (f) x = -x; } template<> Reimu read(char &c) { do c = getchar(); while (!isgraph(c)); } template<> Reimu read(string &s) { s = ""; char c = getchar(); while (!isgraph(c)) c = getchar(); for (; isgraph(c); c = getchar()) s += c; } template<typename Ty, typename...Args> Reimu read(Ty &x, Args &...args) { read(x); read(args...); } } using namespace FastInput; #define writefile(f) freopen(f,"w",stdout) #define readfile(f) freopen(f,"r",stdin) #define reset(x,val) memset((x),(val),sizeof(x)) #define fastIO ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define bit(X,i) (((X)>>(i))&1ll) #define MASK(i) (1ll<<(i)) #define pii pair<int,int> #define ull unsigned long long #define ll long long #define ld long double #define fi first #define se second #define mp make_pair #define all(x) x.begin(),x.end() #define rall(x) (x).rbegin(),(x).rend() #define sz(x) (int)(x).size() #define lcm(x,y) (long long)(x*y)/__gcd(x,y) #define endl "\n" #define on(i,m) (m|=(1LL<<i)) #define off(i,m) (m&=~(1LL<<i)) #define builtin_popcount __builtin_popcountll #define Times cerr << "\nTime: " <<clock()/(double)1000 << " sec" #define show(x) cerr << "Line " << __LINE__ << ": " << #x << " = " << (x) << endl #define __unique(a) sort(a.begin(),a.end()),a.resize(unique(a.begin(),a.end())-a.begin()) const int maxn = (int)1e5+1; const int MOD = (int)1e9+7; const int oo = (int)1e9+7; const int base = (int)311; const double PI = acos(-1); int idx[] = {-1,0,1,0}; int idy[] = {0,1,0,-1}; int main(int argc, char** argv){ //fastIO; int n; read(n); return 0; }
Editor is loading...