11294 - Wedding

All about problems in Volume 112. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

gvcormac
Problemsetter & Reviewer
Posts: 194
Joined: Fri Mar 15, 2002 2:00 am
Contact:

Post by gvcormac »

tanvir wrote:hey cormac
i
so i have to ready a program after a lot of thoughts
but when it comes WA for poor judge data (for giving the breaking conditions) it really frustrated us.

best regard
tanvir
If you got WA it is because your program is wrong.

By weak data, I mean that the judge gives AC when it should give WA,
not that it gives WA when it should give AC.

tanvir
New poster
Posts: 22
Joined: Wed Aug 31, 2005 12:09 pm

Post by tanvir »

thnx cormac for reply

i got WA with my code several times
but few minutes ago when i delete the while condition and delete the breaking condition from my code i got AC.

So why i cant i say that the judge data is faulty
when it doesnot work when i wrote like this:

Code: Select all

while(scanf("%ld%ld",&n,&q)==2)
{
  if(n==0&&q==0)
  break;
}
but it work when i remove the while

gvcormac
Problemsetter & Reviewer
Posts: 194
Joined: Fri Mar 15, 2002 2:00 am
Contact:

Post by gvcormac »

tanvir wrote:thnx cormac for reply

i got WA with my code several times
but few minutes ago when i delete the while condition and delete the breaking condition from my code i got AC.

So why i cant i say that the judge data is faulty
when it doesnot work when i wrote like this:

Code: Select all

while(scanf("%ld%ld",&n,&q)==2)
{
  if(n==0&&q==0)
  break;
}
but it work when i remove the while
I said that if you got WA your program is wrong. Prove me wrong by showing me a correct program that gets WA. I don't believe any such program exists.

tanvir
New poster
Posts: 22
Joined: Wed Aug 31, 2005 12:09 pm

Post by tanvir »

hey cormac look below:
the problem said for the last test case should be: 0 0
but the judge data has no input like 0 0
now for this coding technique you will get wa in this problem

Code: Select all

#include<stdio.h>
int main()
{	long i,n,q;
	char c;
while(scanf("%ld%ld",&n,&q)==2)
{	if(n==0&&q==0)
		break;	
		for(i=0;i<q;i++)
		{
			scanf("%ld%c%ld%c",&n,&c,&n,&c);
		}
/*other porcesses*/
}	return 0;
}
though the coding technique is right

Now when you write like this:

Code: Select all

#include<stdio.h>
int main()
{	long i,n,q;
	char c;
scanf("%ld%ld",&n,&q);
		for(i=0;i<q;i++)
		{
			scanf("%ld%c%ld%c",&n,&c,&n,&c);
		}
/*other porcesses*/
	return 0;
}
you will get ac which is not right at all.

cormac i think you have understand the problem.
im here not to make any unhealthy discussion.
it costs valuable time(while im coding for different problem right now)

i think the judge should take correction. at least
include the ending input: 0 0

best regard
tanvir[/code]

gvcormac
Problemsetter & Reviewer
Posts: 194
Joined: Fri Mar 15, 2002 2:00 am
Contact:

Post by gvcormac »

tanvir wrote:hey cormac look below:
the problem said for the last test case should be: 0 0
but the judge data has no input like 0 0
now for this coding technique you will get wa in this problem

Code: Select all

#include<stdio.h>
int main()
{	long i,n,q;
	char c;
while(scanf("%ld%ld",&n,&q)==2)
{	if(n==0&&q==0)
		break;	
		for(i=0;i<q;i++)
		{
			scanf("%ld%c%ld%c",&n,&c,&n,&c);
		}
/*other porcesses*/
}	return 0;
}
though the coding technique is right

Now when you write like this:

Code: Select all

#include<stdio.h>
int main()
{	long i,n,q;
	char c;
scanf("%ld%ld",&n,&q);
		for(i=0;i<q;i++)
		{
			scanf("%ld%c%ld%c",&n,&c,&n,&c);
		}
/*other porcesses*/
	return 0;
}
you will get ac which is not right at all.

cormac i think you have understand the problem.
im here not to make any unhealthy discussion.
it costs valuable time(while im coding for different problem right now)

i think the judge should take correction. at least
include the ending input: 0 0

best regard
tanvir[/code]
If you download the file A.1.dat at the Waterloo site, you'll get the judge data. There's also a checking program called Echeck.c. Try your program on that data and use Echeck.c to evaluate your output.

If your program generates the correct output for this data, then either the uva.es site is misconfigured, or you're mistaken.

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo »

I don't think there is any problem on this problem. I was using cin and it works fine both for the online judge and waterloo's judge.

But I must admit that the online judge is weak on several problems. Sometimes runtime errors or even wrong answers will still get accepted. The admins are already busy fixing these bugs.

Almost everytime when I don't get AC, then there probably is a bug in my code. If I'm really sure there is no bug, then I would contact the problemsetter to discuss the issue and maybe correct the problem. Fortunately I have only done that on 3 problems over last 3 years and solving 1600+ problems. So I would say the accuracy of the online judge is pretty good.

serur
A great helper
Posts: 251
Joined: Thu Feb 23, 2006 11:30 pm

Re: 11294 - Wedding

Post by serur »

The tricky part is to impose a condition that the bride herself seats in the same side of the table....
If there is ever a war between men and machines, it is easy to guess who will start it (c) Arthur Clarke

Post Reply

Return to “Volume 112 (11200-11299)”