CS计算机代考程序代写 #include

#include

int main() {
int counter = 0;

for (int Annapolis = 0; Annapolis < 3; Annapolis++) { for (int Antigonish = 0; Antigonish < 3; Antigonish++) { for (int Cape_Breton = 0; Cape_Breton < 3; Cape_Breton++) { for (int Colchester = 0; Colchester < 3; Colchester++) { for (int Cumberland = 0; Cumberland < 3; Cumberland++) { for (int Digby = 0; Digby < 3; Digby++) { for (int Guysborough = 0; Guysborough < 3; Guysborough++) { for (int Halifax = 0; Halifax < 3; Halifax++) { for (int Hants = 0; Hants < 3; Hants++) { for (int Inverness = 0; Inverness < 3; Inverness++) { for (int Kings = 0; Kings < 3; Kings++) { for (int Lunenburg = 0; Lunenburg < 3; Lunenburg++) { for (int Pictou = 0; Pictou < 3; Pictou++) { for (int Queens = 0; Queens < 3; Queens++) { for (int Richmond = 0; Richmond < 3; Richmond++) { for (int Shelburne = 0; Shelburne < 3; Shelburne++) { for (int Victoria = 0; Victoria < 3; Victoria++) { for (int Yarmouth = 0; Yarmouth < 3; Yarmouth++) { if (Cumberland != Colchester && Digby != Annapolis && Guysborough != Antigonish && Halifax != Colchester && Halifax != Guysborough && Hants != Colchester && Hants != Halifax && Kings != Annapolis && Kings != Hants && Lunenburg != Annapolis && Lunenburg != Halifax && Lunenburg != Hants && Lunenburg != Kings && Pictou != Antigonish && Pictou != Colchester && Pictou != Guysborough && Queens != Annapolis && Queens != Digby && Queens != Lunenburg && Richmond != Cape_Breton && Richmond != Inverness && Shelburne != Queens && Victoria != Cape_Breton && Victoria != Inverness && Yarmouth != Digby && Yarmouth != Shelburne) { counter++; } } } } } } } } } } } } } } } } } } } printf("There are %i 3-colourings of Nova Scotia.\n", counter); return(0); }