码迷,mamicode.com
首页 >  
搜索关键字:pair    ( 2800个结果
prim队列优化
#include //大概要这些头文件 #include #include #include #include using namespace std; typedef pair pii; int head[30],next[200],point[200],val[200],size,dist[30... ...
分类:其他好文   时间:2018-07-22 23:33:05    阅读次数:256
Expect the Expected UVA - 11427(概率dp)
题意: 每天晚上你都玩纸牌,如果第一次就赢了,就高高兴兴的去睡觉,如果输了就继续玩。假如每盘游戏你获胜的概率都为p,每盘游戏输赢独立。如果当晚你获胜的局数的比例严格大于p时才停止,而且每天晚上最多只能玩n局,如果获胜比例一直不超过p的话,以后就再也不玩纸牌了。问在平均情况下,你会玩多少个晚上纸牌。 ...
分类:其他好文   时间:2018-07-22 20:55:07    阅读次数:137
False Ordering LightOJ - 1109(暴力。。唉,。又是一个水题。。)
We define b is a Divisor of a number a if a is divisible by b. So, the divisors of 12 are 1, 2, 3, 4, 6, 12. So, 12 has 6 divisors. Now you have to or ...
分类:其他好文   时间:2018-07-22 14:07:04    阅读次数:158
Codeforce 886 Технокубок 2018 - Отборочный Раунд 3 C. Petya and Catacombs(结论题)
A very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through th ...
分类:其他好文   时间:2018-07-22 00:33:12    阅读次数:164
c++ maps使用
#include #include #include #include #include using namespace std; int main() { //freopen("d://1.text", "r", stdin); map *maps = new map(); maps->inser... ...
分类:编程语言   时间:2018-07-22 00:28:31    阅读次数:224
SPOJ - DQUERY
D-query Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), ...
分类:其他好文   时间:2018-07-21 14:54:14    阅读次数:159
EOJ 1224 bfs
#include using namespace std; typedef pair pii; const int maxN=220; const int inf=1e9; char G[maxN][maxN]; int M,N; int cnt[maxN][maxN]; const int tx[... ...
分类:其他好文   时间:2018-07-20 23:39:09    阅读次数:207
poj1743 后缀数组, poj挂了 存个代码
#include #define LL long long #define fi first #define se second #define mk make_pair #define pii pair #define y1 skldjfskldjg #define y2 skldfjsklejg... ...
分类:编程语言   时间:2018-07-20 21:42:48    阅读次数:179
Reachability from the Capital
题目描述 题目描述 题目描述 There are nn cities and mm roads in Berland. Each road connects a pair of cities. The roads in Berland are one-way. What is the minimum ...
分类:Windows程序   时间:2018-07-20 15:19:18    阅读次数:250
反Nim博弈
原文地址:https://blog.csdn.net/xuejye/article/details/78975900 在尼姆博奕中取完最后一颗糖的人为赢家,而取到最后一颗糖为输家的就是反尼姆博奕。这道题就反尼姆 博奕的模型。在尼姆博奕中判断必胜局面的条件是所有堆石子数目相异或不等于0 。 而在反尼姆 ...
分类:其他好文   时间:2018-07-20 11:28:04    阅读次数:109
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!