The 2019 China Collegiate Programming Contest Harbin Site E Exchanging Gifts 快读模板
#includeusingnamespacestd;#definelllonglongconstintN=1e6+10;inlinecharnc(){staticcharbuf[1000000],*p1=buf,*p2=buf;returnp1==p2&&(p2=(p1=buf)+fread(buf,1,1000000,stdin),p1==p2)?EOF:*p1++;}templateinlin