TOP SECRET (Please Enter)

Yes... I program on a unix machine, and I have never compiled anything before in windows but I guess it should be straightforward. I'll have a look at it tonight.

Thanks. We can make it work.

If you have questions about what is needed feel free to ask me.
 
I am fairly good at the maths but it has been a while. If you want help trouble shooting feel free to keep me in the loop.
 
I am fairly good at the maths but it has been a while. If you want help trouble shooting feel free to keep me in the loop.

I will keep you in the loop. Offer noted. Thanks.
 
Allright, I made program and as far as I can judge it works fine. I made it such that you give it as input the category number (1=gnp, 2=mfg, etc.) followed by the values listed in demographics screen. So to calculate GNP you would enter:

Democalc(1,17,21,15,1,5)

Below is the output that the program gives for the various categories, using the values for t=18 that you posted below.

Have a look if this is indeed the info that you need. Please check it very carefully, cause I don't know if it is bug free!

GNP:
Spoiler :

>Democalc(1,17,21,15,1,5)
DEMOGRAPHICS CALCULATOR
(calculating GNP (Gold))

The average value is 15, so the total ranges from 75 to 79
The known values are 1 (worst) and 21 (best)

Our rank is 5
So the maximum number of opponents allowed to score higher is: 4
and the maximum number of opponents allowed to score lower is: 1

Possiblities:
for a total of: 75
(21, 18, 18, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 19, 17, 17, 1) 2 opponents score better/1 opponents score worse.
(21, 19, 18, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 19, 19, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 17, 16, 1) 2 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 18, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 19, 14, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 20, 13, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 16, 16, 1) 2 opponents score better/3 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 17, 15, 1) 2 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 18, 14, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 19, 13, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 20, 12, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 21, 11, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
for a total of: 76
(21, 18, 18, 18, 1) 4 opponents score better/1 opponents score worse.
(21, 19, 18, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 19, 19, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 17, 17, 1) 2 opponents score better/1 opponents score worse.
(21, 20, 18, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 19, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 20, 14, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 17, 16, 1) 2 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 18, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 19, 14, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 20, 13, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 21, 12, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
for a total of: 77
(21, 19, 18, 18, 1) 4 opponents score better/1 opponents score worse.
(21, 19, 19, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 20, 18, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 20, 19, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 20, 20, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 17, 17, 1) 2 opponents score better/1 opponents score worse.
(21, 21, 18, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 19, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 20, 14, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 21, 13, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
for a total of: 78
(21, 19, 19, 18, 1) 4 opponents score better/1 opponents score worse.
(21, 20, 18, 18, 1) 4 opponents score better/1 opponents score worse.
(21, 20, 19, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 20, 20, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 18, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 21, 19, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 20, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 21, 14, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
for a total of: 79
(21, 19, 19, 19, 1) 4 opponents score better/1 opponents score worse.
(21, 20, 19, 18, 1) 4 opponents score better/1 opponents score worse.
(21, 20, 20, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 21, 18, 18, 1) 4 opponents score better/1 opponents score worse.
(21, 21, 19, 17, 1) 3 opponents score better/1 opponents score worse.
(21, 21, 20, 16, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5
(21, 21, 21, 15, 1) 3 opponents score better/2 opponents score worse. INVALID! our rank would be higher than 5

Summary for GNP (Gold):
Best value = 21
2nd value ranges from 18 to 21
3rd value ranges from 17 to 20
4th value ranges from 17 to 19
Worst value = 1



Mfg
Spoiler :

>Democalc(2,2,4,2,2,5)
DEMOGRAPHICS CALCULATOR
(calculating Mfg. Goods (Prod.))

The average value is 2, so the total ranges from 10 to 14
The known values are 2 (worst) and 4 (best)

Our rank is 5
So the maximum number of opponents allowed to score higher is: 4
and the maximum number of opponents allowed to score lower is: 1

Possiblities:
for a total of: 10
for a total of: 11
for a total of: 12
(4, 2, 2, 2, 2) 1 opponents score better/0 opponents score worse.
for a total of: 13
(4, 3, 2, 2, 2) 2 opponents score better/0 opponents score worse.
for a total of: 14
(4, 3, 3, 2, 2) 3 opponents score better/0 opponents score worse.
(4, 4, 2, 2, 2) 2 opponents score better/0 opponents score worse.

Summary for Mfg. Goods (Prod.):
Best value = 4
2nd value ranges from 2 to 4
3rd value ranges from 2 to 3
4th value = 2
Worst value = 2



CY
Spoiler :

>Democalc(3,10,10,7,5,1)
DEMOGRAPHICS CALCULATOR
(calculating Crop Yield (Food))

The average value is 7, so the total ranges from 35 to 39
The known values are 5 (worst) and 10 (best)

Our rank is 1
So the maximum number of opponents allowed to score higher is: 0
and the maximum number of opponents allowed to score lower is: 5

Possiblities:
for a total of: 35
(10, 7, 7, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 8, 6, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 8, 7, 5, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 6, 5, 5) 0 opponents score better/4 opponents score worse.
(10, 10, 5, 5, 5) 0 opponents score better/3 opponents score worse.
for a total of: 36
(10, 7, 7, 7, 5) 0 opponents score better/4 opponents score worse.
(10, 8, 7, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 8, 8, 5, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 6, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 7, 5, 5) 0 opponents score better/4 opponents score worse.
(10, 10, 6, 5, 5) 0 opponents score better/3 opponents score worse.
for a total of: 37
(10, 8, 7, 7, 5) 0 opponents score better/4 opponents score worse.
(10, 8, 8, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 7, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 8, 5, 5) 0 opponents score better/4 opponents score worse.
(10, 10, 6, 6, 5) 0 opponents score better/3 opponents score worse.
(10, 10, 7, 5, 5) 0 opponents score better/3 opponents score worse.
for a total of: 38
(10, 8, 8, 7, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 7, 7, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 8, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 9, 5, 5) 0 opponents score better/4 opponents score worse.
(10, 10, 7, 6, 5) 0 opponents score better/3 opponents score worse.
(10, 10, 8, 5, 5) 0 opponents score better/3 opponents score worse.
for a total of: 39
(10, 8, 8, 8, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 8, 7, 5) 0 opponents score better/4 opponents score worse.
(10, 9, 9, 6, 5) 0 opponents score better/4 opponents score worse.
(10, 10, 7, 7, 5) 0 opponents score better/3 opponents score worse.
(10, 10, 8, 6, 5) 0 opponents score better/3 opponents score worse.
(10, 10, 9, 5, 5) 0 opponents score better/3 opponents score worse.

Summary for Crop Yield (Food):
Best value = 10
2nd value ranges from 7 to 10
3rd value ranges from 5 to 9
4th value ranges from 5 to 8
Worst value = 5


Soldiers
Spoiler :

>Democalc(4,5000,12000,6000,4000,3)
DEMOGRAPHICS CALCULATOR
(calculating Soldiers)

The average value is 6000, so the total is 30000
The known values are 4000 (worst) and 12000 (best)

Our rank is 3
So the maximum number of opponents allowed to score higher is: 2
and the maximum number of opponents allowed to score lower is: 3

Possiblities:
for a total of: 30000
(12000, 5000, 5000, 4000, 4000) 1 opponents score better/2 opponents score worse.
(12000, 6000, 4000, 4000, 4000) 2 opponents score better/3 opponents score worse.

Summary for Soldiers:
Best value = 12000
2nd value ranges from 5000 to 6000
3rd value ranges from 4000 to 5000
4th value = 4000
Worst value = 4000


Land Area
Spoiler :

>Democalc(5,14000,15000,13400,11000,4)
DEMOGRAPHICS CALCULATOR
(calculating Land Area)

The average value is 13400, so the total is 67000
The known values are 11000 (worst) and 15000 (best)

Our rank is 4
So the maximum number of opponents allowed to score higher is: 3
and the maximum number of opponents allowed to score lower is: 2

Possiblities:
for a total of: 67000
(15000, 14000, 14000, 13000, 11000) 1 opponents score better/2 opponents score worse.
(15000, 15000, 13000, 13000, 11000) 2 opponents score better/3 opponents score worse. INVALID! our rank would be higher than 4
(15000, 15000, 14000, 12000, 11000) 2 opponents score better/2 opponents score worse.
(15000, 15000, 15000, 11000, 11000) 3 opponents score better/2 opponents score worse.

Summary for Land Area:
Best value = 15000
2nd value ranges from 14000 to 15000
3rd value ranges from 14000 to 15000
4th value ranges from 11000 to 13000
Worst value = 11000



Pop
Spoiler :

>Democalc(6,6000,6000,3000,1000,2)
DEMOGRAPHICS CALCULATOR
(calculating Population)

The average value is 3000, so the total is 15000
The known values are 1000 (worst) and 6000 (best)

Our rank is 2
So the maximum number of opponents allowed to score higher is: 1
and the maximum number of opponents allowed to score lower is: 4

Possiblities:
for a total of: 15000
(6000, 3000, 3000, 2000, 1000) 0 opponents score better/4 opponents score worse.
(6000, 4000, 2000, 2000, 1000) 0 opponents score better/4 opponents score worse.
(6000, 4000, 3000, 1000, 1000) 0 opponents score better/4 opponents score worse.
(6000, 5000, 2000, 1000, 1000) 0 opponents score better/4 opponents score worse.
(6000, 6000, 1000, 1000, 1000) 0 opponents score better/3 opponents score worse.

Summary for Population:
Best value = 6000
2nd value ranges from 3000 to 6000
3rd value ranges from 1000 to 3000
4th value ranges from 1000 to 2000
Worst value = 1000
 
and:

Approval rate
Spoiler :

>Democalc(7,75,85,78,71,4)
DEMOGRAPHICS CALCULATOR
(calculating Approval Rate)

The average value is 78, so the total ranges from 390 to 394
The known values are 71 (worst) and 85 (best)
The 3 unknown values add up to 234

Our rank is 4
So the maximum number of opponents allowed to score higher is: 3
and the maximum number of opponents allowed to score lower is: 2

Possiblities:
for a total of: 390
(85, 78, 78, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 79, 78, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 79, 79, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 77, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 78, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 79, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 80, 80, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 81, 77, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 78, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 81, 79, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 81, 80, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 81, 81, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 76, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 77, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 82, 78, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 79, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 80, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 81, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 76, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 83, 77, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 78, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 79, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 80, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 75, 75, 71) 2 opponents score better/1 opponents score worse.
(85, 84, 76, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 77, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 78, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 79, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 75, 74, 71) 2 opponents score better/2 opponents score worse.
(85, 85, 76, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 77, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 78, 71, 71) 3 opponents score better/2 opponents score worse.
for a total of: 391
(85, 79, 78, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 79, 79, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 78, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 79, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 80, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 81, 77, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 78, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 79, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 81, 80, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 81, 81, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 77, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 78, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 82, 79, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 80, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 81, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 82, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 76, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 83, 77, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 83, 78, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 79, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 80, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 81, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 76, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 84, 77, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 78, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 79, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 80, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 75, 75, 71) 2 opponents score better/1 opponents score worse.
(85, 85, 76, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 77, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 78, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 79, 71, 71) 3 opponents score better/2 opponents score worse.
for a total of: 392
(85, 79, 79, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 78, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 79, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 80, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 78, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 79, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 80, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 81, 81, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 77, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 78, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 79, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 82, 80, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 81, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 82, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 77, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 83, 78, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 83, 79, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 80, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 81, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 82, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 76, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 84, 77, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 84, 78, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 79, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 80, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 81, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 76, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 85, 77, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 78, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 79, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 80, 71, 71) 3 opponents score better/2 opponents score worse.
for a total of: 393
(85, 79, 79, 79, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 79, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 80, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 78, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 79, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 80, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 81, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 82, 78, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 79, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 80, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 82, 81, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 82, 82, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 77, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 83, 78, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 83, 79, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 83, 80, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 81, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 82, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 83, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 77, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 84, 78, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 84, 79, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 80, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 81, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 82, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 76, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 85, 77, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 85, 78, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 79, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 80, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 81, 71, 71) 3 opponents score better/2 opponents score worse.
for a total of: 394
(85, 80, 79, 79, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 80, 80, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 79, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 80, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 81, 81, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 78, 78, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 79, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 80, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 82, 81, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 82, 82, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 78, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 83, 79, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 83, 80, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 83, 81, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 82, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 83, 83, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 77, 77, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 84, 78, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 84, 79, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 84, 80, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 81, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 82, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 84, 83, 71, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 77, 76, 71) 4 opponents score better/1 opponents score worse. INVALID! our rank would be lower than 4
(85, 85, 78, 75, 71) 3 opponents score better/1 opponents score worse.
(85, 85, 79, 74, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 80, 73, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 81, 72, 71) 3 opponents score better/2 opponents score worse.
(85, 85, 82, 71, 71) 3 opponents score better/2 opponents score worse.

Summary for Approval Rate:
Best value = 85
2nd value ranges from 80 to 85
3rd value ranges from 75 to 83
4th value ranges from 71 to 75
Worst value = 71


Life exp
Spoiler :

>Democalc(8,75,87,83,77,6)
DEMOGRAPHICS CALCULATOR
(calculating Life Expectancy)

The average value is 83, so the total ranges from 415 to 419
The known values are 77 (worst) and 87 (best)

Our rank is 6
So the maximum number of opponents allowed to score higher is: 5
and the maximum number of opponents allowed to score lower is: 0

Possiblities:
for a total of: 415
(87, 84, 84, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 85, 83, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 85, 84, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 85, 85, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 83, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 84, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 85, 80, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 86, 79, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 82, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 83, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 84, 80, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 85, 79, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 86, 78, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 87, 77, 77) 5 opponents score better/0 opponents score worse.
for a total of: 416
(87, 84, 84, 84, 77) 5 opponents score better/0 opponents score worse.
(87, 85, 84, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 85, 85, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 83, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 84, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 85, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 86, 80, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 83, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 84, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 85, 80, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 86, 79, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 87, 78, 77) 5 opponents score better/0 opponents score worse.
for a total of: 417
(87, 85, 84, 84, 77) 5 opponents score better/0 opponents score worse.
(87, 85, 85, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 84, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 85, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 86, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 83, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 84, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 85, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 86, 80, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 87, 79, 77) 5 opponents score better/0 opponents score worse.
for a total of: 418
(87, 85, 85, 84, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 84, 84, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 85, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 86, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 84, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 85, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 86, 81, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 87, 80, 77) 5 opponents score better/0 opponents score worse.
for a total of: 419
(87, 85, 85, 85, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 85, 84, 77) 5 opponents score better/0 opponents score worse.
(87, 86, 86, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 84, 84, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 85, 83, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 86, 82, 77) 5 opponents score better/0 opponents score worse.
(87, 87, 87, 81, 77) 5 opponents score better/0 opponents score worse.

Summary for Life Expectancy:
Best value = 87
2nd value ranges from 84 to 87
3rd value ranges from 82 to 87
4th value ranges from 77 to 85
Worst value = 77
 
Thank you very much for that Norton I. That should get us started very nicely. We might be able to improve it a bit, but I didn't notice any errors and that should help us out quite a bit. So how do I get it? And I guess I need a compiler.

This and figuring how ties are calculated ought to help us out a lot.
 
Yeah, I didn't use tie-breaker priority list that you posted yet. It would have been easier if we were at the top or bottom of the list... now it's a bit confusing. But it can be used to restrict cases in which 2 or more opponent share the same value with us.

Tomorrow I'll try and see if I can make a user friendly version that runs under windows. I guess that if I compile it for windows it should work on every windows machine... so let's try that first, then you don't need a compiler on your side.
 
Yeah, I didn't use tie-breaker priority list that you posted yet. It would have been easier if we were at the top or bottom of the list... now it's a bit confusing. But it can be used to restrict cases in which 2 or more opponent share the same value with us.

Tomorrow I'll try and see if I can make a user friendly version that runs under windows. I guess that if I compile it for windows it should work on every windows machine... so let's try that first, then you don't need a compiler on your side.

I guess you could say that since we are second to last in the tie-breaker list (quatronia, merlot, cdz, sirius, AMAZON, mavericks) we can rule out cases where we have the same number as multiple other teams and our rank is ahead of more than one (6 - tiebreaker.rank) of the teams with that same number. Example: we have 17 GNP. Our rank is second because a team has 20. Say a possible value combination is 20, 17, 17, 16, 16. It wouldn't kick this out because not more than 1 team > than us and not more than 4 teams < us. But we could eliminate this case because we wouldn't be ranked ahead of two teams with the same number as us. This is small, and may not make an appearance very often so wouldn't be that hard to do by hand.

This will save me a lot of time and scratch paper. Thanks again for this.
 
I managed to compile the code under windows, but it's all a little bit harder than on a mac... at least I know now how to make it work under windows XP. What windows version do you use?

I attached the code in a zip file
 

Attachments

  • democalc.c.zip
    2.1 KB · Views: 191
I managed to compile the code under windows, but it's all a little bit harder than on a mac... at least I know now how to make it work under windows XP. What windows version do you use?

I attached the code in a zip file

I have Vista. I can try to compile and run, if it's easier.
 
There shouldn't be any problem to compile that code.

How do you compile stuff under windows? I downloaded cygwin, which did the trick but has 2 problems: a) it still depends on some cygwin libraries b) it can only be run in the cygwin environment or in a dos window. (because you have to be able to give command line input).

There are three options:
1) install cygwin if you want to use it
2) copy the needed cygwin libraries and run it in a DOS window (available in windows XP but I am not sure if Vista or 7 also has it)
3) I could adapt the code so it can run interactively

The third would be the most elegant, but it would also take the most time.

The second option is the fastest/easiest if it works... but I can't check it myself 'cause I don't have Vista.

Silent, could you try the following
1.Go to the Start Menu
2.Enter 'cmd' in the Start Search box
If this opens an interactive window in which you can type commands, then I think it will work
 
Silent, could you try the following
1.Go to the Start Menu
2.Enter 'cmd' in the Start Search box
If this opens an interactive window in which you can type commands, then I think it will work

Yes. It opens a command prompt window where you can type things.
 
Then this should work....

1. Open the attached zip file and put all files in C:\democalc (or any other location you wish)

2. Go to "Start Search" and type 'cmd'

3. In the window type:

cd c:\democalc
democalc 1 17 21 15 1 5

...or of course any other set of numbers.

Hope it works! :goodjob:
 

Attachments

  • Archive.zip
    1.2 MB · Views: 188
Then this should work....

1. Open the attached zip file and put all files in C:\democalc (or any other location you wish)

2. Go to "Start Search" and type 'cmd'

3. In the window type:

cd c:\democalc
democalc 1 17 21 15 1 5

...or of course any other set of numbers.

Hope it works! :goodjob:

It does indeed work. Thanks Norton I.
 
Wait, so what does it do?
 
Top Bottom