rennos #9385(2009/07/17 15:07 GMT) [ HSP ] Rating0/0=0.00
後ろから反復してみました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#module #define true 1 #define false 0 #defcfunc IsSteepSlope array arr, \ local size, local nowSum, local bResult size = length(arr) nowSum = 0 bResult = true repeat size, 1 if ( cnt == 1 || nowSum < arr(size - cnt) ) { nowSum += arr(size - cnt) } else { bResult = false break } loop return bResult #global list = 128, 64, 32, 16, 8, 4 mes IsSteepSlope(list) stop
Rating0/0=0.00-0+
[ reply ]
rennos
#9385()
[
HSP
]
Rating0/0=0.00
後ろから反復してみました。
#module #define true 1 #define false 0 #defcfunc IsSteepSlope array arr, \ local size, local nowSum, local bResult size = length(arr) nowSum = 0 bResult = true repeat size, 1 if ( cnt == 1 || nowSum < arr(size - cnt) ) { nowSum += arr(size - cnt) } else { bResult = false break } loop return bResult #global list = 128, 64, 32, 16, 8, 4 mes IsSteepSlope(list) stopRating0/0=0.00-0+
[ reply ]