-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1893.cpp
More file actions
40 lines (34 loc) · 713 Bytes
/
1893.cpp
File metadata and controls
40 lines (34 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <string>
#include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
if ((stoi(s) > 0) && (stoi(s) < 3))
if ((s[1] == 'A') || (s[1] == 'D'))
cout << "window";
else cout << "aisle";
else
if ((stoi(s) > 2) && (stoi(s) < 10))
if ((s[1] == 'A') || (s[1] == 'F'))
cout << "window";
else cout << "aisle";
else
if(stoi(s)<21)
if ((s[2] == 'A') || (s[2] == 'F'))
cout << "window";
else cout << "aisle";
else
{
if ((s[2] == 'A') || (s[2] == 'K'))
{
cout << "window";
return 0;
}
if ((s[2] == 'C') || (s[2] == 'D') || (s[2] == 'G') || (s[2] == 'H'))
cout << "aisle";
else cout << "neither";
}
return 0;
}