ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1094. E-screen

help for wa 9
Posted by fredAC 11 Sep 2009 14:55
wrong on the following  code
///////////////////////
if(pos >maxline -1)
  pos = 0;
  a[pos++] = char;
////////////////////
when test case:
aaaaaaaaaaa.......a(total 80 a)<b
b should in pos 1 instead of erasing pos 80
Re: help for wa 9
Posted by INNOV.Team 14 Feb 2011 16:46
Yeah, my program's output is exactly "baaaaaaaaaa....a". But I still got WA#9.
Re: help for wa 9
Posted by AYUBXON UBAYDULLAYEV TUIT 12 Nov 2012 19:39
if(pos >maxline -1)
  pos = 0;
  a[pos++] = char;
  if (pos>maxline-1) pos=0;
// may be this help for you

Edited by author 12.11.2012 19:43