407591: GYM102835 G Graph Cards

Memory Limit:1024 MB Time Limit:4 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. Graph Cardstime limit per test4 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard outputExamplesInput
1
2
4 1 2 2 3 3 1 1 4
4 1 2 2 3 3 1 2 4
Output
1
Input
2
2
4 1 2 2 3 3 1 1 4
5 1 2 2 3 3 1 2 4 2 5
3
9 1 2 2 5 5 7 7 6 6 3 3 1 2 4 7 9 9 8
9 1 4 4 2 2 3 3 5 5 7 7 6 6 4 7 8 8 9
9 1 2 2 5 5 4 4 1 4 7 7 8 8 6 8 9 5 3
Output
2
2

加入题单

算法标签: