版本比较
题解 P2034 【选择数字】
正文
增加 8 行删除 8 行
23 行未改动24252627282928293031323334353637383435363738394041414243444514 行未改动23 行未改动
int n,k,temp;
inline char nc(){ static char buf[100000],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++; static char buf[100000],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;}
inline int read(){ char ch=nc(); int sum=0; while(!(ch>='0'&&ch <='9'))ch=nc(); while(ch>='0'&&ch<='9') sum=sum*10+ch-48,ch=nc(); return sum; } int sum=0; while(!(ch>='0'&&ch <='9'))ch=nc(); while(ch>='0'&&ch<='9') sum=sum*10+ch-48,ch=nc(); return sum;}
//快读
int main(){ n=read(),k=read(); for(int i=1;i<=n;i++){ temp=read();14 行未改动