224112026-01-15 07:43:42helloworldSakktábla bábukkalcpp17Wrong answer 0/802ms560 KiB
#include <iostream>

using namespace std;

string t[8];
int tabla[8][8];



bool jo_elso_sotet(){
    for(int i=0; i<8; i++){
        for(int j=0; j<8; j++){
            if((i+j)%2==0){
                if(tabla[i][j]!=-1 && tabla[i][j]!=2){
                    return false;
                }
            }

            if((i+j)%2==0){
                if(tabla[i][j]==-1 && tabla[i][j]==2){
                    return false;
                }
            }
        }
    }
    return true;
}

bool jo_elso_vilagos(){
    for(int i=0; i<8; i++){
        for(int j=0; j<8; j++){
            if(i%2==0 && j%2==0){
                if(tabla[i][j]==-1 || tabla[i][j]==1){
                    return false;
                }
            }

            if(i%2==1 && j%2==1){
                if(tabla[i][j]==-1 || tabla[i][j]==1){
                    return false;
                }
            }
        }
    }
    return true;
}






int main()
{
    for(int i=0; i<8; i++){
        cin>>t[i];
        for(int j=0; j<8; j++){
            if(t[i][j]=='F')tabla[i][j]=-1;
            if(t[i][j]=='V')tabla[i][j]=1;
            if(t[i][j]=='S')tabla[i][j]=2;
        }
    }

   /* cout<<"\n\n";
    for(int i=0; i<8; i++){
        for(int j=0; j<8; j++){
            cout<<tabla[i][j]<<" ";
        }
        cout<<"\n";
    }*/


    if(jo_elso_sotet() || jo_elso_vilagos()){
        cout<<"LEHETSEGES";
    }
    else cout<<"LEHETETLEN";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms316 KiB
2Accepted1ms508 KiB
subtask20/16
3Wrong answer1ms316 KiB
4Accepted1ms508 KiB
5Accepted1ms316 KiB
6Accepted1ms508 KiB
7Accepted1ms500 KiB
8Accepted1ms316 KiB
9Accepted1ms508 KiB
10Accepted1ms316 KiB
subtask30/14
11Wrong answer1ms316 KiB
12Accepted1ms508 KiB
13Accepted1ms316 KiB
14Wrong answer1ms508 KiB
15Accepted2ms316 KiB
16Accepted2ms316 KiB
17Accepted2ms316 KiB
18Accepted2ms508 KiB
subtask40/22
19Accepted1ms316 KiB
20Accepted1ms316 KiB
21Wrong answer1ms316 KiB
22Wrong answer1ms316 KiB
23Wrong answer1ms316 KiB
24Accepted1ms316 KiB
25Wrong answer1ms316 KiB
26Accepted1ms508 KiB
27Accepted1ms316 KiB
28Accepted1ms316 KiB
subtask50/28
29Accepted1ms560 KiB
30Accepted1ms324 KiB
31Wrong answer1ms316 KiB
32Accepted1ms508 KiB
33Accepted1ms316 KiB
34Accepted1ms508 KiB
35Accepted1ms500 KiB
36Accepted1ms316 KiB
37Accepted1ms508 KiB
38Accepted1ms316 KiB
39Wrong answer1ms316 KiB
40Accepted1ms508 KiB
41Accepted1ms316 KiB
42Wrong answer1ms508 KiB
43Accepted2ms316 KiB
44Accepted2ms316 KiB
45Accepted2ms316 KiB
46Accepted2ms508 KiB
47Accepted1ms316 KiB
48Accepted1ms316 KiB
49Wrong answer1ms316 KiB
50Wrong answer1ms316 KiB
51Wrong answer1ms316 KiB
52Accepted1ms316 KiB
53Wrong answer1ms316 KiB
54Accepted1ms508 KiB
55Accepted1ms316 KiB
56Accepted1ms316 KiB
57Accepted1ms552 KiB
58Wrong answer1ms316 KiB
59Accepted1ms508 KiB
60Wrong answer1ms500 KiB
61Accepted1ms316 KiB
62Wrong answer1ms316 KiB
63Accepted1ms500 KiB
64Wrong answer1ms316 KiB
65Accepted1ms508 KiB
66Wrong answer1ms316 KiB
67Accepted1ms316 KiB
68Accepted1ms316 KiB
69Accepted1ms316 KiB
70Accepted1ms316 KiB
71Accepted1ms316 KiB
72Wrong answer1ms316 KiB
73Accepted1ms508 KiB