摘要: 题意: 给定一个由若干矩形从左到右拼接组成的平面图,求有多少个子矩形 题解: 对于一块$wh$矩形,其子矩形数量为$\frac{w(w+1)}{2}\frac{h(h+1)}{2}$ 设$f(x)=\frac{x(x+1)}{2}$ 则 \(ans=\sum_{i=1}^{n} f(w_i)*f(h 阅读全文
posted @ 2020-10-20 22:01 worcher 阅读(170) 评论(0) 推荐(0) 编辑
摘要: CF1426A 数学 题意: 第一层$2$间房间,之后每层$x$间房间,编号依次递增,求第$n$号房间在第几层 题解: $$1+\lfloor\frac{max((n-2),0)}\rfloor+(max((n-2),0)%m>0)$$ #include<iostream> #include<cst 阅读全文
posted @ 2020-10-20 09:16 worcher 阅读(127) 评论(0) 推荐(0) 编辑