08 2019 档案
摘要:P1002 过河卒 题目描述 棋盘上AAA点有一个过河卒,需要走到目标BBB点。卒行走的规则:可以向下、或者向右。同时在棋盘上CCC点有一个对方的马,该马所在的点和所有跳跃一步可达的点称为对方马的控制点。因此称之为“马拦过河卒”。 棋盘用坐标表示,AAA点(0,0)(0, 0)(0,0)、BBB点(
阅读全文
摘要:#include #include #include using namespace std; typedef long long LL; const int maxn=1e5+7; int a[maxn],tree[maxn*4]; int lz[maxn*4]; void build(int node ,int start, int endd) { if(start =...
阅读全文
摘要:思路: 欲维护f(x)使其最小,可知x应该是a1和an的中位数。 ∵d[i]=|a[i]-x| ∴易推得欲维护min_f(k,x)即维护一个min_d[i]即可 故在(1,n-k)的范围内(因欲求的d[i]可转化为a[i+k]-a[i])维护d[i]的最小值,d[i]最小时可找到中位数X,利用此时的
阅读全文
摘要:A.敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 149073 Accepted Submission(s): 61803 Probl
阅读全文
摘要:Description A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have
阅读全文

浙公网安备 33010602011771号