int main(){ TeamsSelection t; std::vector<int> v1,v2; v1.push_back(1); v1.push_back(2); v1.push_back(3); v1.push_back(4); v2.push_back(1); v2.push_back(2); v2.push_back(3); v2.push_back(4); cout<<t.simulate(v1, v2)<<endl; return 0; }
bool do_test(vector<int> preference1, vector<int> preference2, string __expected, int caseNo) { cout << " Testcase #" << caseNo << " ... "; time_t startClock = clock(); TeamsSelection *instance = new TeamsSelection(); string __result = instance->simulate(preference1, preference2); double elapsed = (double)(clock() - startClock) / CLOCKS_PER_SEC; delete instance; if (__result == __expected) { cout << "PASSED!" << " (" << elapsed << " seconds)" << endl; return true; } else { cout << "FAILED!" << " (" << elapsed << " seconds)" << endl; cout << " Expected: " << pretty_print(__expected) << endl; cout << " Received: " << pretty_print(__result) << endl; return false; } }