usaco: ride solution in java, c++11 and ansi c

Signed-off-by: Rohit Yadav <bhaisaab@baagi.org>