Exemple #1
0
int main()
{
	vector<string> vv = { "helloand",
		"welcomet",
		"osingler",
		"oundmatc",
		"hsixhund",
		"redandsi",
		"xtythree",
		"goodluck" };

	ChessFloor cf;
	int mini = cf.minimumChanges(vv);

	return 0;
}
int main(){
#ifndef ONLINE_JUDGE
    freopen("testdata.in", "r", stdin);
    clock_t clk = clock();
#endif
    solver.n = 3;
    solver.check('s', 'd');
    
    
    
    
#ifndef ONLINE_JUDGE
    printf("Time Elapsed: %luMS\n",(clock() - clk)/CLK_TCK/10);
#endif
    
    return 0;
}
Exemple #3
0
int main( int argc, char* argv[] ) {
    {
        string floorARRAY[] = {"aba",
            "bbb",
            "aba"}
           ;
        vector <string> floor( floorARRAY, floorARRAY+ARRSIZE(floorARRAY) );
        ChessFloor theObject;
        eq(0, theObject.minimumChanges(floor),1);
    }
    {
        string floorARRAY[] = {"wbwbwbwb",
            "bwbwbwbw",
            "wbwbwbwb",
            "bwbwbwbw",
            "wbwbwbwb",
            "bwbwbwbw",
            "wbwbwbwb",
            "bwbwbwbw"}
            ;
        vector <string> floor( floorARRAY, floorARRAY+ARRSIZE(floorARRAY) );
        ChessFloor theObject;
        eq(1, theObject.minimumChanges(floor),0);
    }
    {
        string floorARRAY[] = {"zz",
            "zz"};
        vector <string> floor( floorARRAY, floorARRAY+ARRSIZE(floorARRAY) );
        ChessFloor theObject;
        eq(2, theObject.minimumChanges(floor),2);
    }
    {
        string floorARRAY[] = {"helloand",
            "welcomet",
            "osingler",
            "oundmatc",
            "hsixhund",
            "redandsi",
            "xtythree",
            "goodluck"};
        vector <string> floor( floorARRAY, floorARRAY+ARRSIZE(floorARRAY) );
        ChessFloor theObject;
        eq(3, theObject.minimumChanges(floor),56);
    }
    {
        string floorARRAY[] = {"jecjxsengslsmeijrmcx",
            "tcfyhumjcvgkafhhffed",
            "icmgxrlalmhnwwdhqerc",
            "xzrhzbgjgabanfxgabed",
            "fpcooilmwqixfagfojjq",
            "xzrzztidmchxrvrsszii",
            "swnwnrchxujxsknuqdkg",
            "rnvzvcxrukeidojlakcy",
            "kbagitjdrxawtnykrivw",
            "towgkjctgelhpomvywyb",
            "ucgqrhqntqvncargnhhv",
            "mhvwsgvfqgfxktzobetn",
            "fabxcmzbbyblxxmjcaib",
            "wpiwnrdqdixharhjeqwt",
            "xfgulejzvfgvkkuyngdn",
            "kedsalkounuaudmyqggb",
            "gvleogefcsxfkyiraabn",
            "tssjsmhzozbcsqqbebqw",
            "ksbfjoirwlmnoyyqpbvm",
            "phzsdodppzfjjmzocnge"};
        vector <string> floor( floorARRAY, floorARRAY+ARRSIZE(floorARRAY) );
        ChessFloor theObject;
        eq(4, theObject.minimumChanges(floor),376);
    }
	return 0;
}