  We solve the problem of describing all nonlocal Hamiltonian operators of
hydrodynamic type with flat metrics. This problem is also equivalent to the
description of all flat submanifolds with flat normal bundle in a
pseudo-Euclidean space. It is proved that every such Hamiltonian operator (or
the submanifold corresponding to the operator) gives a pencil of compatible
Poisson brackets, generates bi-Hamiltonian integrable hierarchies of
hydrodynamic type, and also defines a family of integrals in involution. We
prove that a natural special class of such Hamiltonian operators (submanifolds)
is described exactly by the equations of associativity of two-dimensional
topological quantum field theory (the Witten--Dijkgraaf--Verlinde--Verlinde and
Dubrovin equations). It is shown that locally any N-dimensional Frobenius
manifold can be presented by a certain special flat N-dimensional submanifold
with flat normal bundle in a 2N-dimensional pseudo-Euclidean space. This
submanifold is defined uniquely up to motions.
