RACI Matrix
InterviewTime limit2sMemory limit2048 MB
Check whether every row of a RACI matrix has exactly one A and at most one R, printing Yes or No.
- Level
Easy2 of 10
- Topics
- Array, Implementation
- Solved
- No attempts yet
Problem
Nikolai assigned students the task of creating a RACI matrix for a project during a management lecture. A RACI matrix is a responsibility assignment matrix. It lists every stakeholder of the project and their level of involvement in each task. The levels are written as R, A, C, and I. If a stakeholder is not involved in a task, the cell contains -.
R(Responsible): performs the task. If nobody holds this level,Aperforms the whole task.A(Accountable): accepts the task fromR. Each task must have exactly oneA. The other levels can appear any number of times.C(Consulted): provides consultation while the task is carried out.I(Informed): receives information about the progress of the task.
Write a program that checks whether a given RACI matrix is correct.
Input
The first line contains two integers and , the number of rows and columns of the matrix ().
The next lines each contain elements separated by spaces. Each row is a task, and each column is a stakeholder. Every element is one of the uppercase letters R, A, C, I, or the minus sign -.
Output
Print Yes if the matrix is correct. Otherwise, print No.