码迷,mamicode.com
首页 >  
搜索关键字:freopen    ( 1399个结果
CF446C DZY Loves Fibonacci Numbers 线段树 + 数学
code: #include <bits/stdc++.h> #define N 400004 #define LL long long #define lson now<<1 #define rson now<<1|1 #define setIO(s) freopen(s".in","r",std ...
分类:其他好文   时间:2019-11-05 15:03:42    阅读次数:64
CF696B Puzzles 概率期望
code: #include <bits/stdc++.h> #define N 100005 #define setIO(s) freopen(s".in","r",stdin) using namespace std; int n,edges; double f[N]; int hd[N],to ...
分类:其他好文   时间:2019-11-04 21:38:02    阅读次数:98
loj #6342. 跳一跳 期望dp
水题,逆推一遍即可~ code: #include <bits/stdc++.h> #define N 12000010 #define LL long long #define setIO(s) freopen(s".in","r",stdin) using namespace std; cons ...
分类:其他好文   时间:2019-11-04 17:33:19    阅读次数:69
【51Nod 1769】Clarke and math2
【51Nod 1769】Clarke and math2 题面 "51Nod" 题解 对于一个数论函数$f$,$\sum_{d|n}f(d)=(f\times 1)(n)$。 其实题目就是要求$g=f\times 1^k$。 考虑$1^k(n)$怎么求,因为$1(n)$是个积性函数,所以$1^k(n ...
分类:其他好文   时间:2019-11-04 15:42:41    阅读次数:91
Codeforces Round #596 Div1 A~E题解
~~我好菜啊~~ A 题意: 定义p 二进制数为2^k p,给出n和p,求用最小个数的p 二进制数来表示n 1=0 显然当k超过30后,如果不满足则之后也不满足 ②p include include include include define fo(a,b,c) for (a=b; a=c; a ...
分类:其他好文   时间:2019-11-01 22:34:40    阅读次数:85
csp-s模拟测试92
csp-s模拟测试92 关于$T1$:最短路这一定建边最短路。 关于$T2$:傻逼$Dp$这一定线段树优化$Dp$. 关于$T3$:最小生成树+树P+换跟一定是这样。 深入(?)思考$T1$:我是傻逼。 深入(?)思考$T2$:我是天才! 深入(?)思考$T3$:我是天才! 01:14:19 02: ...
分类:其他好文   时间:2019-10-29 15:24:47    阅读次数:78
模板 - 左偏树 + 并查集
```cpp include using namespace std; typedef long long ll; int solve(); int main() { ifdef Yinku freopen("Yinku.in","r",stdin); endif // Yinku solve(); ...
分类:其他好文   时间:2019-10-27 16:28:41    阅读次数:105
「CF10D」LCIS
传送门 "Luogu" 解题思路 首先考虑怎么求方案,这样才可能会输出方案。 考虑 $\text{DP}$。 设 $f[i][j]$ 表示在 $a$ 序列中选择一个 $[1...i]$ 的 子序列 与 子序列 $b[1...j]$ 匹配得到的最长LCIS(其中 $b[j]$ 强制被选)。 有一个很显 ...
分类:其他好文   时间:2019-10-27 11:05:20    阅读次数:98
网络流Dinic--模板
1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #include <cstdio>//sprintf islower isupper 3 #include <cstdlib>//malloc exit strcat itoa sys... ...
分类:其他好文   时间:2019-10-26 10:52:25    阅读次数:95
$[SDOI2009]Bill$的挑战
"$[SDOI2009]Bill$的挑战" 观察数据范围,显然是状压。 但是如果你将$K$加进状态中,手推一下就会发现这里要用到容斥。 但我又不是讲容斥的是吧。。。 所以我们尝试不将$K$加入状态中,而是在最后枚举恰好含有$K$个元素的子集个数。 我们设$f[i][j]$表示对于所有集合$i$中的元 ...
分类:其他好文   时间:2019-10-26 10:36:13    阅读次数:82
1399条   上一页 1 ... 12 13 14 15 16 ... 140 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!