192352025-12-02 11:44:52szabel26Sakktábla bábukkalcpp17Wrong answer 52/802ms544 KiB
// nemes22025.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;

char tabla1[9][9], tabla2[9][9], x[9][9];

int F_db = 0, t1_db = 0, t2_db = 0;

int main()
{
    for (int i = 1; i <= 8; ++i)
    {
        for (int j = 1; j <= 8; ++j)
        {
            if ((i + j) % 2 == 0)
            {
                tabla1[i][j] = 'V';
                tabla2[i][j] = 'S';
            }
            else
            {
                tabla1[i][j] = 'S';
                tabla2[i][j] = 'V';
            }
            cin >> x[i][j];

            if (x[i][j] != 'F')
            {
                ++F_db;
                if (x[i][j] == tabla1[i][j]) ++t1_db;
                if (x[i][j] == tabla2[i][j]) ++t2_db;
            }
        }
    }

    /*for (int i = 1; i <= 8; ++i)
    {
        for (int j = 1; j <= 8; ++j)
        {
            cout << tabla1[i][j] << " ";
        }
        cout << endl;
    }

    cout << endl;

    for (int i = 1; i <= 8; ++i)
    {
        for (int j = 1; j <= 8; ++j)
        {
            cout << tabla2[i][j] << " ";
        }
        cout << endl;
    }*/

    if ((t1_db == F_db || t2_db == F_db) && (F_db > 1 || F_db == 0)) 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
4Accepted1ms316 KiB
5Accepted1ms316 KiB
6Accepted1ms316 KiB
7Accepted1ms316 KiB
8Accepted1ms316 KiB
9Accepted1ms316 KiB
10Accepted1ms316 KiB
subtask314/14
11Accepted1ms316 KiB
12Accepted1ms320 KiB
13Accepted1ms316 KiB
14Accepted1ms508 KiB
15Accepted1ms316 KiB
16Accepted1ms316 KiB
17Accepted1ms508 KiB
18Accepted1ms316 KiB
subtask422/22
19Accepted2ms316 KiB
20Accepted2ms320 KiB
21Accepted1ms316 KiB
22Accepted2ms524 KiB
23Accepted1ms328 KiB
24Accepted1ms332 KiB
25Accepted1ms316 KiB
26Accepted1ms316 KiB
27Accepted1ms316 KiB
28Accepted1ms316 KiB
subtask50/28
29Accepted1ms316 KiB
30Accepted2ms316 KiB
31Accepted1ms316 KiB
32Accepted1ms316 KiB
33Accepted1ms316 KiB
34Accepted1ms316 KiB
35Accepted1ms316 KiB
36Accepted1ms316 KiB
37Accepted1ms316 KiB
38Accepted1ms316 KiB
39Accepted1ms316 KiB
40Accepted1ms320 KiB
41Accepted1ms316 KiB
42Accepted1ms508 KiB
43Accepted1ms316 KiB
44Accepted1ms316 KiB
45Accepted1ms508 KiB
46Accepted1ms316 KiB
47Accepted2ms316 KiB
48Accepted2ms320 KiB
49Accepted1ms316 KiB
50Accepted2ms524 KiB
51Accepted1ms328 KiB
52Accepted1ms332 KiB
53Accepted1ms316 KiB
54Accepted1ms316 KiB
55Accepted1ms316 KiB
56Accepted1ms316 KiB
57Accepted2ms500 KiB
58Wrong answer1ms532 KiB
59Wrong answer1ms316 KiB
60Wrong answer1ms316 KiB
61Wrong answer1ms316 KiB
62Accepted1ms316 KiB
63Accepted1ms544 KiB
64Accepted1ms316 KiB
65Accepted1ms316 KiB
66Accepted1ms316 KiB
67Accepted1ms316 KiB
68Accepted1ms316 KiB
69Accepted1ms316 KiB
70Accepted1ms316 KiB
71Accepted1ms508 KiB
72Accepted1ms316 KiB
73Accepted1ms316 KiB