I am trying to identify a novel written in the mid-late 60s. In the near future, students attend an elite, high rise university. They are given unprecedented freedom to skip class and form sexual liaisons, but those who fail are beheaded in a public ceremony.
If you are happy with hanging rather than beheading, then it may be "Primary Education of the Camiroi" by R.A. Lafferty.
Synopsis of sorts: http://text-patterns.thenewatlantis.com/2009/01/learning-from-camiroi.html