214712026-01-13 09:54:55AsztalosssssSakktábla bábukkalcpp17Wrong answer 0/80600ms544 KiB
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    char sakktabla1[8][8];
    char sakktabla2[8][8];
    char ocsitabla[8][8];
    bool lehete=true;
    for (int i=0; i<8; i++)
    {
        for (int j=0; j<8; j+=2)
        {

            if (i%2==0)
            {
                sakktabla1[i][j]='S';
                sakktabla1[i][j+1]='V';
                sakktabla2[i][j]='V';
                sakktabla2[i][j+1]='S';
            }
            else
            {
                sakktabla1[i][j]='V';
                sakktabla1[i][j+1]='S';
                sakktabla2[i][j]='S';
                sakktabla2[i][j+1]='V';
            }
        }
    }
    for (int i=0; i<8; i++)
    {
        for (int j=0; j<8; j++)
        {
            cin>>ocsitabla[i][j];
        }
    }
    for (int i=0; i<8; i++)
    {
        for (int j=0; j<8; j++)
        {
            cout<<ocsitabla[i][j]<< " ";
        }
        cout<<endl;
    }
    char first;
    int k=0, l=0, helyl;
    do
    {
        if(ocsitabla[k][l]=='V')
        {
            first='V';
            l=helyl;
        }
        if(ocsitabla[k][l]=='S')
            first='S';
            l=helyl;
    }while(ocsitabla[k][l]=='F');
    if(first=='S')
    {
        if(helyl%2==0)
        {
            for (int i=0; i<8; i++)
            {
                for (int j=0; j<8; j++)
                {
                    if (ocsitabla[i][j]!='F'&&lehete)
                    {
                        if(ocsitabla[i][j]==sakktabla1[i][j])
                            lehete=true;
                        else
                            lehete=false;
                    }
                }
            }
        }
        else
        {
            for (int i=0; i<8; i++)
            {
                for (int j=0; j<8; j++)
                {
                    if (ocsitabla[i][j]!='F'&&lehete)
                    {
                        if(ocsitabla[i][j]==sakktabla2[i][j])
                            lehete=true;
                        else
                            lehete=false;
                    }
                }
            }
        }
    }
    if(first=='V')
    {
        if(helyl%2==0)
        {
            for (int i=0; i<8; i++)
            {
                for (int j=0; j<8; j++)
                {
                    if(lehete)
                    {
                        if (ocsitabla[i][j]!='F')
                        {
                            if(ocsitabla[i][j]==sakktabla2[i][j])
                                lehete=true;
                            else
                                lehete=false;
                        }
                    }
                }
            }
        }
        else
        {
            for (int i=0; i<8; i++)
            {
                for (int j=0; j<8; j++)
                {
                    if (ocsitabla[i][j]!='F'&&lehete)
                    {
                        if(ocsitabla[i][j]==sakktabla1[i][j])
                            lehete=true;
                        else
                            lehete=false;
                    }
                }
            }
        }
    }
    if (lehete)
        cout<<"LEHETSEGES"<<endl;
    else
        cout<<"LEHETETLEN"<<endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer1ms316 KiB
2Wrong answer1ms316 KiB
subtask20/16
3Wrong answer1ms316 KiB
4Wrong answer1ms316 KiB
5Wrong answer1ms316 KiB
6Wrong answer1ms316 KiB
7Wrong answer1ms316 KiB
8Wrong answer1ms316 KiB
9Wrong answer1ms316 KiB
10Wrong answer1ms316 KiB
subtask30/14
11Wrong answer1ms316 KiB
12Wrong answer1ms316 KiB
13Wrong answer1ms316 KiB
14Wrong answer1ms316 KiB
15Wrong answer2ms316 KiB
16Wrong answer1ms512 KiB
17Wrong answer1ms508 KiB
18Wrong answer1ms492 KiB
subtask40/22
19Time limit exceeded600ms360 KiB
20Time limit exceeded600ms316 KiB
21Time limit exceeded600ms316 KiB
22Time limit exceeded600ms316 KiB
23Time limit exceeded583ms512 KiB
24Time limit exceeded583ms316 KiB
25Time limit exceeded584ms544 KiB
26Time limit exceeded584ms316 KiB
27Time limit exceeded588ms316 KiB
28Time limit exceeded588ms508 KiB
subtask50/28
29Wrong answer1ms316 KiB
30Wrong answer1ms316 KiB
31Wrong answer1ms316 KiB
32Wrong answer1ms316 KiB
33Wrong answer1ms316 KiB
34Wrong answer1ms316 KiB
35Wrong answer1ms316 KiB
36Wrong answer1ms316 KiB
37Wrong answer1ms316 KiB
38Wrong answer1ms316 KiB
39Wrong answer1ms316 KiB
40Wrong answer1ms316 KiB
41Wrong answer1ms316 KiB
42Wrong answer1ms316 KiB
43Wrong answer2ms316 KiB
44Wrong answer1ms512 KiB
45Wrong answer1ms508 KiB
46Wrong answer1ms492 KiB
47Time limit exceeded600ms360 KiB
48Time limit exceeded600ms316 KiB
49Time limit exceeded600ms316 KiB
50Time limit exceeded600ms316 KiB
51Time limit exceeded583ms512 KiB
52Time limit exceeded583ms316 KiB
53Time limit exceeded584ms544 KiB
54Time limit exceeded584ms316 KiB
55Time limit exceeded588ms316 KiB
56Time limit exceeded588ms508 KiB
57Time limit exceeded583ms316 KiB
58Time limit exceeded583ms316 KiB
59Time limit exceeded598ms316 KiB
60Time limit exceeded600ms316 KiB
61Time limit exceeded587ms316 KiB
62Time limit exceeded587ms316 KiB
63Time limit exceeded600ms316 KiB
64Time limit exceeded580ms316 KiB
65Time limit exceeded586ms316 KiB
66Time limit exceeded584ms316 KiB
67Time limit exceeded600ms316 KiB
68Time limit exceeded600ms316 KiB
69Time limit exceeded578ms316 KiB
70Time limit exceeded578ms500 KiB
71Time limit exceeded600ms316 KiB
72Wrong answer1ms316 KiB
73Time limit exceeded600ms316 KiB