A secure maximum value computation apparatus, assuming that a set X = {[[x 1]], [[x 2]],..., [[x n]]}, wherein a value of a certain value a hid by encryption, secret sharing, or the like is referred to as a secret value of a and is represented as [[a]], comprising: an output unit configured to output [[x 1]] and [] as a maximum secret value [[y]] and a flag [[z(x 1)]], respectively, when n = 1 holds; and in the case where n = 1 does not hold: a comparison unit configured to compute comparison results of which is larger with respect to a predetermined order for every pairs {[[x i]], [[x j]]} ⊂ X of elements of the X; a flag computation unit configured to compute whether all comparison results related to each of the [[x i]]s are "large" for each of the [[x i]]s to set a computed value as a flag [[z(x i)]]; and a maximum value computation unit configured to use the [[z(x i)]] to compute a maximum value [[y]], wherein, assuming a function LE(x i, x j) that outputs [] when x i ≤ x j holds and outputs [] when x i ≤ x j does not hold, the comparison unit performs computations of LE(x i, x j) for every (i, j)s (i, j ∈ [1, n], i < j) to set computation results [[c i, j]]s as the comparison results; and assuming a function EQ([[a]], [[b]]) that outputs [] when a = b holds and outputs [] when a = b does not hold, the flag computation unit performs computations of 1 - [[c j, i]] for every (i, j)s (i, j ∈ [1, n], i > j) to set computation results as [[c i, j]]s and performs a computation of [[z(x i)]] ← EQ(Σ i ≠ j [[c i, j]], n - 1) for each i to set a computation result as a flag [[z(x i)]]. an output unit configured to output [[x 1]] and [] as a maximum secret value [[y]] and a flag [[z(x 1)]], respectively, when n = 1 holds; and in the case where n = 1 does not hold: a comparison unit configured to compute comparison results of which is larger with respect to a predetermined order for every pairs {[[x i]], [[x j]]} ⊂ X of elements of the X; a flag computation unit configured to compute whether all comparison results related to each of the [[x i]]s are "large" for each of the [[x i]]s to set a computed value as a flag [[z(x i)]]; and a maximum value computation unit configured to use the [[z(x i)]] to compute a maximum value [[y]], a comparison unit configured to compute comparison results of which is larger with respect to a predetermined order for every pairs {[[x i]], [[x j]]} ⊂ X of elements of the X; a flag computation unit configured to compute whether all comparison results related to each of the [[x i]]s are "large" for each of the [[x i]]s to set a computed value as a flag [[z(x i)]]; and a maximum value computation unit configured to use the [[z(x i)]] to compute a maximum value [[y]], assuming a function LE(x i, x j) that outputs [] when x i ≤ x j holds and outputs [] when x i ≤ x j does not hold, the comparison unit performs computations of LE(x i, x j) for every (i, j)s (i, j ∈ [1, n], i < j) to set computation results [[c i, j]]s as the comparison results; and assuming a function EQ([[a]], [[b]]) that outputs [] when a = b holds and outputs [] when a = b does not hold, the flag computation unit performs computations of 1 - [[c j, i]] for every (i, j)s (i, j ∈ [1, n], i > j) to set computation results as [[c i, j]]s and performs a computation of [[z(x i)]] ← EQ(Σ i ≠ j [[c i, j]], n - 1) for each i to set a computation result as a flag [[z(x i)]].