Study compares computer-science students from four countries, US ranks top