185222025-10-25 19:27:39szabelrSakktábla bábukkalcpp17Wrong answer 30/801ms512 KiB
// sakktabla1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;

int main()
{
    string  a = "0", b = "0";
    int lehete = 1;
    string x,q;
    for (int i = 0; i <= 7; i++) {
        
            cin >> q;
            for (int y = 0; y <= 7; y++) {
                x = q[y];
                if (x != "F") {
                    if (i % 2 == 0 and y % 2 == 1) {
                        if (a == "0")
                            a = x;
                        else if (x != a)
                            lehete = 0;
                    }
                    if (i % 2 == 1 and y % 2 == 1) {
                        if (b == "0")
                            b = x;
                        else if (x != b)
                            lehete = 0;
                    }
                    if (i % 2 == 0 and y % 2 == 0) {
                        if (b == "0")
                            b = x;
                        else if (x != b)
                            lehete = 0;
                    }
                    if (i % 2 == 1 and y % 2 == 0) {
                        if (a == "0")
                            a = x;
                        else if (x != a)
                            lehete = 0;
                    }
                }
            }
            
            
        
    }
    if (lehete == 1)
        cout << "LEHETSEGES";
    else
        cout << "LEHETETLEN";
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms316 KiB
2Accepted1ms316 KiB
subtask216/16
3Accepted1ms316 KiB
4Accepted1ms356 KiB
5Accepted1ms316 KiB
6Accepted1ms316 KiB
7Accepted1ms316 KiB
8Accepted1ms384 KiB
9Accepted1ms508 KiB
10Accepted1ms316 KiB
subtask314/14
11Accepted1ms316 KiB
12Accepted1ms316 KiB
13Accepted1ms316 KiB
14Accepted1ms316 KiB
15Accepted1ms316 KiB
16Accepted1ms316 KiB
17Accepted1ms316 KiB
18Accepted1ms316 KiB
subtask40/22
19Accepted1ms316 KiB
20Accepted1ms316 KiB
21Accepted1ms316 KiB
22Wrong answer1ms316 KiB
23Wrong answer1ms316 KiB
24Wrong answer1ms316 KiB
25Accepted1ms316 KiB
26Accepted1ms316 KiB
27Accepted1ms316 KiB
28Accepted1ms316 KiB
subtask50/28
29Accepted1ms508 KiB
30Accepted1ms508 KiB
31Accepted1ms316 KiB
32Accepted1ms356 KiB
33Accepted1ms316 KiB
34Accepted1ms316 KiB
35Accepted1ms316 KiB
36Accepted1ms384 KiB
37Accepted1ms508 KiB
38Accepted1ms316 KiB
39Accepted1ms316 KiB
40Accepted1ms316 KiB
41Accepted1ms316 KiB
42Accepted1ms316 KiB
43Accepted1ms316 KiB
44Accepted1ms316 KiB
45Accepted1ms316 KiB
46Accepted1ms316 KiB
47Accepted1ms316 KiB
48Accepted1ms316 KiB
49Accepted1ms316 KiB
50Wrong answer1ms316 KiB
51Wrong answer1ms316 KiB
52Wrong answer1ms316 KiB
53Accepted1ms316 KiB
54Accepted1ms316 KiB
55Accepted1ms316 KiB
56Accepted1ms316 KiB
57Accepted1ms316 KiB
58Accepted1ms316 KiB
59Accepted1ms316 KiB
60Accepted1ms404 KiB
61Accepted1ms316 KiB
62Accepted1ms352 KiB
63Accepted1ms316 KiB
64Accepted1ms512 KiB
65Accepted1ms508 KiB
66Accepted1ms496 KiB
67Accepted1ms316 KiB
68Wrong answer1ms316 KiB
69Accepted1ms316 KiB
70Accepted1ms384 KiB
71Accepted1ms316 KiB
72Accepted1ms316 KiB
73Accepted1ms316 KiB