- /**************FAST-IO***************/
- void getnum( int &x)
- {
- x=0;
- char ch=getchar_unlocked();
- while( ch<'0' || ch>'9')
- ch=getchar_unlocked();
- while( ch>='0' && ch<='9')
- {
- x= 10*x+ ch-'0';
- ch=getchar_unlocked();
- }
- }
- void putnum( int x)
- {
- char s[30];
- int pi=-1;
- do{
- s[++pi]= (x-x/10*10)+'0';
- x/=10;
- }
- while( x>0);
- ++pi;
- while( pi)
- putchar_unlocked(s[--pi]);
- putchar_unlocked(' ');
- }
- /************************************/
No comments:
Post a Comment