我会拿出我全部的钱财,以保你衣食无忧。我会献出我所有的智慧,以助你一帆风顺。我会想到所有的笑语,以令你展眉开颜。我会挤出最长的时间,以使你终生幸福。 [本人原创的结婚宣言]
int result;
int time = 0;
time++; //1
if (A.weight==B.weight) {
time++; //2
if (C[0].weight > C[1].weight) { //把C分成两等份,也就是每份2个
time++; //3
if (C[0][0].weight > C[0][1].weight) //把C[0]分成两等份,也就是每份1个
result = C[0][0];
else
result = C[0][1];
}
else {
time++; //3
if (C[1][0].weight > C[1][1].weight) //把C[1]分成两等份,也就是每份1个
result = C[1][0];
else
result = C[1][1];
}
}
else if (A.weight > B.weight) {
time++; //2
if (A[0].weight > A[1].weight) { //把A分成两等份,也就是每份2个
time++; //3
if (A[0][0].weight > A[0][1].weight) //把A[0]分成两等份,也就是每份1个
result = A[0][0];
else
result = A[0][1];
}
else {
time++; //3
if (A[1][0].weight > A[1][1].weight) //把A[1]分成两等份,也就是每份1个
result = A[1][0];
else
result = A[1][1];
}
}
else {
time++; //2
if (B[0].weight > B[1].weight) { //把B分成两等份,也就是每份2个
time++; //3
if (B[0][0].weight > B[0][1].weight) //把B[0]分成两等份,也就是每份1个
result = B[0][0];
else
result = B[0][1];
}
else {
time++; //3
if (B[1][0].weight > B[1][1].weight) //把B[1]分成两等份,也就是每份1个
result = B[1][0];
else
result = B[1][1];
}
}