代码如下(使用了前缀数组和优化:时间复杂度O(m*n)->O(m+n)) 在ccf csp的模拟系统提交的结果一直是错误而且是0分 在本地运行正确 使用前缀和数组,增加了内存空间的占用,但是没有数量级的提升,时间复杂度由O(m * n)降为O(m+n) 易错点:(x,y) ->(r, theta)转换的时候,要注意(x,y)在坐标系中的...
重点:坐标变换方式的统计。拉伸是多个操作相乘,旋转是多个操作相加。 运行结果: PS:还是有运行超时的问题。 from math import cos, sin n, m = map(int, input().split()) T = [[i for i in map(float, input().split())]for j in range(n)] Location = [[i for i in map(int, input()....