DAPC25-089.Hidden Sequence
Medium · 4 s · 256 MB
- icpc
- dapc
- 2025
Three players are having a game night, playing a long sequence of different games. In each game, one of the three players wins. In order to keep track of the order of winners, each of the three players decides to keep a list of all winners in order. However, due to the dopamine rush as the result of winning a game, everyone always forgets to write themselves on their own list of winners. Thus, the list of player only contains the order in which players and won the different games, the list of player only contains the order in which players and won, and the list of player only contains the order in which players and won.
Given these three lists, determine the actual order in which all three players won their games.
Giriş formatı
The input consists of:
• Three lines, the th of which contains a string (), the order in which the two players different from won their games.
It is guaranteed that it is always possible to determine the unique order in which all three players won their games.
Çıxış formatı
Output a single string containing the order in which all three players won their games.
Qeyd
Source: Delft Algorithm Programming Contest 2025 · Author: Mike de Vries · License: CC BY-SA 4.0 · Original: https://dapc.wisv.ch · Statement adapted for AlgoLens and shared under the same license. · 10 of the 79 original test cases (the largest) are omitted here to keep the problem lightweight.
Nümunələr
Giriş #1
2 1 21
Çıxış #1
21
Giriş #2
23 13 12
Çıxış #2
123
Giriş #3
23232323 11331133 12121212
Çıxış #3
121323121323