### PROBLEM LINK:

**Author:** Alei Reyes

**Primary Tester:** Hussain Kara Fallah

**Secondary Tester:** Kacper Walentynowicz

**Editorialist:** Hussain Kara Fallah

### DIFFICULTY:

Easy

### PREREQUISITES:

None

### PROBLEM:

We have **n** recipes and **n** judges to taste them. Each judge must try every recipe exactly twice.

You have to organize tasting rounds. A round is is structured as follows:

You will choose distinct **k** recipes and for each one of them prepare 2 **identical** dishes.

You will choose distinct **k** judges and each of them must try 2 **different** recipes from the ones we chose (1 dish of each of them in particular). Two different judges may try the same recipe (but they may not share a common dish).

After each round all prepared dishes must be eaten by judges.

You can arbitrarily decide the number of rounds, and the structure of each one (number of invited judges), but as a rule of the contest at the end of all round each judge must have tasted every recipe exactly twice.

### EXPLANATION:

This is a constructive problem, which can be solved by different ways. I will describe mine which is quite simple.

Let’s organize **n** rounds. You can imagine the recipes aligned in a circle. At the **1 ^{st}** round the

**i**judge is standing beside the

^{th}**i**recipe. In each round each judge tries the recipe he is standing beside and the next one in front of him. After each round our judges move 1 step around the circle. Check this solution for n = 4 :

^{th}Round | Judge | 1st Recipe | 2nd recipe |

1 | 1 | 1 | 2 |

1 | 2 | 2 | 3 |

1 | 3 | 3 | 4 |

1 | 4 | 4 | 1 |

2 | 1 | 2 | 3 |

2 | 2 | 3 | 4 |

2 | 3 | 4 | 2 |

2 | 4 | 1 | 1 |

3 | 1 | 3 | 4 |

3 | 2 | 4 | 1 |

3 | 3 | 1 | 2 |

3 | 4 | 2 | 3 |

4 | 1 | 4 | 1 |

4 | 2 | 1 | 2 |

4 | 3 | 2 | 3 |

4 | 4 | 3 | 4 |

By scheduling rounds this way, it’s guaranteed that every recipe would be tasted by every judge exactly twice by the end of the **n ^{th}** round.