UVA 的输出格式要求十分严格。
如果你的评测结果输出:
Wrong Answer.Presentation error.
请按照以下输出格式输出。
cin>>t; while(t--) { ...... cout<<ans<<'\n'; if(t) cout<<'\n'; }