题目描述
样例
package main
import "fmt"
type point struct{
X int
Y int
}
func main() {
var lines int
var res = 1
fmt.Scanf("%d", &lines)
lastMap := make(map[point]int)
for i := 0;i < lines; i++{
var count int
fmt.Scanf("%d", &count)
curMap := make(map[point]int)
for j := 0;j < count;j++{
var a,b int
fmt.Scanf ("%d %d",&a, &b)
p := point{a,b}
if i > 0 {
val ,ok:= lastMap[p]
if ok{
curMap[p] = val + 1
if val + 1 > res {
res = val + 1
}
} else {
curMap[p] = 1
}
} else {
curMap[p] = 1
}
}
lastMap = curMap
}
fmt.Print(res)
}
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla