初STL

sort(a.begin(), a.end());
iter_print(a.begin(), a.end());
vector<int> buf(a.size(), 0);
iter_print(buf.begin(), buf.end());
adjacent_difference(a.begin(), a.end(), buf.begin());
iter_print(buf.begin(), buf.end());

return *min_element(buf.begin() + 1, buf.end());	

おお、できたできた。
buf.begin() + 1とか書いてあるとbuf.begin()が整数かのように勘違いしてしまうけど、これはイテレータSTLのエラーメッセージの読み方もだいたいわかってきた。