ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1216. Two Pawns and One King

Who help me? (I alvaes got WA#24) code not included!
Posted by Нищий Наглец 27 Jun 2005 20:00
I not understand Why i got WA #24?
!!!! help me !!!!
Re: Who help me? (I alvaes got WA#24) code not included!
Posted by Нищий Наглец 28 Jun 2005 22:36
Now I got WA #48!
help plz!
Give me some tests!
Posted by Нищий Наглец 28 Jun 2005 22:45
my program get correct answers for all tests in forum!!

Who help me?
Re: Give me some tests!
Posted by Ich 29 Jun 2005 12:48
Try these tests:
232
8
a1 a5 h1
BLACK WINS
8
a2 a7 h1
BLACK WINS
8
b4 a7 h1
BLACK WINS
8
b2 c4 h1
BLACK WINS
8
c5 c4 h1
WHITE WINS
8
d6 d7 h1
BLACK WINS
8
d5 c6 h1
WHITE WINS
8
d5 h7 h1
WHITE WINS
8
d7 h7 d8
BLACK WINS
8
a7 h7 a8
BLACK WINS
8
d4 h7 b4
BLACK WINS
8
d4 h7 b3
WHITE WINS
8
d4 h7 d3
WHITE WINS
8
d2 h7 c2
WHITE WINS
8
d2 h7 d3
BLACK WINS
8
d3 h7 h3
BLACK WINS
8
d4 h7 h3
WHITE WINS
8
d4 h7 h4
WHITE WINS
8
d4 h7 h8
WHITE WINS
8
d4 h7 a8
BLACK WINS
8
d6 h7 f8
WHITE WINS
8
d5 h7 f7
BLACK WINS
8
d5 h7 b7
BLACK WINS
8
a5 h2 a1
BLACK WINS
8
a5 g2 a1
BLACK WINS
8
a5 f2 a1
WHITE WINS
8
a5 h2 e4
WHITE WINS
8
a5 g2 e3
WHITE WINS
8
a5 h2 h1
WHITE WINS
8
a4 h2 h1
BLACK WINS
8
a4 g2 g1
BLACK WINS
8
a5 g2 g1
WHITE WINS
8
a5 g2 d5
BLACK WINS
8
h5 a2 a5
BLACK WINS
8
h5 a2 a1
WHITE WINS
8
h5 a2 b2
WHITE WINS
8
h5 b2 a5
BLACK WINS
8
h5 b2 b1
WHITE WINS
8
h5 b2 e4
WHITE WINS
8
h5 h2 a5
BLACK WINS
8
h5 h3 a5
WHITE WINS
8
c5 c2 c1
WHITE WINS
8
c4 c2 c1
BLACK WINS
8
d2 c2 c1
BLACK WINS
8
d3 c3 c2
WHITE WINS
8
d4 c4 c3
WHITE WINS
8
d4 c2 c1
WHITE WINS
8
e4 e2 h1
BLACK WINS
8
e5 e2 h1
BLACK WINS
8
e6 d6 c6
WHITE WINS
8
e5 d5 c5
BLACK WINS
8
e5 d6 c6
WHITE WINS
8
e4 d5 c5
BLACK WINS
8
d4 a7 f4
BLACK WINS
8
d4 e5 f4
BLACK WINS
8
a3 h7 e3
BLACK WINS
8
a3 d4 e3
WHITE WINS
8
a5 b6 d6
WHITE WINS
8
a5 h6 d6
WHITE WINS
8
a2 a7 h1
BLACK WINS
8
a6 a5 h1
WHITE WINS
8
a3 b6 h1
BLACK WINS
8
a6 b6 h1
WHITE WINS
8
d5 c6 f5
WHITE WINS
8
d5 c6 a5
WHITE WINS
8
b4 d5 e4
WHITE WINS
8
b3 h7 f3
BLACK WINS
8
b2 h7 g2
WHITE WINS
8
b4 b3 h2
BLACK WINS
8
b5 b3 h2
WHITE WINS
8
b5 b2 b3
WHITE WINS
8
a4 g3 h8
BLACK WINS
8
a4 g3 g2
WHITE WINS
8
a4 h3 h8
BLACK WINS
8
a4 h3 g2
WHITE WINS
8
d3 g4 h3
WHITE WINS
8
d3 f5 h3
WHITE WINS
8
d3 e6 h3
BLACK WINS
8
d3 g3 h3
BLACK WINS
8
d2 g4 h3
WHITE WINS
8
d2 g3 h3
BLACK WINS
8
d2 f5 h3
WHITE WINS
8
d2 f3 f1
WHITE WINS
8
d2 f2 f1
BLACK WINS
8
a2 h3 h1
BLACK WINS
8
a2 h4 h1
WHITE WINS
8
a2 h4 g1
BLACK WINS
8
a2 h4 g2
WHITE WINS
8
a2 h3 g2
BLACK WINS
8
a2 g3 g2
BLACK WINS
8
a2 g4 g2
WHITE WINS
8
a2 g4 g1
WHITE WINS
8
a2 g4 f1
BLACK WINS
8
a2 b4 h1
BLACK WINS
8
d6 c7 e6
WHITE WINS
8
d6 d7 e6
BLACK WINS
8
d6 e7 e6
BLACK WINS
8
a2 c5 a1
WHITE WINS
8
a2 c4 a1
WHITE WINS
8
a2 g4 a1
BLACK WINS
8
a2 h7 a3
BLACK WINS
8
a2 d4 c3
BLACK WINS
8
b2 c3 h1
WHITE WINS
8
b2 c3 h2
BLACK WINS
8
b2 c3 h2
BLACK WINS
8
b2 c3 c2
WHITE WINS
8
b2 c3 a2
BLACK WINS
8
b2 c2 c1
BLACK WINS
8
b6 b2 c1
WHITE WINS
8
b5 b2 c1
BLACK WINS
8
b5 b2 b1
WHITE WINS
8
b5 b2 b3
WHITE WINS
8
a2 b3 b2
WHITE WINS
8
a3 b4 b3
BLACK WINS
8
a3 b4 b2
WHITE WINS
8
b5 c6 d6
WHITE WINS
8
a4 b5 c4
BLACK WINS
8
a3 b4 c3
BLACK WINS
8
a5 b6 c5
WHITE WINS
8
a2 h5 h8
WHITE WINS
8
a2 h4 h8
BLACK WINS
8
a2 h5 h1
WHITE WINS
8
a2 h5 h2
WHITE WINS
8
a2 h3 h2
BLACK WINS
8
a2 h4 h1
WHITE WINS
8
a2 e3 f2
BLACK WINS
8
a2 d4 e3
WHITE WINS
8
a2 e4 e3
BLACK WINS
8
b4 c5 d5
BLACK WINS
8
b5 c6 d6
WHITE WINS
8
b2 c3 d3
BLACK WINS
8
b2 c3 d2
BLACK WINS
8
b4 h3 h8
BLACK WINS
8
b5 h3 h8
WHITE WINS
8
b4 h4 h8
WHITE WINS
8
b4 h3 h1
WHITE WINS
8
b3 h3 h1
BLACK WINS
8
b2 h3 h1
BLACK WINS
8
a5 a2 h1
BLACK WINS
8
a6 a2 h1
WHITE WINS
8
a5 a2 a1
WHITE WINS
8
a5 a2 a3
WHITE WINS
8
a5 g2 h1
BLACK WINS
8
a5 g2 g1
WHITE WINS
8
a4 g2 h1
BLACK WINS
8
a5 g2 h1
BLACK WINS
8
b5 g2 g1
WHITE WINS
8
b5 g2 f2
WHITE WINS
8
b5 g2 e3
WHITE WINS
8
g5 g2 h1
BLACK WINS
8
g5 g2 g1
WHITE WINS
8
g5 g2 g3
WHITE WINS
8
h5 g2 g3
WHITE WINS
8
h5 g2 g5
BLACK WINS
8
h5 a2 a3
BLACK WINS
8
h5 a2 b2
WHITE WINS
8
h5 a2 c3
WHITE WINS
8
h6 a2 b1
WHITE WINS
8
g5 a2 a3
BLACK WINS
8
g6 a2 a3
WHITE WINS
8
g5 a2 b2
WHITE WINS
8
g4 a2 b2
BLACK WINS
8
a5 a2 b2
BLACK WINS
8
a6 a2 b2
WHITE WINS
8
a5 a2 a1
WHITE WINS
8
a5 a2 a3
WHITE WINS
8
a8 a2 b2
WHITE WINS
8
b5 a2 b2
WHITE WINS
8
b5 a2 a3
WHITE WINS
8
b4 a2 a3
BLACK WINS
8
b4 a2 b1
BLACK WINS
8
b4 a2 b2
BLACK WINS
8
b4 a2 b3
BLACK WINS
8
b5 a2 b2
WHITE WINS
8
b5 a2 b1
WHITE WINS
8
g5 a2 b1
BLACK WINS
8
g6 a2 b1
WHITE WINS
8
g5 a2 b2
WHITE WINS
8
d5 a7 a8
WHITE WINS
8
d5 a7 b8
BLACK WINS
8
d5 a7 a5
WHITE WINS
8
d3 a3 a2
WHITE WINS
8
d3 a3 d2
BLACK WINS
8
d2 c3 a1
WHITE WINS
8
d2 c3 c2
WHITE WINS
8
d2 c3 b2
BLACK WINS
8
a6 a7 a8
BLACK WINS
8
g4 e7 d7
BLACK WINS
8
g5 e7 d7
WHITE WINS
8
g6 h7 h8
BLACK WINS
8
g6 h7 f8
WHITE WINS
8
g6 h7 g8
BLACK WINS
8
g6 h7 g7
BLACK WINS
8
d6 e7 d7
BLACK WINS
8
d6 e7 e8
BLACK WINS
8
d6 e7 b8
WHITE WINS
8
d6 e7 f8
WHITE WINS
8
d6 e7 f7
WHITE WINS
8
d6 e7 g8
WHITE WINS
8
d6 e6 f7
WHITE WINS
8
d5 e6 f7
BLACK WINS
8
d5 e6 f6
WHITE WINS
8
d5 e6 b6
WHITE WINS
8
d5 e6 c7
BLACK WINS
8
b4 c5 a4
BLACK WINS
8
b4 c5 e5
BLACK WINS
8
b4 c5 f5
WHITE WINS
8
b6 c7 a6
WHITE WINS
8
b6 c7 b7
BLACK WINS
8
b6 c7 c6
BLACK WINS
8
c5 d6 e6
WHITE WINS
8
a7 b7 a8
BLACK WINS
8
a7 b7 c7
WHITE WINS
8
a6 b7 c7
WHITE WINS
8
a6 b7 b8
BLACK WINS
8
a6 b7 b6
BLACK WINS
8
a5 b6 c6
WHITE WINS
8
a4 b5 c5
BLACK WINS
8
b5 c6 d6
WHITE WINS
8
a6 a7 a8
BLACK WINS
8
b6 c7 a8
WHITE WINS
8
b6 c7 b8
BLACK WINS
8
a2 b2 b1
BLACK WINS
8
a4 b2 b1
WHITE WINS
8
a4 g2 g1
BLACK WINS
8
a4 h2 h1
BLACK WINS
8
d6 c7 e6
WHITE WINS
8
d6 c7 b7
WHITE WINS
8
d6 c7 c8
BLACK WINS
8
a3 b4 b3
BLACK WINS
8
a3 b4 b2
WHITE WINS
8
c3 d4 b3
BLACK WINS
Thanks
Posted by Нищий Наглец 30 Jun 2005 01:20

Thanks for the help!
I get(or got) AC.
I too!
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 30 Jun 2005 01:20

I too get AC!
Re: some tests
Posted by Kit 23 Jul 2005 20:21
I check all this tests, but still get WA2 and WA6. May be, here another interesting cases?
Thanks.
This 2 tests uncorrect!!!
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 26 Jul 2005 00:39

but I foget numbers!! sorry!
Oh my god now I got WA82!!!!!
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 29 Jul 2005 00:14

after redjude i got WA82!
hahahaha
Posted by Anatoliy 'Tolyan_NO' Tolstobroff 24 Sep 2005 16:54

I fixe Wa82 but now next test Wa83.

now Wa83.
of course NOW AC
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 24 Sep 2005 17:33

I very Happy!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

You are happy for me?
Re: Give me some tests!
Posted by Fly [Yaroslavl_SU] 13 Oct 2005 18:03
This is too many test. So i write a simply testing program.
You should create 4 files:

/* --------------- testgen.c -----------------*/

#include <stdio.h>
#include <process.h>
#include <string.h>

char S[ 123 ], A[ 123 ];

int main()
{
    int i;
    freopen( "tests.txt", "rt", stdin );

    for( i = 1; scanf( "%[^\n]%*c", S ) != EOF; i++ )
    {
        sprintf( A, "1216in.%d", i );
        freopen( A, "wt", stdout );

        printf( "%s\n", S );
        scanf( "%[^\n]%*c", S );
        printf( "%s\n", S );

        fclose( stdout );

        sprintf( A, "1216ans.%d", i );
        freopen( A, "wt", stdout );

        scanf( "%[^\n]%*c", S );
        printf( "%s\n", S );

        fclose( stdout );
    }

    fclose( stdin );
    return 0;
}

/* ---------------- tester.c -------------------*/

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

char S[ 123 ], A[ 123 ];

int main( int count, char *arg[] )
{
    int i, j;

    j = atoi( arg[ 1 ] );

    freopen( "1216test.bat", "wt", stdout );

    for( i = 1; i <= j; i++ )
    {
        printf( "call 1216.bat %d\n", i );
    }

    fclose( stdout );
    return 0;
}

/* -------------------- checker.c ---------------- */

#include <stdio.h>
#include <string.h>

char Ans[ 123 ], Out[ 123 ];

int main( int count, char *arg[] )
{
    FILE *fans = fopen( arg[ 1 ], "rt" );
    FILE *fout = fopen( arg[ 2 ], "rt" );

    fscanf( fans, "%[^\n]", Ans );
    fscanf( fout, "%[^\n]", Out );

    if( strcmp( Ans, Out ) == 0 )
        printf( "%s: Ok\n", arg[ 3 ] );
    else
        printf( "%s: Wrong answer\n", arg[ 3 ] );

    fclose( fans );
    fclose( fout );
    return 0;
}

/* -------------- 1216.bat ----------------- */

1216.exe <1216in.%1 >1216out.%1
checker.exe 1216ans.%1 1216out.%1 %1

Copy all tests to tests.txt without count (number 232). Then compile testgen.c and execute. It delimit this test to separated files. Then compile tester.c and execute with count by parameter. It generate 1216test.bat. Then execute 1216test.bat and enjoy. ::) Be sure what you 1216.exe is in the same directory.

Edited by author 14.10.2005 18:24