Page 2 of 2
10331- Wa
Posted: Wed Dec 17, 2003 5:46 pm
by babor
Hai everybody,
I got wa at 10331 Flyover construction.
Any hints or advice to avoid this .
Thanks in advance
Posted: Thu Jan 01, 2004 7:39 am
by erfan
Hello all greathelper,
I also got WA in this problem.
I solve it by shortest path (again and again.)
Please give me such critical I/O to test my code.
Thanks in advance.
Re: I am having real trouble with 10331 the Flyover construction
Posted: Tue Apr 01, 2008 5:38 pm
by rhsumon
Presentation Error:::::::: Why PE
My output code is like,
Code: Select all
for(i=1; i<=m; i++){
if(count[i]==max){
printf("%d",i);
if(i<m) printf(" ");
}
}
printf("\n");
Is there any problem .............
plz give some adv.
Re: I am having real trouble with 10331 the Flyover construction
Posted: Tue Apr 01, 2008 9:19 pm
by Jan
rhsumon wrote:Presentation Error:::::::: Why PE
My output code is like,
Code: Select all
for(i=1; i<=m; i++){
if(count[i]==max){
printf("%d",i);
if(i<m) printf(" ");
}
}
printf("\n");
Is there any problem .............
plz give some adv.
Of course, there is. Just think that count[m-1] = max and count [m] < max.... Then a trailing space will be printed. Am I right? You can solve this problem easily...
Code: Select all
int flag=0;
for(i=1; i<=m; i++){
if(count[i]==max){
if(flag++) printf(" ");
printf("%d",i);
}
}
printf("\n");
Hope it helps.
Re: I am having real trouble with 10331 the Flyover construction
Posted: Wed Apr 02, 2008 7:58 pm
by rhsumon
Thnkx but some problem........
But is that false.......... if i reform my code like that..
Code: Select all
Actually i've understood..........
What a stupid am i!!!!!!!!!!!!!!!!!!!!!!!!! :x
Is there also print any trailing " "? I'm confused.............
Ok u r correct but i am confusing abt that