嘟嘟嘟 某谷的翻译挺迷的,简单来说就是给一个初值c,然后有两个函数f1 = a1 * x / d1 + b1, f2 = a2 * x / d2 + b2.把c分别带进去,所得的结果也递归带进去,这样的到一串数,输出第n小的。 这道题如果都带进去,然后在排序肯定行不通,因为这一串数不是递增的,不能确 ...
分类:
其他好文 时间:
2018-08-24 21:47:35
阅读次数:
125
Description It is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, e ...
分类:
移动开发 时间:
2018-08-23 20:12:10
阅读次数:
197
2833 奇怪的梦境 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 2833 奇怪的梦境 2833 奇怪的梦境 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 时间限制: 1 s 空间限制: 128000 KB 题目等级 : ...
分类:
其他好文 时间:
2018-08-22 16:56:28
阅读次数:
170
看到一堆人用n^4的算法水过去感觉糟蹋了一道好题,估计是之前误传了银组的数据,跟luogu管理员联系了一下,把金组的数据换了上来,现在n^4的算法过不去了。 首先n^4的算法容易想到:暴力记下每个方块的方案,对于每个方块把左上和它颜色不同的方块的方案数暴力加上去就行。 可是这样是通过不了$750$的 ...
分类:
其他好文 时间:
2018-08-22 00:20:12
阅读次数:
156
#include #include #include #include #include #include using namespace std; typedef long long LL; const LL mod=1e9+7; int read() { int x=0,f=1;char ch=... ...
分类:
其他好文 时间:
2018-08-21 21:12:27
阅读次数:
210
Apple Catching Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15231 Accepted: 7465 Description It is a little known fact that cows love ap ...
分类:
移动开发 时间:
2018-08-20 21:42:24
阅读次数:
185
``` / 火星文有两位,第二位为0不输出 / include include include include using namespace std; char arr[20]={0}; char data[13][2][5]={ {"tret","tret"}, {"jan","tam"}, { ...
分类:
其他好文 时间:
2018-08-18 18:39:47
阅读次数:
168
那天我在做 USACO 的某道题的时候突发奇想用树状数组代替平衡树 (但是这似乎不是我首创的 idea) (不过貌似用的人很少) 大体做法就是靠二分+树状数组,单次操作复杂度 \( O( log^2 n ) \) 虽然复杂度比 Treap 高了一点,但是代码短呀! (但是我不打算贴代码了 QWQ 因 ...
分类:
编程语言 时间:
2018-08-17 19:03:35
阅读次数:
247
题目描述 Farmer John has purchased a subscription to Good Hooveskeeping magazine for his cows, so they have plenty of material to read while waiting aroun ...
分类:
其他好文 时间:
2018-08-14 14:23:47
阅读次数:
164
解题思路 要保证图是强连通的,用因为给出的边全部都是双向边。考虑树形的结构,在一棵树上的$N$个节点一定是强连通的。他们都能够互相到达。又要保证树上的$n-1$条边中的最长的一条边最小。那就用Kruskal求一个最小生成树,找出其中的最长边,平方就是答案 附上代码 ...
分类:
其他好文 时间:
2018-08-12 20:03:50
阅读次数:
171