2019年4月10日

Guess UVALive - 4255

摘要: 题意: 定义数组A的“符号矩阵”F,F[i][j]表示A[i] + A[i+1] + ... + A[j]。 已知F,给出A的一个可能解。 分析: 1. 利用前缀和。F[i][j[ 表示 S[j] - S[i-1]。 2. 问题转化为已知 S[0] S[1] ... S[n] 的大小关系,并且已知 阅读全文

posted @ 2019-04-10 21:34 nbsanshi 阅读(70) 评论(0) 推荐(0) 编辑

uva10047(未AC)

摘要: #include using namespace std; struct Node{ int x, y, d, c; Node(int x = 0, int y = 0, int d = 0, int c = 0):x(x), y(y), d(d), c(c){} bool operator==(const Node& node)const{ retur... 阅读全文

posted @ 2019-04-10 20:20 nbsanshi 阅读(78) 评论(0) 推荐(0) 编辑

导航