| 20694 | 2026-01-08 17:50:26 | szj | Sakktábla bábukkal | cpp17 | Forditási hiba |
#include <bits/stdc++.h>
using namespace std;
int main()
{
f string a;
short int l=-1, i, j;
for(i=0; i<8; i++)
{
cin >> a;
for(j=0; j<8; j++)
{
if(l==-1 && a[j]!='F')
{
if(a[j]=='V')l=j%2;
else l=((j%2)+1)%2;
}
if(a[j]=='S' && j%2==l || a[j]=='V' && j%2!=l && l!=-1)
{
cout << "LEHETETLEN";
return 0;
}
}
l=(l+1)%2;
}
cout << "LEHETSEGES";
return 0;
}
open /var/local/lib/isolate/403/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:5:1: error: 'f' was not declared in this scope
5 | f string a;
| ^
main.cpp:9:16: error: 'a' was not declared in this scope
9 | cin >> a;
| ^