简单水题,打个表就行了。
代码如下:
#include <iostream>
#include <cstdio>
using namespace std;
const int maxn=200;
int graph[maxn][maxn];
int main()
{
for(int i=0;i<200;i++)
{
if(i<=2)
{
graph[i]['A']=graph[i]['D']=1;
graph[i]['B']=graph[i]['C']=2;
}
else if(i>=3&&i<=20)
{
graph[i]['A']=graph[i]['F']=1;
graph[i]['B']=graph[i]['C']=graph[i]['D']=graph[i]['E']=2;
}
else if(i>=21&&i<=65)
{
graph[i]['A']=graph[i]['K']=1;
graph[i]['C']=graph[i]['D']=graph[i]['G']=graph[i]['H']=2;
}
}
int r;
char c;
cin >> r >> c;
if(graph[r][c]==1)
{
cout << "window" << endl;
}
else if(graph[r][c]==2)
{
cout << "aisle" << endl;
}
else cout << "neither" << endl;
return 0;
}