Created
December 13, 2014 01:46
-
-
Save avamsi/d42ab898b965751cd920 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
template <class number> | |
void input(number *ptr) | |
{ | |
register char c = getchar_unlocked(); | |
while (c < 33) | |
c = getchar_unlocked(); | |
*ptr = 0; | |
while (c > 33) | |
{ | |
*ptr = (*ptr * 10) + (c - '0'); | |
c = getchar_unlocked(); | |
} | |
} | |
template <class number> | |
void print(number a) | |
{ | |
register char c; | |
char num[20]; | |
int i = 0; | |
do | |
{ | |
num[i++] = a%10 + 48; | |
a /= 10; | |
} while (a != 0); | |
i--; | |
while (i >= 0) | |
putchar_unlocked(num[i--]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment