正文
增加 638 行删除 0 行
82 行未改动8384858682 行未改动}using namespace FastIO;#define cin FastIO::fio#define cout FastIO::fio```82 行未改动838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372482 行未改动}using namespace FastIO;#define cin FastIO::fio#define cout FastIO::fio```超级加固后模板(???)```#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2")#pragma GCC diagnostic ignored "-Wunused-result"#pragma GCC diagnostic ignored "-Wsequence-point"#pragma GCC diagnostic ignored "-Wunused-variable"#pragma GCC diagnostic ignored "-Wunused-function"#include<cctype>#include<cstdint>#include<cstdio>#include<string>#include<type_traits>#include<cmath>#include<utility>#include<iomanip>#include<iostream>#if defined(__linux__)#include <sys/mman.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#endifnamespace FastIO{constexpr int IOSIZE=1<<20;char obuf[IOSIZE];char*p3=obuf;constexpr char lut[100][2]={{'0','0'},{'0','1'},{'0','2'},{'0','3'},{'0','4'},{'0','5'},{'0','6'},{'0','7'},{'0','8'},{'0','9'},{'1','0'},{'1','1'},{'1','2'},{'1','3'},{'1','4'},{'1','5'},{'1','6'},{'1','7'},{'1','8'},{'1','9'},{'2','0'},{'2','1'},{'2','2'},{'2','3'},{'2','4'},{'2','5'},{'2','6'},{'2','7'},{'2','8'},{'2','9'},{'3','0'},{'3','1'},{'3','2'},{'3','3'},{'3','4'},{'3','5'},{'3','6'},{'3','7'},{'3','8'},{'3','9'},{'4','0'},{'4','1'},{'4','2'},{'4','3'},{'4','4'},{'4','5'},{'4','6'},{'4','7'},{'4','8'},{'4','9'},{'5','0'},{'5','1'},{'5','2'},{'5','3'},{'5','4'},{'5','5'},{'5','6'},{'5','7'},{'5','8'},{'5','9'},{'6','0'},{'6','1'},{'6','2'},{'6','3'},{'6','4'},{'6','5'},{'6','6'},{'6','7'},{'6','8'},{'6','9'},{'7','0'},{'7','1'},{'7','2'},{'7','3'},{'7','4'},{'7','5'},{'7','6'},{'7','7'},{'7','8'},{'7','9'},{'8','0'},{'8','1'},{'8','2'},{'8','3'},{'8','4'},{'8','5'},{'8','6'},{'8','7'},{'8','8'},{'8','9'},{'9','0'},{'9','1'},{'9','2'},{'9','3'},{'9','4'},{'9','5'},{'9','6'},{'9','7'},{'9','8'},{'9','9'},};#if defined(__linux__)char*mmap_ptr=nullptr,*mmap_end=nullptr;char ibuf[IOSIZE];char*p1=ibuf,*p2=ibuf;bool use_mmap=false;inline void init_mmap(){int fd=fileno(stdin);struct stat st;if((fstat(fd,&st)==0)&(st.st_size>0)){void*p=mmap(nullptr,st.st_size,PROT_READ,MAP_PRIVATE,fd,0);if(p!=(void*)MAP_FAILED){mmap_ptr=(char*)p;mmap_end=mmap_ptr+st.st_size;use_mmap=true;return;}}use_mmap=false;p1=ibuf,p2=ibuf;}inline char _gc_mmap(){return (mmap_ptr>=mmap_end)?EOF:*mmap_ptr++;}inline char _gc_fread(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}inline char _gc(){return use_mmap?_gc_mmap():_gc_fread();}#elsechar ibuf[IOSIZE];char*p1=ibuf,*p2=ibuf;inline char _gc(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}inline void init_mmap(){}#endifinline void flush(){fwrite(obuf,1,p3-obuf,stdout);p3=obuf;}inline void _pc(char c){if(p3==obuf+IOSIZE){flush();}*p3++=c;}inline bool _isdigit(char c){return (c>='0')&(c<='9');}inline bool blank(const char x){return (x==' ')|(x=='\n')|(x=='\r')|(x=='\t');}constexpr uint64_t MUL10 = 0xCCCCCCCCCCCDULL;inline uint64_t div10_u64(uint64_t x){return (x * MUL10) >> 64;}inline uint64_t mod10_u64(uint64_t x){return x - div10_u64(x)*10;}template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntReader{static void read(T&x){char c;while(true){c=_gc();if(!blank(c))break;}uint64_t tmp=c^48;while(true){char nc=_gc();if(!_isdigit(nc)) break;c=nc;tmp=(tmp<<1)+(tmp<<3)+(c^48);}x=(T)tmp;}};template<typename T>struct IntReader<T,true>{static void read(T&x){char c;while(true){c=_gc();if(!blank(c))break;}bool neg=(c=='-');if(neg) c=_gc();uint64_t tmp=c^48;while(true){char nc=_gc();if(!_isdigit(nc)) break;c=nc;tmp=(tmp<<1)+(tmp<<3)+(c^48);}x=(T)(neg ? -tmp : tmp);}};template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntWriter{static void write(T x){if(x==0){_pc(48);return;}uint64_t v=(uint64_t)x;char tmp[64];int len=0;for(;v>=100;v=div10_u64(v)){uint64_t r=mod10_u64(v);tmp[++len]=lut[r][1];tmp[++len]=lut[r][0];}if(v>=10){tmp[++len]=lut[v][1];tmp[++len]=lut[v][0];}else{tmp[++len]=v+48;}while(len)_pc(tmp[len--]);}};template<typename T>struct IntWriter<T,true>{static void write(T x){if(x==0){_pc(48);return;}uint64_t v;if(x<0){_pc('-');v=~(uint64_t)x+1;}else{v=(uint64_t)x;}char tmp[64];int len=0;for(;v>=100;v=div10_u64(v)){uint64_t r=mod10_u64(v);tmp[++len]=lut[r][1];tmp[++len]=lut[r][0];}if(v>=10){tmp[++len]=lut[v][1];tmp[++len]=lut[v][0];}else{tmp[++len]=v+48;}while(len)_pc(tmp[len--]);}};inline void read(int&x){IntReader<int>::read(x);}inline void read(long long&x){IntReader<long long>::read(x);}inline void read(unsigned int&x){IntReader<unsigned int>::read(x);}inline void read(unsigned long long&x){IntReader<unsigned long long>::read(x);}inline void read(short&x){IntReader<short>::read(x);}inline void read(long&x){IntReader<long>::read(x);}inline void read(char&x){for(x=_gc();blank(x)&(x^EOF);x=_gc());}inline void read(bool&b){char c;for(c=_gc();blank(c)&(c^EOF);c=_gc());b=(c^'0')&(c^'f');}inline void read(char *x){char a=_gc();for(;blank(a)&(a^EOF);a=_gc());for(;(!blank(a))&(a^EOF);a=_gc())*x++=a;*x=0;}inline void read(std::string&s){s.clear();char a=_gc();for(;blank(a)&(a^EOF);a=_gc());for(;(!blank(a))&(a^EOF);a=_gc())s+=a;}template<typename T>static T pow10(int e){T r=1;if(e>0)for(int i=0;i<e;i++)r*=10;else for(int i=0;i<-e;i++)r*=0.1;return r;}template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type read(T&x){char c;while((!_isdigit(c=_gc()))&(c^'-')&(c^'.'));bool neg=(c=='-');if(c=='-')c=_gc();uint64_t intpart=0;while(_isdigit(c)){intpart=intpart*10+(c^48);c=_gc();}uint64_t fracpart=0;int frac_len=0;if(c=='.'){c=_gc();while(_isdigit(c)){fracpart=fracpart*10+(c^48);frac_len++;c=_gc();}}T res=(T)intpart;if(frac_len>0)res+=(T)fracpart*pow10<T>(-frac_len);if((c=='e')|(c=='E')){c=_gc();bool eneg=(c=='-');if((c=='+')|(c=='-'))c=_gc();int exp=0;while(_isdigit(c)){exp=exp*10+(c^48);c=_gc();}if(eneg)exp=-exp;res*=pow10<T>(exp);}if(neg)res=-res;x=res;}template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type write(T x,int prec=6,bool sci=false){if(x<0){_pc('-');x=-x;}if(sci){int exp=0;if(x>0){while(x>=10){x/=10;exp++;}while(x<1){x*=10;exp--;}}T rnd=0.5*pow10<T>(-prec);x+=rnd;long long ip=(long long)x;T fp=x-ip;IntWriter<long long>::write(ip);if(prec>0){_pc('.');for(int i=0;i<prec;i++){fp*=10;int d=(int)fp;_pc(d+48);fp-=d;}}_pc('e');if(exp<0){_pc('-');exp=-exp;}else{_pc('+');}if(exp<10)_pc('0');IntWriter<int>::write(exp);}else{long long ip=(long long)x;T fp=x-ip;T rnd=0.5*pow10<T>(-prec);fp+=rnd;long long carry=(long long)fp;ip+=carry;fp-=carry;IntWriter<long long>::write(ip);if(prec>0){_pc('.');for(int i=0;i<prec;i++){fp*=10;int d=(int)fp;_pc(d+48);fp-=d;}}}}inline void write(const std::pair<int,double> x){int a=x.first;if(a<7){double b=x.second,c=b;if(b<0){_pc('-');b=-b;c=-c;}double y=5*powl(10.0,-a-1);b+=y;c+=y;int len=0;char tmp[64];if(b<1)_pc(48);else for(;b>=1;b/=10)tmp[++len]=std::floor(b)-std::floor(b/10)*10+48;while(len)_pc(tmp[len--]);if(a)_pc('.');for(c*=10;a;a--,c*=10)_pc(std::floor(c)-std::floor(c/10)*10+48);}else{flush();std::cout<<std::fixed<<std::setprecision(a)<<x.second;}}inline void write(){}template<typename T,typename...Args>inline void write(const T&x,const Args&...args){write(x);write(args...);}template<typename T>inline void write(const T&x){IntWriter<T>::write(x);}struct FastIO{FastIO(){init_mmap();}~FastIO(){flush();}template<typename T>FastIO&operator>>(T&x){read(x);return*this;}template<typename T>FastIO&operator<<(const T&x){write(x);return*this;}FastIO&operator<<(double x){write(x,6,false);return*this;}FastIO&operator<<(float x){write(x,6,false);return*this;}template<typename T>FastIO&putf(T x,int prec,bool sci=false){write(x,prec,sci);return*this;}}fio;}using namespace FastIO;#define cin FastIO::fio#define cout FastIO::fio```这模板神了```#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2")#pragma GCC diagnostic ignored "-Wunused-result"#pragma GCC diagnostic ignored "-Wsequence-point"#pragma GCC diagnostic ignored "-Wunused-variable"#pragma GCC diagnostic ignored "-Wunused-function"#include<cctype>#include<cstdint>#include<cstdio>#include<string>#include<type_traits>#include<cmath>#include<utility>#include<iomanip>#include<iostream>#if defined(__linux__)#include <sys/mman.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#endifnamespace FastIO{constexpr int IOSIZE=1<<20;char obuf[IOSIZE];char*p3=obuf;constexpr char lut[100][2]={{'0','0'},{'0','1'},{'0','2'},{'0','3'},{'0','4'},{'0','5'},{'0','6'},{'0','7'},{'0','8'},{'0','9'},{'1','0'},{'1','1'},{'1','2'},{'1','3'},{'1','4'},{'1','5'},{'1','6'},{'1','7'},{'1','8'},{'1','9'},{'2','0'},{'2','1'},{'2','2'},{'2','3'},{'2','4'},{'2','5'},{'2','6'},{'2','7'},{'2','8'},{'2','9'},{'3','0'},{'3','1'},{'3','2'},{'3','3'},{'3','4'},{'3','5'},{'3','6'},{'3','7'},{'3','8'},{'3','9'},{'4','0'},{'4','1'},{'4','2'},{'4','3'},{'4','4'},{'4','5'},{'4','6'},{'4','7'},{'4','8'},{'4','9'},{'5','0'},{'5','1'},{'5','2'},{'5','3'},{'5','4'},{'5','5'},{'5','6'},{'5','7'},{'5','8'},{'5','9'},{'6','0'},{'6','1'},{'6','2'},{'6','3'},{'6','4'},{'6','5'},{'6','6'},{'6','7'},{'6','8'},{'6','9'},{'7','0'},{'7','1'},{'7','2'},{'7','3'},{'7','4'},{'7','5'},{'7','6'},{'7','7'},{'7','8'},{'7','9'},{'8','0'},{'8','1'},{'8','2'},{'8','3'},{'8','4'},{'8','5'},{'8','6'},{'8','7'},{'8','8'},{'8','9'},{'9','0'},{'9','1'},{'9','2'},{'9','3'},{'9','4'},{'9','5'},{'9','6'},{'9','7'},{'9','8'},{'9','9'},};#if defined(__linux__)char*mmap_ptr=nullptr,*mmap_end=nullptr;char ibuf[IOSIZE];char*p1=ibuf,*p2=ibuf;bool use_mmap=false;inline void init_mmap(){int fd=fileno(stdin);struct stat st;if((fstat(fd,&st)==0)&(st.st_size>0)){void*p=mmap(nullptr,st.st_size,PROT_READ,MAP_PRIVATE,fd,0);if(p!=(void*)MAP_FAILED){mmap_ptr=(char*)p;mmap_end=mmap_ptr+st.st_size;use_mmap=true;return;}}use_mmap=false;p1=ibuf,p2=ibuf;}#elsechar ibuf[IOSIZE];char*p1=ibuf,*p2=ibuf;inline void init_mmap(){}#endifinline void flush(){fwrite(obuf,1,p3-obuf,stdout);p3=obuf;}inline void _pc(char c){if(p3==obuf+IOSIZE){flush();}*p3++=c;}inline bool _isdigit(char c){return (c>='0')&(c<='9');}inline bool blank(const char x){return (x==' ')|(x=='\n')|(x=='\r')|(x=='\t');}constexpr uint64_t MUL10 = 0xCCCCCCCCCCCDULL;inline uint64_t div10_u64(uint64_t x){return (x * MUL10) >> 64;}inline uint64_t mod10_u64(uint64_t x){return x - div10_u64(x)*10;}template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntReader{static void read(T&x){char c;#if defined(__linux__)if(use_mmap){while(true){if(mmap_ptr>=mmap_end) return;c=*mmap_ptr++;if(!blank(c))break;}uint64_t tmp=c^48;while(true){if(mmap_ptr>=mmap_end)break;c=*mmap_ptr++;if(!_isdigit(c))break;tmp=(tmp<<1)+(tmp<<3)+(c^48);}}else{while(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) return;}c=*p1++;if(!blank(c))break;}uint64_t tmp=c^48;while(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) break;}c=*p1++;if(!_isdigit(c))break;tmp=(tmp<<1)+(tmp<<3)+(c^48);}}#elsewhile(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) return;}c=*p1++;if(!blank(c))break;}uint64_t tmp=c^48;while(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) break;}c=*p1++;if(!_isdigit(c))break;tmp=(tmp<<1)+(tmp<<3)+(c^48);}#endifx=(T)tmp;}};template<typename T>struct IntReader<T,true>{static void read(T&x){char c;bool neg=false;#if defined(__linux__)if(use_mmap){while(true){if(mmap_ptr>=mmap_end) return;c=*mmap_ptr++;if(!blank(c))break;}if(c=='-'){neg=true;if(mmap_ptr>=mmap_end){x=0;return;}c=*mmap_ptr++;}uint64_t tmp=c^48;while(true){if(mmap_ptr>=mmap_end)break;c=*mmap_ptr++;if(!_isdigit(c))break;tmp=(tmp<<1)+(tmp<<3)+(c^48);}}else{while(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) return;}c=*p1++;if(!blank(c))break;}if(c=='-'){neg=true;if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2){x=0;return;}}c=*p1++;}uint64_t tmp=c^48;while(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) break;}c=*p1++;if(!_isdigit(c))break;tmp=(tmp<<1)+(tmp<<3)+(c^48);}}#elsewhile(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) return;}c=*p1++;if(!blank(c))break;}if(c=='-'){neg=true;if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2){x=0;return;}}c=*p1++;}uint64_t tmp=c^48;while(true){if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) break;}c=*p1++;if(!_isdigit(c))break;tmp=(tmp<<1)+(tmp<<3)+(c^48);}#endifx=(T)(neg?-tmp:tmp);}};template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntWriter{static void write(T x){if(x==0){_pc(48);return;}uint64_t v=(uint64_t)x;char tmp[64];int len=0;for(;v>=100;v=div10_u64(v)){uint64_t r=mod10_u64(v);tmp[++len]=lut[r][1];tmp[++len]=lut[r][0];}if(v>=10){tmp[++len]=lut[v][1];tmp[++len]=lut[v][0];}else{tmp[++len]=v+48;}while(len)_pc(tmp[len--]);}};template<typename T>struct IntWriter<T,true>{static void write(T x){if(x==0){_pc(48);return;}uint64_t v;if(x<0){_pc('-');v=~(uint64_t)x+1;}else{v=(uint64_t)x;}char tmp[64];int len=0;for(;v>=100;v=div10_u64(v)){uint64_t r=mod10_u64(v);tmp[++len]=lut[r][1];tmp[++len]=lut[r][0];}if(v>=10){tmp[++len]=lut[v][1];tmp[++len]=lut[v][0];}else{tmp[++len]=v+48;}while(len)_pc(tmp[len--]);}};inline void read(int&x){IntReader<int>::read(x);}inline void read(long long&x){IntReader<long long>::read(x);}inline void read(unsigned int&x){IntReader<unsigned int>::read(x);}inline void read(unsigned long long&x){IntReader<unsigned long long>::read(x);}inline void read(short&x){IntReader<short>::read(x);}inline void read(long&x){IntReader<long>::read(x);}inline char gc(){#if defined(__linux__)if(use_mmap){if(mmap_ptr>=mmap_end) return EOF;return *mmap_ptr++;}else{if(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) return EOF;}return *p1++;}#elseif(p1>=p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1>=p2) return EOF;}return *p1++;#endif}inline void read(char&x){for(x=gc();blank(x)&(x^EOF);x=gc());}inline void read(bool&b){char c;for(c=gc();blank(c)&(c^EOF);c=gc());b=(c^'0')&(c^'f');}inline void read(char *x){char a=gc();for(;blank(a)&(a^EOF);a=gc());for(;(!blank(a))&(a^EOF);a=gc())*x++=a;*x=0;}inline void read(std::string&s){s.clear();char a=gc();for(;blank(a)&(a^EOF);a=gc());for(;(!blank(a))&(a^EOF);a=gc())s+=a;}template<typename T>static T pow10(int e){T r=1;if(e>0)for(int i=0;i<e;i++)r*=10;else for(int i=0;i<-e;i++)r*=0.1;return r;}template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type read(T&x){char c;while((!_isdigit(c=gc()))&(c^'-')&(c^'.'));bool neg=(c=='-');if(c=='-')c=gc();uint64_t intpart=0;while(_isdigit(c)){intpart=intpart*10+(c^48);c=gc();}uint64_t fracpart=0;int frac_len=0;if(c=='.'){c=gc();while(_isdigit(c)){fracpart=fracpart*10+(c^48);frac_len++;c=gc();}}T res=(T)intpart;if(frac_len>0)res+=(T)fracpart*pow10<T>(-frac_len);if((c=='e')|(c=='E')){c=gc();bool eneg=(c=='-');if((c=='+')|(c=='-'))c=gc();int exp=0;while(_isdigit(c)){exp=exp*10+(c^48);c=gc();}if(eneg)exp=-exp;res*=pow10<T>(exp);}if(neg)res=-res;x=res;}template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type write(T x,int prec=6,bool sci=false){if(x<0){_pc('-');x=-x;}if(sci){int exp=0;if(x>0){while(x>=10){x/=10;exp++;}while(x<1){x*=10;exp--;}}T rnd=0.5*pow10<T>(-prec);x+=rnd;long long ip=(long long)x;T fp=x-ip;IntWriter<long long>::write(ip);if(prec>0){_pc('.');for(int i=0;i<prec;i++){fp*=10;int d=(int)fp;_pc(d+48);fp-=d;}}_pc('e');if(exp<0){_pc('-');exp=-exp;}else{_pc('+');}if(exp<10)_pc('0');IntWriter<int>::write(exp);}else{long long ip=(long long)x;T fp=x-ip;T rnd=0.5*pow10<T>(-prec);fp+=rnd;long long carry=(long long)fp;ip+=carry;fp-=carry;IntWriter<long long>::write(ip);if(prec>0){_pc('.');for(int i=0;i<prec;i++){fp*=10;int d=(int)fp;_pc(d+48);fp-=d;}}}}inline void write(const std::pair<int,double> x){int a=x.first;if(a<7){double b=x.second,c=b;if(b<0){_pc('-');b=-b;c=-c;}double y=5*powl(10.0,-a-1);b+=y;c+=y;int len=0;char tmp[64];if(b<1)_pc(48);else for(;b>=1;b/=10)tmp[++len]=std::floor(b)-std::floor(b/10)*10+48;while(len)_pc(tmp[len--]);if(a)_pc('.');for(c*=10;a;a--,c*=10)_pc(std::floor(c)-std::floor(c/10)*10+48);}else{flush();std::cout<<std::fixed<<std::setprecision(a)<<x.second;}}inline void write(){}template<typename T,typename...Args>inline void write(const T&x,const Args&...args){write(x);write(args...);}template<typename T>inline void write(const T&x){IntWriter<T>::write(x);}struct FastIO{FastIO(){init_mmap();}~FastIO(){flush();}template<typename T>FastIO&operator>>(T&x){read(x);return*this;}template<typename T>FastIO&operator<<(const T&x){write(x);return*this;}FastIO&operator<<(double x){write(x,6,false);return*this;}FastIO&operator<<(float x){write(x,6,false);return*this;}template<typename T>FastIO&putf(T x,int prec,bool sci=false){write(x,prec,sci);return*this;}}fio;}using namespace FastIO;#define cin FastIO::fio#define cout FastIO::fio```