摘要:
Practice sort 给定一系列形如 $A 例如: 利用拓扑序判断: 当没有点入度为 0,或当最终入队的点的个数 $ include include include using namespace std; int n, m, ans, t; char buf[6], lst[30]; int 阅读全文
posted @ 2018-10-23 21:35
greyqz
阅读(143)
评论(0)
推荐(0)
摘要:
Contest A. defile 自定义排序。按照题意抽象成模型模拟就可以了。 自定义排序核心代码: cpp struct node { int x, id; } d[1000003]; bool cmp1(const node& a, const node& b) { return a.x 给定 阅读全文
posted @ 2018-10-22 23:53
greyqz
阅读(105)
评论(0)
推荐(0)
摘要:
Contest A: sum 快速读。 B: 鬼谷子的钱袋(coin) 贪心。 按照类似二进制的方式准备钱袋:1, 2, 4, 8, ... 以此装入的钱袋数目记为 $N$。 如果最后剩余不足以凑齐下一个二进制位钱袋,记剩余金币价值为 $k$。 当 $k\notin \{x|x=2^n, n\in\ 阅读全文
posted @ 2018-10-22 15:26
greyqz
阅读(174)
评论(0)
推荐(0)
摘要:
Zeller's Formula: For the Gregorian calendar, Zeller's Formula is $$\displaystyle W=\left(\left\lfloor \frac{C}{4} \right\rfloor 2C+Y+\left\lfloor \fr 阅读全文
posted @ 2018-10-12 21:25
greyqz
阅读(639)
评论(0)
推荐(0)
浙公网安备 33010602011771号