#include <stdio.h> #include <math.h> //m>=0, n>=0 int power1(int m, int n) { if(n == 0) return 1; if(n == 1) return m; if(n&1) return m*power1(m, n-1); else { int v = power1(m, n>>1); return v*v; } } int power2(int m, int n) { int ret = 1; int tmp = m; do{ if(n&1) ret *= tmp; n >>= 1; tmp *= tmp; }while (n); return ret; } int hash[10000]; int power3(int m, int n) { return pow((float)m,n); } #include <stdlib.h> #include <time.h> void test_driver() { srand(unsigned(time(N