首页 > TAG信息列表 > 2991
A - Specialized Four-Digit Numbers
Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) notation and also equals the sum of its digits when represented in duodCrane POJ - 2991 区间更新 + 计算几何
一、内容 ACM has bought a new crane (crane -- jeřáb) . The crane consists of n segments of various lengths, connected by flexible joints. The end of the i-th segment is joined to the beginning of the i + 1-th one, for 1 ≤ i < n. The beginning of thePOJ-2991 Crane(线段树)
题意:给出n条线段,开始时n条线段一词首尾相连,与地面垂直,c次操作,每次操作给出,,让线段和之间德角度变为度,并输出第n条线段的前端坐标。 思路:线段树,区间存储的线段的向量坐标,父亲节点的向量坐标就等于儿子节点的向量坐标相加,在存储一个角度变量,类似于懒惰标记的作用,将一条线段逆时LOJ 2991 「THUSC 2016」补退选——trie+线段树合并或vector
题目:https://loj.ac/problem/2291 想了线段树合并的做法。就是用线段树维护 trie 的每个点在各种时间的操作。 然后线段树合并一番,线段树维护前缀最大值,就是维护最大子段和的套路,记录区间和、前缀 max 。查询的时候,因为当前区间只记录了自己区间内部的前缀 max 值,所以要加一个 pr