上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页
摘要: B. Jamie and Binary Sequence (changed after round) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output stand 阅读全文
posted @ 2018-03-10 21:49 灬从此以后灬 阅读(252) 评论(0) 推荐(0) 编辑
摘要: D. Timetable time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Timetable time limit per 阅读全文
posted @ 2018-03-10 21:43 灬从此以后灬 阅读(206) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int maxn = 1e4+10; const int maxm = 1e4+10; const int inf = 0x... 阅读全文
posted @ 2018-03-10 16:48 灬从此以后灬 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 组合数常用公式 阅读全文
posted @ 2018-03-09 20:39 灬从此以后灬 阅读(259) 评论(0) 推荐(0) 编辑
摘要: lgN!=lg1+lg2+lg3+lg4+lg5+....................+lgN; 但是当N很大的时候,我们可以通过数学公式进行优化:(即Stirling公式) N!=sqrt(2*pi*N)*(N/e)^N;(pi=3.1415926=acos(-1.0),e=exp(1)) l 阅读全文
posted @ 2018-02-04 18:10 灬从此以后灬 阅读(963) 评论(0) 推荐(2) 编辑
摘要: 题目链接 http://codeforces.com/gym/101572 题意 一共n个文件 存在依赖关系 根据给出的依赖关系 判断是否存在循环依赖 ,不存在的话输出SHIP IT,存在的话,打印最小的环,若有多个,输出其中任何一个。 解析 这道题其实很简单,最小的环无非就是自己到自己的最短路,直 阅读全文
posted @ 2018-01-27 19:15 灬从此以后灬 阅读(592) 评论(0) 推荐(1) 编辑
摘要: 题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=1385 参考 http://blog.csdn.net/shuangde800/article/details/8075165 题目大意: 有N个城市,然后直接给出这些城市之间的邻接矩阵,矩阵中-1代表那 阅读全文
posted @ 2018-01-27 18:46 灬从此以后灬 阅读(1116) 评论(0) 推荐(1) 编辑
摘要: A题 直接把问号全部变为陆地如果所有陆地连通 那么再逐个把刚才变成陆地的问号变为水如果依旧连通有多种解 为什么我的代码跑不过去,和网上的题解思路一模一样!!?? #include<cstdio> #include<algorithm> #include<cstring> #include<iostr 阅读全文
posted @ 2018-01-22 21:39 灬从此以后灬 阅读(277) 评论(0) 推荐(0) 编辑
摘要: A题 先求出来这个数是第几大 阶乘求概率p 然后计算获得胜率的概率 常规解法把所有情况考虑一遍(跳1次,2次,3次……)要用到组合数 数可能太大了会爆的行不通 我们观察发现它有递推性质,从第二大开始获胜概率为Q1=p(直接跳到第一大)从第三大开始获胜概率为Q2=p*Q1(先跳到第二大)+p(直接跳到 阅读全文
posted @ 2018-01-22 21:08 灬从此以后灬 阅读(297) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/gym/100735 D题 直接暴力枚举 感觉这道题数据有点问题 为什么要先排下序才能过?不懂。。 #include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> # 阅读全文
posted @ 2018-01-22 20:35 灬从此以后灬 阅读(216) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页