http://codeforces.com/contest/1156/problem/D 一棵树,边权只能为0或者1。一条简单路径就是类似01001100的样子。现要求简单路径中,0不能接在1后面。问其数量。 首先想到的是树形dp,哎,脑子里的工具或者类比问题太少了。 dp的机制:知道儿子树的所有答 ...
分类:
其他好文 时间:
2019-05-02 14:29:18
阅读次数:
108
一个骚题目,自己真是naive,真是naive http://codeforces.com/contest/1156/problem/C 俄罗斯英语看着真几把费劲。 本以为贪心就完了,但是却想当然了,这个题目得好好反思,做了两个题目排名900多???我服了。 假设我们已经有了一个最终的最优答案,那么 ...
分类:
其他好文 时间:
2019-05-02 09:55:13
阅读次数:
175
A. DZY Loves Hash time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output DZY has a hash table wi ...
分类:
其他好文 时间:
2019-05-01 18:39:44
阅读次数:
167
没想到平成年代最后一场cf居然是手速场,幸好拿了个小号娱乐不然掉分预定 (逃 A: 傻题。 1 /* basic header */ 2 #include <iostream> 3 #include <cstdio> 4 #include <cstdlib> 5 #include <string> ...
分类:
其他好文 时间:
2019-04-30 12:35:19
阅读次数:
113
" CF 441E " Description 一共执行$k$次,每次有$p\%$把$x 2$,有$(100 p)\%$把$x + 1$。问二进制下$x$末尾期望$0$的个数。 Solution 设$f[i][j]$为执行第$i$次后$x + j$末尾期望$0$的个数 加一:$f[i + 1][j ...
分类:
其他好文 时间:
2019-04-28 09:57:27
阅读次数:
160
不得不说这场div3是真的出的好,算得上是从我开始打开始最有趣的一场div3。因为自己的号全都蓝了,然后就把不经常打比赛的dreagonm的号借来打这场,然后...比赛结束rank11(帮dreagonm上蓝果然没有食言qwq)。 (~~震惊...HA省A队CF青名...~~) CF1157A Re ...
分类:
其他好文 时间:
2019-04-27 09:34:25
阅读次数:
142
"dp 最大区间和变形 cf 1155D" D. Beautiful Array time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ...
分类:
其他好文 时间:
2019-04-26 21:01:00
阅读次数:
152
距离上次打cf已经不知道过了多久,看到最近的contest都很水,于是想上上分,然后就3题滚了……(顺便吐槽cf好卡 题目链接:http://codeforces.com/contest/1152 A: 一眼题,奇+偶才能等于奇 1 #include <bits/stdc++.h> 2 /* def ...
分类:
其他好文 时间:
2019-04-25 16:12:22
阅读次数:
149
以上是单台heartbeat服务器配置,生产中双机热备heartbeat配置文件{ha.cf,authkeys,haresources}内容是一样的,这里心跳线配置步骤省略.... 如遇安装报错,查看 /var/log/ha-log日志排查错误即可,heartbeat相对来说还是简单的。 更多详细知 ...
分类:
其他好文 时间:
2019-04-24 19:30:33
阅读次数:
191
F. Shovels Shop time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output F. Shovels Shop time lim ...
分类:
其他好文 时间:
2019-04-21 17:26:06
阅读次数:
105