随页面缩放的图片

缺省源

缺省源解释

  • sf() 为快读,ot(),ut() 为快输(区别在于 ut 会在两个参数之间输出空格且最终会换行
  • p(),pa(),po(),g() 为debug
  • f(),fo() 为for循环的缩写,r(),fr() 为倒序遍历,u(),fu() 判断的地方写的小于
  • 其他缩写和大部分喜欢写 #define 的选手大致相同(其实有些就是从别人那抄的

编译环境:-O2 -std=c++14 -Wall -D DISFILE -Wl,--stack=134217728

history

一些被废弃的东西

#define pb push_back
#define p(x...)(cout<<setw(18)<<#x,ot(" Line ",__LINE__," : "),ut(x))
#define pa(a, x...)(cout<<"["<<#a<<"]",ot(" Line ",__LINE__," : "),ut(x))

Code

#include<bits/stdc++.h>
namespace whaleL{
using namespace std;
#define pii pair<int, int>
#define fi first
#define se second
#define ull unsigned long long
#define ll long long
#define db double
#define re return
#define con continue
#define brk break
#define emp emplace
#define emb emplace_back
#define mpr make_pair
#define lwb lower_bound
#define upc upper_bound
#define all(x)x.begin(),x.end()
#define mms(a,b)memset(a,b,sizeof(a))
#define sml(a,b)(a=min(a,b))
#define big(a,b)(a=max(a,b))
#define fo(i,j,n)for(int i=(j);i<=(n);i++)
#define fr(i,j,n)for(int i=(j);i>=(n);i--)
#define fu(i,j,n)for(int i=(j);i<(n);i++)
#define f(i,n)fo(i,1,n)
#define r(i,n)fr(i,n,1)
#define u(i,n)fu(i,0,n)
#define il inline
#define tln template<typename m>
#define tls template<typename m,typename...ms>
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//------------------------------fast IO------------------------------//
#ifdef _WIN32
#define getchar _getchar_nolock
#define putchar _putchar_nolock
#elif __linux__
#define getchar getchar_unlocked
#define putchar putchar_unlocked
#endif
#define isd(c)((c)>47&&(c)<58)
#define iss(c)((c)<33)
#define getc(c) for(c=getchar();iss(c);c=getchar());
il void sf(){}il void ot(){}il void ut(){putchar('\n');}
tln il void sf(m&x){char f=1,c=getchar();x=0;for(;!isd(c);c=getchar())(c=='-')?f=-1:0;for(;isd(c);c=getchar())x=x*10+c-48;x*=f;}
tln il void ot(m x){x<0?x=-x,putchar('-'):0;static short s[51],t(0);do s[++t]=x%10;while(x/=10);for(;t;)putchar(s[t--]|48);}
il void sf(pii &x){sf(x.fi);sf(x.se);}
il void sf(char&x){getc(x);}
il void ot(char x){putchar(x);}
il void sf(char*x){char c;getc(c);for(;!iss(c);c=getchar())*x++=c;*x=0;}
tln il void ot(m*x){while(*x)putchar(*x++);}
il void sf(string&x){x.clear();char c;getc(c);for(;!iss(c);c=getchar())x=x+c;}
il void ot(string x){printf("%s", x.c_str());}
il void sf(db&x){scanf("%lf", &x);}
il void ot(db x){printf("%lf", x);}
il void sf(long db&x){scanf("%Lf", &x);}
il void ot(long db x){printf("%Lf", x);}
tls il void sf(m&x,ms&...y){sf(x);sf(y...);}
tls il void ot(m x,ms...y){ot(x);ot(y...);}
tls il void ut(m x,ms...y){ot(x);putchar(' ');ut(y...);}
//-------------------------------debug-------------------------------//
// #define cerr cout
il void P(){cerr<<'\n';}
tls void P(m a,ms...b){cerr<<a<<' ';P(b...);}
il void S(string s,int a){cerr<<s<<a<<" : ";}
tln il void pc(m*a,m*b){for(cerr<<"{";a!=b;(a!=b)&&(cerr<<',',0))cerr<<*a++;cerr<<"}\n";}
tln il void pc(m a,m b){for(cerr<<"{";a!=b;(a!=b)&&(cerr<<',',0))cerr<<*a++;cerr<<"}\n";}
#undef cerr
#ifndef ONLINE_JUDGE
#define err()(S("err Line ",__LINE__),exit(0))
#define p(x...)(S("["#x"] Line ",__LINE__),P(x))
#define pa(x,y)(S("["#x" ~ "#y"] Line ",__LINE__),pc(x,y))
#define g(x...) do{x;}while(0);
#else
#define err()0
#define p(...)0
#define pa(...)0
#define g(...)
#endif
#ifndef DISFILE
#define file(x) freopen(#x ".in", "r", stdin), freopen(#x ".out", "w", stdout)
#else
#define file(x)
#endif
const ull MOD = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const db eps = 1e-8;
struct Mod {ull m,b;Mod(ull m):m(m),b(((__uint128_t)1<<64)/m){}ull Mods(ull a){ull q=((__uint128_t)a*b)>>64;ull r=a-q*m;re r<m?r:r-m;}}mo(MOD);
#define mod(x)mo.Mods(1ll*x)
};using namespace whaleL;
const int N = 2e5 + 233;

signed main() {
}
posted @ 2025-03-21 19:48  追梦之鲸  阅读(73)  评论(0)    收藏  举报