-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathANKTRAIN.cpp
More file actions
48 lines (45 loc) · 832 Bytes
/
ANKTRAIN.cpp
File metadata and controls
48 lines (45 loc) · 832 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
41
42
43
44
45
46
47
48
// Code Written by Monal (cc handle: monalshadi)
# include "bits/stdc++.h"
using namespace std;
void checknprint(int n, int orgn) { // This will check for the seat placing and its adjacent seat number
switch(n) {
case 1:
cout << orgn+3 << "LB" << endl;
break;
case 2:
cout << orgn+3 << "MB" << endl;
break;
case 3:
cout << orgn+3 << "UB" << endl;
break;
case 4:
cout << orgn-3 << "LB" << endl;
break;
case 5:
cout << orgn-3 << "MB" << endl;
break;
case 6:
cout << orgn-3 << "UB" << endl;
break;
case 7:
cout << orgn+1 << "SU" << endl;
break;
case 8:
cout << orgn-1 << "SL" << endl;
break;
case 0:
cout<<orgn-1<<"SL"<<endl;
}
return;
}
int main() {
ios::sync_with_stdio(false);
int tc;
cin >> tc;
while(tc--) {
int n;
cin >> n;
checknprint(n%8, n);
}
return 0;
}