跳到正文

huangzixi071018

554857

退役OIer,拉玛西亚青训

这是 2026年10月26日 存档的第 1 版,不是当前版本。查看当前版本

资料、奖项与版本

资料

编号
554857
抓取

版本

  1. v2当前
  2. v1

题单

英语听说

账号:tch6545705 密码:Hmy070908

华辰团队

ChatGPT

oicourse-stu-1

C++
-std=c++14

#pragma GCC optimize("O3")
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);

mt19937_64 rnd(time(0));

char *p1,*p2,buf[100000];
#define nc()(p1==p2 && (p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++)
int read()
{
    int x=0,f=1;
    char ch=nc();
    while(ch<'0'||ch>'9')
    {
        if(ch=='-')
            f=-1;
        ch=nc();
    }
    while(ch>='0'&&ch<='9')
        x=x*10+ch-'0',ch=nc();
    return x*f;
}

/*
		|
		|			|         |
		|			| |       |
		|			|  |      |
	    |			|	 |    |
        |			|	  |   |
        |			|      |  |
		|			|       | |
||||||||			|         |


|           |		|	    |			|       
|           |		|     |				|
|           |		|   |				|
|           |		| |					|
|||||||||||||		|  					|
|           |		| | 				|
|           |		|   |				|
|           |		|      |	 |		|
|           |		|       |	 ||||||||

		|
		|			|         |
		|			| |       |
		|			|  |      |
	    |			|	 |    |
        |			|	  |   |
        |			|      |  |
		|			|       | |
||||||||			|         |

| |	   | |	| |   / /      | |
| |	   | |	| |  / /       | |
|  ----  |	| | / /        | |
|  ----  |	| | \ \     _  | |
| |	   | |  | |  \ \   | |_| |
|_|	   |_|	|_|   \_\  \_____|
*/

OI Wiki

上海市计算机学会竞赛平台

梅拉算智

对拍

原题机

AT

QOJ

QOJ 斗地主

OIerDb

OI教练模拟器

OI重开模拟器

好玩的

AI

网易云

白嫖

题解格式化工具

C++
namespace fast_IO{
    #define IOSIZE 100000
	static unsigned int precision=6,POW[10]={1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000};
	static char obuf[IOSIZE],*p3=obuf;
    #define putchar(x)((p3==obuf+IOSIZE)&&(fwrite(obuf,p3-obuf,1,stdout),p3=obuf),*p3++=x)
	inline int64_t read(){int64_t s=0;int f=1;char ch;while(ch=getchar(),!(ch>47&&ch<58)&&(ch!=EOF))if(ch=='-')f=-1;if(ch==EOF)return 0;while((ch>47&&ch<58))s=s*10+ch-48,ch=getchar();return s*f;}
	template<typename T>static inline bool read(T &s){s=0;int f=1;char ch;while(ch=getchar(),!(ch>47&&ch<58)&&(ch!=EOF))if(ch=='-')f=-1;if(ch==EOF)return 0;while((ch>47&&ch<58))s=s*10+ch-48,ch=getchar();return s*=f,1;}
	template<typename T>static inline void print(T x){if(x<0)putchar('-'),x=-x;if(x>9)print(x/10);putchar(x%10+48);}
	static inline bool read(char &s){while(s=getchar(),isspace(s)&&s!=EOF);return s!=EOF;}
	static inline void print(char x){putchar(x);}
	static inline bool read(char *s){char ch;while(ch=getchar(),(ch<33)&&ch!=EOF);if(ch==EOF)return 0;while(!(ch<33)&&(ch!=EOF))*s++=ch,ch=getchar();*s='\0';return 1;}
	static inline void print(char *x){while(*x)putchar(*x++);}
	static inline void print(const char *x){for(int i=0;x[i];i++)putchar(x[i]);}
	static inline bool read(std::string& s){s="";char ch;while(ch=getchar(),(ch<33)&&ch!=EOF);if(ch==EOF)return 0;while(!(ch<33))s+=ch,ch=getchar();return 1;}
	static inline void print(std::string x){for(int i=0,n=x.size();i<n;i++)putchar(x[i]);}
	static inline bool read(bool &b){char ch;while(ch=getchar(),(ch<33)&&ch!=EOF);return ch==EOF?0:(b=ch^48,1);}
	static inline void print(bool b){putchar(b+48);}
	static inline bool read(double &x){char ch=getchar();int f=1;for(;(ch<48||57<ch)&&(ch!=EOF);ch=getchar())if(ch=='-')f=-1;if(ch==EOF)return 0;for(x=0;47<ch&&ch<58;ch=getchar())x=x*10+(ch^48);if(ch!='.')	return x*=f,1;double y=0.1;for(ch=getchar();47<ch&&ch<58;ch=getchar())x+=y*(ch^48),y/=10;return x*=f,1;}
	static inline void print(double x){if(x<0)putchar('-'),x=-x;if(!precision)print((unsigned long long)(x-(unsigned long long)(x)>=0.5?x+1:x));else{unsigned long long xx=x;double y=((x-xx)*POW[precision]);unsigned long long yy=(y-(unsigned long long)(y)>=0.5?y+1:y);if(yy==POW[precision])xx++,yy=0;print(xx),putchar('.');for(int j=precision-1;~j;j--)	putchar(48+yy/POW[j]%10);}}
	template<typename T, typename...T1> static inline int read(T& a,T1&...other){return read(a)+read(other...);}
	template<typename T, typename...T1> static inline void print(T a, T1...other){print(a),print(other...);}
	static struct Fast_IO{
		bool flag=1;
		inline ~Fast_IO(){fwrite(obuf,p3-obuf,1,stdout);}
		inline void SetPrecision(int x){if(x>9)throw runtime_error("Precision too high!");else if(x<0)throw runtime_error("Precision too low!");else precision=x;}
		inline operator bool(){return flag;}
	}io;
	Fast_IO& operator>>(Fast_IO &io, char *b){return io.flag&=read(b),io;}
	template<typename T>static Fast_IO&operator>>(Fast_IO &io,T &b){return io.flag&=read(b),io;}
	template<typename T>static Fast_IO&operator<<(Fast_IO &io,T b){return print(b),io;}
    #define cout io
    #define cin io
}
using namespace fast_IO;