Page 2 of 19

Posted: Sat Aug 10, 2002 11:22 am
by Adrian Kuegel
I think you didn't read the description of multiple input, because then you must have understand that the first input line is the number of test cases following.

Thank you!

Posted: Sat Aug 10, 2002 12:38 pm
by liusu
Thank you very much! now,with your few words,i understand the prblem..
thanks again!

Posted: Mon Oct 14, 2002 8:14 am
by Noim
You have to consider about MULTIPLE input segment. (BLUE flag)....

First you will scan an integer which means the number of input you have
to proceed.

then you wil make loop as many as the numbers you scan

Remember , you will print a blank line after a set of output.


Posted: Wed Dec 18, 2002 3:07 pm
by FlyDeath
Please put your code like this.It is easier to read.Thanks.
[cpp]
#include<stdio.h>

void main(){
int i,j,k,m,n;
while(scanf("%d %d",&i,&m)==2){
for(n=1;n<(m+1);n++)
{
for(j=1;j<i;j++){
for(k=1;k<(j+1);k++){
printf("%d",j);
}
printf("\n");
}

for(k=1;k<(i+1);k++){
printf("%d",i);
}
printf("\n");

for(j=(i-1);j>0;j--){
for(k=1;k<(j+1);k++){
printf("%d",j);
}
printf("\n");
}
if (n!=m) printf("\n");
}
}
}
[/cpp]

I think you misunderstood the problem.See the description more carefully.

488 - Accepted but P.E.

Posted: Tue Apr 29, 2003 3:24 am
by danielrocha
Hello everyone, I've got accepted at problem 488 (yes, I know it's a multiple input problem), but the judge says "Presentation Error". Anyone with the same problem? Don't know what to do, I've tried pretty much everything...
My code is below, thanks and greets from Brazil 8)

Daniel

[cpp]
#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
int l,i,j,k,ampl,freq,numrep;

scanf("%d",&numrep);
for (l=1;l<=numrep;l++) {
scanf("%d %d",&ampl,&freq);
for (k=1;k<=freq;k++) {
// prints the 1st "peak" of the wave
for (i=1;i<=ampl;i++) {
for (j=1;j<=i;j++)
cout << i;
cout << endl;
}
// prints the 2nd part of the wave
for (i=(ampl-1);i>=1;i--) {
for (j=1;j<=i;j++)
cout << i;
cout << endl;
}
if (k!=freq) cout << endl;
}
if (l!=numrep) cout << endl;
}
return 0;

}
[/cpp]

Posted: Wed Apr 30, 2003 6:40 am
by the LA-Z-BOy
well, don't bother much about p.e. as the OJ clearly says
The 24-hours judge takes it only as a warning. Don't worry a lot, since many of our problems have the output specification not very fine.
it is the case for p488 as well. output a blank line at the end of all the output sets and you'll overcome p.e. that is just change your code...
from...

Posted: Thu May 01, 2003 1:47 am
by danielrocha
Ok, thanks! Your tip didn't actually solve my problem (even with the modifications you said I'm still getting P.E.), but if the OJ tells me not to worry a lot...
I've heard that in real contests a P.E. is not considered an Accept. Is that true?

Thanks, greets from Brazil 8)

Daniel

Posted: Thu May 01, 2003 11:16 am
by the LA-Z-BOy
strange!!!!
i just have to ask you a question... did you submit the problem's solution (with modifation i said, off course) to any other judge than UVA Online Judge? :wink:

ps. i don't know about ``real contests'', but i can tell you about uva public contests where the judge takes presentation error as wrong answer (i.e not accepted).

488 WA , no idea

Posted: Sun May 25, 2003 11:38 pm
by kate
I'm getting a wrong answer and I have no idea why. I know it's multiple output and my answers look fine when I try them. Any ideas?

Code: Select all

#include <iostream>
using namespace std;

void line(int number)
{
	int times = 0;
	do {
		cout << number;
		times++;
	} while (times<number);
}

int main()
{
	int amp, freq;
	int count = 0, i = 0, j = 0, k = 0;
	int cases;

	cin >> cases;
	do {
		cin >> amp >> freq;
		if(amp==1) {
			do {
				cout << 1 << endl;
				j++;
				if(j<freq)
					cout << endl;
			} while(j<freq);
		}
		else if(amp==0) {
			do {
				k++;
				if(k<freq)
					cout << endl;
			} while(k<freq);
		}
		else {
			do {
				int number = 1;
				do {
					line(number);
					cout << endl;
					number++;
				} while (number<=amp);
				number=amp-1;
				do {
					line(number);
					cout << endl;
					number--;
				} while (number>=1);
				count++;
				if (count<freq)
					cout << endl;
			} while (count<freq);
		}
		i++;
		count = 0;
		if(i<cases)
			cout << endl;
	}while(i<cases);
	return 0;
}

Posted: Fri Jun 06, 2003 6:14 pm
by Tanzim-Saqib
I think you have not got the answer yet. So I am trying to help you.
NOTE: There is a blank line after each separate waveform, excluding the last one.
Read the problem statement carefully, and I hope you can solve this very easy problem.

Posted: Thu Jun 12, 2003 7:52 am
by Dominik Michniewski
Multiply input ?

DM

Posted: Fri Jun 13, 2003 7:45 am
by Dominik Michniewski
Multiply input is shown as blue checkmark near to problem title. And it does not have any correlation with this, what is written in problem description.

Best regrads
DM

PS. Send me private message ;-) with proper code

488 prob,plizzzzzzzzzz help

Posted: Sat Aug 16, 2003 5:16 am
by Riyad

bosssssssss i am in trouble , i dont understand these following line:

NOTE: There is a blank line after each separate waveform, excluding the last one.



here is my code . pliz help me bossssssssssss.

[c]

Code: Select all


#include<stdio.h>



int main(){

	register int i , j ,k;
	int a,f,count=0,check=0;

	
	while(scanf("%d %d",&a,&f)==2){

		if(check!=0){
			printf("\n");
		}
		for(i=0,count=0;i<f;i++,count++){

			for(j=1;j<=a;j++){
				for(k=0;k<j;k++){

					printf("%d",j);
				}
				printf("\n");

			}

			for(j=a-1;j>=1;j--){
				for(k=0;k<j;k++){

					printf("%d",j);
				}
				printf("\n");
			}
			if(count!=f-1){
				printf("\n");
			}

		}
		
		check++;


	
	}
	
	return 0;
}

[b][i][u]

thanx in advance[/u][/i][/b]
[/c]

Posted: Sat Aug 16, 2003 5:36 am
by LittleJohn
It's a multipla-input problem (blue checkmark).
http://acm.uva.es/problemset/minput.html 8)

488, got ac

Posted: Sat Aug 16, 2003 4:30 pm
by Riyad
thanx buddy for u r help little john . for a new person like me it s a great help.
Riyad :P :D