usaco: gift1 in java7, c++11 and ansi c

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