Page 1 of 19

Q488

Posted: Tue May 28, 2002 6:26 am
by rmukadam
Hi, I wonder whats going wrong with this Que. I keep on getting WA.
i have tested e'thing n seems it gves me correct results......any suggestions....

Posted: Tue May 28, 2002 9:18 am
by Adrian Kuegel
You haven't considered that the problem is in multiple input format, right?
Please read http://acm.uva.es/problemset/minput.html

problem 488

Posted: Sun Jun 02, 2002 7:34 pm
by shatl
Hi all.
i have a question: subj - the last problem what i try to solve. there is a code. the my answers as look like a true (sample input and more another), but i recive only WA. i read article about multiple input, but not clearly understand it. please help me!
(i'm f student and this programm one of the component my term work)

#include <stdio.h>
#include <stdlib.h>

int i,j,freq,amp;

int main ()

{ while(!feof(stdin))
{
scanf("%d" "%d",&amp,&freq);
if(feof) break;
}

do
{ j=0;
for (j=0;j<=amp-1;j++)
for (i=1;i<=j+1;i++)
{
printf("%d",j+1); //output until amplitude
if (i==j+1)
printf("\n");
}
//output after amplitude
for (j;j>=1;j--)
for (i=1;i<=j-1;i++)
{
printf("%d",j-1);
if (i==j-1)
printf("\n");
}

printf("\n");

freq--;
} while (freq!=0);
return 0;
}

Wrong Answer

Posted: Sun Jun 16, 2002 6:48 pm
by Ming Han
I keep receiving wrong answer....
I sent in 5 times....

By the way, the question did not say that it is a multiple input problem.

Posted: Sun Jun 16, 2002 6:51 pm
by Caesum
thats what the blue tick is for, and it does have a blue tick

Posted: Sun Jun 16, 2002 6:52 pm
by 10153EN
It has stated to be a multiple input problem~

Note the blue checkmark beside the problem number in the volume contents.

Please help with 488

Posted: Sat Jun 29, 2002 5:22 am
by zakaria
Can some one tell me why it is W.A??

#include<iostream.h>

int main()
{

unsigned long a,f;

while(cin>>a>>f)
{
if(a<=9)
{
for(unsigned long i=1;i<=f;i++)
{
unsigned long j;
for(j=1;j<=a;j++)
{
for(unsigned long k=1;k<=j;k++)
cout<<j;
cout<<"\n";
}
for(unsigned long l=j-2;l>=1;l--)
{
for(unsigned long k=1;k<=l;k++)
cout<<l;
cout<<"\n";
}
if(i!=f)cout<<"\n";
}
}
}
return 0;
}

Posted: Sat Jun 29, 2002 8:37 am
by Picard
this problem has multiple input (with blue flag)
http://acm.uva.es/problemset/minput.html

What's with Multiple Input?

Posted: Sat Jun 29, 2002 6:20 pm
by ec3_limz
I myself have submitted the same problem over and over again. W. A. all the time.

Um, Picard, I do not actually see why it is wrong answer. The question did not say that then number of test cases will be more than one. Is there anything special about questions having multiple input?

Posted: Sat Jun 29, 2002 6:42 pm
by 10153EN
Did you note that the *tick mark* beside the problem number in the problems contents is blue in colour? It means the problem is of multiple input.

The format of multiple input question can be referred as http://acm.uva.es/problemset/minput.html, as Picard said.

Posted: Sun Jun 30, 2002 10:38 pm
by zakaria
Is'nt a multiple input program?
Kindly tell me about blue flag.

Posted: Sun Jun 30, 2002 10:52 pm
by zakaria
Yes it has accepted.
Thanks to all..

Posted: Sun Jun 30, 2002 10:58 pm
by zakaria
Take an extra input for case number though it is not
said to take in the problem.
Wish you good luck.

488: Please help me out from this WA

Posted: Tue Aug 06, 2002 2:33 am
by razibcse
Program is in C..please help me..it always gets WA..
And what about the last line?

#include <stdio.h>

void main()
{
long a,f,b,i,j,k;
scanf("%ld\n%ld",&a,&f);
if(a<=9)
{
for(i=0;i<f;i++)
{
for(j=1;j<=a;j++)
{
b=j;
for(k=1;k<=b;k++)
printf("%ld",b);
printf("\n");
}
for(j=a-1;j>=1;j--)
{
b=j;
for(k=1;k<=b;k++)
printf("%ld",b);
printf("\n");
}
if(i!=(f-1))
printf("\n");
}
}

}

why WA again and again?

Posted: Sat Aug 10, 2002 11:02 am
by liusu
:cry: :cry:
my pascal can't meet the problem of multiple input..but i only get WA?
can you help me ?
thank u very.