Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:Huge input,Java is not recommended.In Reply To:Huge input,Java is not recommended. Posted by:Judas at 2006-03-15 21:29:45 > -_- > - _ - Use BufferedOutputStream, and array of ' ', '-' BufferedOutputStream out=new BufferedOutputStream(System.out, 1024); ... String space=" "; String dash="--------------------------------"; for (int i=0;i<5;i++) { space+=space; dash+=dash; } this.space=space.getBytes(); this.dash=dash.getBytes(); ... out.write(space, 0, width-alen); out.write(abytes, 0, alen); out.write('\n'); ... etc. 1000x faster. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator