Filtering pseudo-duplicates
Statement
Goal
You have found a storage of lines which contains interesting information. Unfortunately, some of the data appears to have been duplicated and fractured to act as a decoy. In order to efficiently read the information that you want, you need to remove the decoy and leave behind lines that are not continuous fragments from other lines.Input
Line 1: N, the number of lines.
Next N lines: Text.
Next N lines: Text.
Output
Each line: Text, with lines that are fragments from other lines removed. In case of duplicate lines, leave behind the first occurence. The order should be the same.
Constraints
0 < N < 80
0 < Length of each line in Text < 10
0 < Length of each line in Text < 10
Example
Input
5 COUNTER OU NTE STRATEGY TR
Output
COUNTER STRATEGY
Game modes
Fastest, Shortest, Reverse
Test cases
Counter strategy Test
Input
5
COUNTER
OU
NTE
STRATEGY
TR
Output
COUNTER
STRATEGY
Think twice Validator
Input
5
HI
THINK
INK
TWICE
IC
Output
THINK
TWICE
No duplicates Test
Input
3
ROCK
GOLEM
OGRE
Output
ROCK
GOLEM
OGRE
No duplicates Validator
Input
3
FAST
VALID
PASS
Output
FAST
VALID
PASS
Account for the future Test
Input
4
OP
OPE
OPEN
SESAME
Output
OPEN
SESAME
Account for the future Validator
Input
5
P
PA
PAS
PASS
WINNER
Output
PASS
WINNER
Gene pool Test
Input
48
TTA
C
TA
GGAT
CAG
T
GC
AG
G
CAA
TC
G
GC
C
GT
TCT
GCA
C
ACA
CT
TGT
AA
TCTA
AT
TGT
TGC
T
AAC
G
AGG
AA
C
TC
CCTA
CCC
GT
GTA
ACGG
GCA
A
C
ACG
ATA
A
CTG
G
GCG
A
Output
TTA
GGAT
CAG
CAA
GCA
ACA
TGT
TCTA
TGC
AAC
AGG
CCTA
CCC
GTA
ACGG
ATA
CTG
GCG
Gene pool Validator
Input
48
GCA
GAA
T
TGTA
GCGA
TCCT
AAA
TAGCC
T
CTCTC
C
A
GG
GC
CCT
AA
AAG
GAC
GCAAG
CGA
T
A
TCAC
GTGG
GCTGA
TACT
GT
GA
GTT
AAT
C
GT
CTA
C
TAC
A
TATGC
CC
CAGC
AG
CCT
TAGAT
TC
GCCG
TT
GCGT
GGCC
AA
Output
GAA
TGTA
GCGA
TCCT
AAA
TAGCC
CTCTC
GAC
GCAAG
TCAC
GTGG
GCTGA
TACT
GTT
AAT
CTA
TATGC
CAGC
TAGAT
GCCG
GCGT
GGCC
Vox codei Test
Input
11
.........
.#.......
.#..#....
.#..#.###
.#..#...#
.####...#
....#.###
....#.#..
....#.#..
....#.###
.........
Output
.........
.#.......
.#..#....
.#..#.###
.#..#...#
.####...#
....#.###
....#.#..
Vox codei Validator
Input
11
.........
..#......
.....#..
..#..
..#....
....#
#.....
.......#
.......
#.....#
.........
Output
.........
..#......
.....#..
.......#
#.....#
Graph Test
Input
9
1-2-3
| |
4-5-6
| |
7-8-9
|
10
|
12-11
Output
1-2-3
| |
4-5-6
7-8-9
|
10
12-11
Graph with more lines Validator
Input
9
1-2-3
| |
4-5-6
| |
7-8-9
| |
10 11
| |
12-13
Output
1-2-3
| |
4-5-6
7-8-9
| |
10 11
12-13
Algebra Test
Input
5
x+2
12
x+12+4
x+4
3x+2
Output
x+12+4
x+4
3x+2
Algebra Validator
Input
6
x+2
x+4
4
x+8+4
8
3x+2
Output
x+4
x+8+4
3x+2
Solution language
Solution
Stub generator input