int main(){ CompositeSmash C; cout << C.thePossible(517,47) << endl; cout << C.thePossible(8,4) << endl; cout << C.thePossible(12,6) << endl; cout << C.thePossible(5,8) << endl; cout << C.thePossible(100000,100000) << endl; cout << C.thePossible(5858,2) << endl; cout << C.thePossible(81461,2809) << endl; cout << C.thePossible(65536,256) << endl; cout << C.thePossible(3,2) << endl; return 0; }
double test2() { int p0 = 12; int p1 = 6; CompositeSmash * obj = new CompositeSmash(); clock_t start = clock(); string my_answer = obj->thePossible(p0, p1); clock_t end = clock(); delete obj; cout <<"Time: " <<(double)(end-start)/CLOCKS_PER_SEC <<" seconds" <<endl; string p2 = "No"; cout <<"Desired answer: " <<endl; cout <<"\t\"" << p2 <<"\"" <<endl; cout <<"Your answer: " <<endl; cout <<"\t\"" << my_answer<<"\"" <<endl; if (p2 != my_answer) { cout <<"DOESN'T MATCH!!!!" <<endl <<endl; return -1; } else { cout <<"Match :-)" <<endl <<endl; return (double)(end-start)/CLOCKS_PER_SEC; } }