The correct option is (A): NWTR.
The floors of buildings X and Z are numbered from 0 while that of building Y are numbered from 1. The topmost floor in any building is painted red
and the three consecutive floors below it are painted black, white and blue respectively. The floor immediately below the blue floor is painted red and the sequence continues till the ground floor. Let us denote red, black, white and blue by r, bk, w and bu in the figures.
O is painted red and there is no floor below it. O's floor is not numbered 0 and has two blue floors above it. So, O must be the ground floor of building Y. Since, it is red and there are only 2 blue floors above, building Y must have 9 floors.
Floor L is to the east of floor V. The total number of floors in building Y is equal to the floor number of the floor immediately below L. So, L must be in building Z and the floor immediately below it will be floor no. 9 of building Z. Hence, L is floor no. 10 of Z and V is floor no. 10 of X.
Four floors painted red in building Z. Ground floor of building Z is not painted red. Six floors are above E. E is in building X. D is to the immediate east of E and is painted white. So, D must be floor no. 7 of Y.
T's floor is numbered 0 and is painted with neither blue nor red. So, case 3 is invalid. N is the topmost floor of its building. The number of floors below N is twice that below D. So, N has 12 floors below it and is in building X. G is in floor no. 9. G is neither immediately below V nor is the topmost floor of its building. So, G is in Z. W is in building Y and is painted black. W has more than one floor above it.
Q is painted the same colour as E but its floor number is lower than that of E. S is immediately above Q. So, Q is white and will be below floor no. 6. Two floors are in between M and S. So, M will be either white or red. M's floor is not numbered 0. So, Q, S, M will not be in X. Hence, the only possibility is in building Z. Neither T nor G is adjacent to M.
Two floors are in between H and R such that H is below R. H is in building X. R is painted blue. M is not painted the same colour as H. So, case 1 is invalid.
Among the given options, only NWTR forms the sequence: red, black, white and blue respectively.