
补题
Cu1ii*
平凡的铁匠
展开
-
ACM ICPC Greater NewYork Region 2015(补)
E: A Rational Sequence 2 题意理解:就是让你在满二叉树上寻找规律,根据给出的p,q推出对应的编号; 利用每个左子节点编号是父节点遍号 * 2 ,右子节点编号是父节点编号 * 2 + 1 1 并且如果 p > q那么是往上找到第一个p < q的节点一直沿其右节点走 那么这个节点的编号是往上找到第一个p < q的节点的编号 * pow(2,k) + pow(2,k) - 1,k是起始节点向下多少层到目标节点(毕竟每向下一层都要*2 + 1,最后就能推出来上面那个原创 2020-10-28 21:27:38 · 198 阅读 · 0 评论 -
ICPC模拟选拔 Greater New York Regional 2009 (补题)
文章目录ICPC模拟选拔 Greater New York Regional 2009 (补题)该题解参考并转自https://blog.youkuaiyun.com/u013050857/article/details/45080467**C**:[poj3783](http://poj.org/problem?id=3783)**D** : [poj3748](http://poj.org/problem?id=3784)题意:思路:代码:**F** :题意:思路:代码 ICPC模拟选拔 Greater New原创 2020-10-25 21:51:06 · 188 阅读 · 0 评论 -
codeforces 1422 (#675 div2)
B. Nice Matrix 传送门 题意:给出一个矩阵,让你做变换(给任一元素加减1)使得矩阵任一行列均为回文,求出最少的变换次数. 因为数据很小,而且我们发现,枚举一个点,需要把他对应的四个角都要求出来,所以我们直接暴力枚举左上四分之一部分就可以了,但是要注意,如有奇数行或者列出现的时候,枚举的时候要加上,并进行特判 借一个图 图片地址 中间红色就是特判区域 #include <iostream> #include <algorithm> #include <cstd原创 2020-10-18 11:11:23 · 184 阅读 · 0 评论 -
Buy and Resell HDU - 6438(补)更新贪心
The Power Cube is used as a stash of Exotic Power. There are nn cities numbered 1,2,…,n1,2,…,n where allowed to trade it. The trading price of the Power Cube in the ii-th city is aiai dollars per cube. Noswal is a foxy businessman and wants to quietly make原创 2020-09-19 20:03:19 · 157 阅读 · 0 评论 -
题
递归回溯 C H I G EOJ Monthly 2020.7 Sponsored by TuSimple A C D E原创 2020-07-17 23:10:34 · 222 阅读 · 0 评论