Page 3 of 3

Re: 10152 - ShellSort

Posted: Tue Mar 19, 2013 11:53 pm
by brianfry713
Don't print a blank line at the start of the output. Don't print a space on the blank lines.

Re: 10152 - ShellSort _ WA with PC judge

Posted: Sun Oct 12, 2014 3:59 am
by fresher96
if any one have interest in "programming-challenges.com" judge
do you have any idea what is wrong with it.
this is about the fifth problem for me that is accepted with uva and have "wrong answer" with PC judge
is the problem with that judge or the test cases are different which means that uva tests are weak or the problem is with the format (even they have the same description and samples)
any one who got it accepted there can share tips
or anyone know the problem !?
to submit http://www.programming-challenges.com/p ... bid=110407
&thanks

here's my code if needed

Code: Select all

#define MAX 81
#define NMAX 200
/**/
#include <stdio.h>
#include <string.h>
/**/
int T,n,i,j;
char fr[NMAX][MAX],to[NMAX][MAX];
/**/
int main()
{
	scanf("%d",&T);
	while(T--)
	{
		scanf("%d\n",&n);

		for(i=0; i<n; i++)
			gets(fr[i]);
		for(i=0; i<n; i++)
			gets(to[i]);

		j=n-1;
		for(i=n-1; i>=0; i--)
			if(strcmp(fr[i],to[j]) == 0)
				j--;

		for(i=j; i>=0; i--)
			printf("%s\n" , to[i]);
		printf("\n");
	}
	return 0;
}

Re: 10152 - ShellSort

Posted: Mon Oct 13, 2014 4:52 pm
by lighted
The following text is written here http://www.programming-challenges.com/pg.php?page=index
Welcome to Programming Challenges

This site is still in beta testing and several features are not yet completely stable. If you experience problems, please

(1) let us know by reporting them to revilla@mac.uva.es and
(2) test your submissions on the UVa Online Judge as well.

Some users have reported difficulties with Java, but C/C++ programs should work fairly reliably. Due to differences in compilers and operating systems, the two judges are not completely consistent, meaning that a program might get accepted by one judge but not the other. Do not feel too bad if the judge won't accept a program you are sure is correct, because it does not administer perfect justice. Do the best that you can and have fun with it!

Re: 10152 - ShellSort

Posted: Mon Oct 20, 2014 1:27 am
by fresher96
lighted wrote:The following text is written here http://www.programming-challenges.com/pg.php?page=index
thanks Mr. lighted :)