Algorithm


Problem Link: https://www.beecrowd.com.br/judge/en/problems/view/1546

 

Problem Details:

beecrowd | 1546

Feedback

By Jean Bez, URI BR Brazil

Timelimit: 1

 

Several students from various universities know the programming portal IRU. This portal has thousands of programming problems available. Daily, the IRU team receives several feedback (compliments, bugs, questions, suggestions, ...) that must first be assigned to team members answer.

As the team is very busy and have no time to sort these feedbacks, you were asked to write a program to do that and show who will be responsible for resolving and responding the feedback.

The team members responsible for each sector are:

  1. Compliments: Rolien
  2. Bugs: Naej
  3. Questions: Elehcim
  4. Suggestions: Odranoel

 

Input

 

The first value is the number of test cases N (1 < N < 100). Each test case represent a day of work responding feedbacks. Each test case starts with K (1 < K < 50), indicating the number of feedbacks received on that date. Then follows K lines with and integer representing the category of each of the feedbacks as shown above (1, 2, 3 or 4).

 

Output

 

For each test case you must print the name of the team member responsible for the feedback.

 

 

 

Sample Input Sample Output

2
4
1
1
3
4
3
3
3
2

 

Code Examples

#1 Code Example with C Programming

Code - C Programming


#include <stdio.h>
 
int main() {
 
 int i = 0, j = 0, n, k, x;
 
 scanf("%d", &n);
 
 for(i = 0; i < n; ++i)
 {
    scanf("%d", &k);
  
    for(j = 0; j < k; ++j)
    {
     scanf("%d", &x);
   
     if(x == 1){
        printf("Rolien\n");
     } else if(x == 2){
       printf("Naej\n");
     } else if(x == 3){
       printf("Elehcim\n");
     } else{
       printf("Odranoel\n");
     }
    }
   }
    return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
2
4
1
1
3
4
3
3
3
2

Output

x
+
cmd
Rolien
Rolien
Elehcim
Odranoel
Elehcim
Elehcim
Naej

#2 Code Example with C++ Programming

Code - C++ Programming


#include <iostream>
using namespace std;

int main()
{
 int n, k, x;
 
 cin >> n;
 
 for(int i = 0; i < n; ++i)
 {
  cin >> k;
  
  for(int j = 0; j < k; ++j)
  {
   cin >> x;
   
   if(x == 1){
    cout << "Rolien" << endl;
   }else if(x == 2){
    cout << "Naej" << endl;
   }else if(x == 3){
    cout << "Elehcim" << endl;
   }else{
    cout << "Odranoel" << endl;
   }
  }
 }
   
 return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
2
4
1
1
3
4
3
3
3
2

Output

x
+
cmd
Rolien
Rolien
Elehcim
Odranoel
Elehcim
Elehcim
Naej

Demonstration


1546 Beecrowd Online Judge solution Feedback adhoc solution in C, C++

 

Tags: Beecrowd online judge solution, beecrowd 1546 solution, beecrowd feedback solution, beecrowd solution new, beecrowd feedback solution in c, c++ language

Previous
#1021 Beecrowd Online Judge Solution 1021 Banknotes and Coins - URI 1021 Problem Solution in C, C++, Java, Python and C#