for the ACM contest