ACM 1998 problem g