2N friends (A,B,C... , 2N) are standing in a circle. There is exactly
one person standing opposite of one other person. Some of them
are facing inwards and some of them are facing outwards. Here
given some facts your task is to build the standing positions and
answer a few Questions. If the arrangement is not possible or more
than one arrangement is possible, then print "ARRANGEMENT NOT
POSSIBLE".
The formats of Facts & Questions and its meanings are as follows.
Facts
"1AB" means : A and B are standing adjacent to each other
"2AB" means : A and B are standing opposite to each other
OP
A
D
) ENG
21:22
"
IN
12/07/201
Answers
Answer:
Explanation:
"1AB": A and B are standing adjacent to each other
"2AB": A and B are standing opposite to each other
"3AB": A is standing to the immediate left of B
"4AB": A is standing to the immediate right of B
"5A": A is facing inwards
"6A": A is facing outwards
"7n": n people are facing inwards, where n is the number
"8n": n people are facing outwards, where n is the number
The Constraints
1<N<10
1< TOTAL FACTS < 30
1 < Total Questions < 20
Input Format
Input
2
2AB;72;1AC;6D;4BD;6C
?2D;?3C;?4B;?5A;?6B
output
C;B;D;Y;N
Therefore -
The four people are A, B, C and D that are standing in a circle
There are six facts that are separated by a semicolon
2AB > A and B are standing opposite
72 > 2 people are facing inwards
1AC > A and C are standing nearby
6D > D is facing outwards
4BD > B is standing immediate right of D
6C > C is facing outwards
Answer:
Explanation:
Explanation:
"1AB": A and B are standing adjacent to each other
"2AB": A and B are standing opposite to each other
"3AB": A is standing to the immediate left of B
"4AB": A is standing to the immediate right of B
"5A": A is facing inwards
"6A": A is facing outwards
"7n": n people are facing inwards, where n is the number
"8n": n people are facing outwards, where n is the number
The Constraints
1<N<10
1< TOTAL FACTS < 30
1 < Total Questions < 20
Input Format
Input
2
2AB;72;1AC;6D;4BD;6C
?2D;?3C;?4B;?5A;?6B
output
C;B;D;Y;N
Therefore -
The four people are A, B, C and D that are standing in a circle
There are six facts that are separated by a semicolon
2AB > A and B are standing opposite
72 > 2 people are facing inwards
1AC > A and C are standing nearby
6D > D is facing outwards
4BD > B is standing immediate right of D
6C > C is facing outwards