- 博客(11)
- 问答 (8)
- 收藏
- 关注
原创 Eddy's AC难题 HDU - 2200
http://acm.hdu.edu.cn/showproblem.php?pid=2200#include#includeusing namespace std;typedef long long ll;ll cal(ll n,ll m){ ll sum=1; for(ll i=1;i<=m;i++){ sum=sum*(n-i+1)/i;//计算Cnm的套路,一
2017-11-12 23:35:40 193
原创 不容易系列之一 HDU - 1465(错排公式)
Problem Description大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了!做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该知道出现...
2017-11-12 23:20:51 203
原创 Game of Connections HDU - 1134
http://acm.hdu.edu.cn/showproblem.php?pid=1134规律,比较好找,就是算起来,会有超级大的数出现,模拟乘法和加法#include#include#include #include#includeusing namespace std;typedef unsigned long long ll;string f[110
2017-11-12 23:08:02 205
原创 Cinema CodeForces - 670C
有简单的想法,就去实现,不要总是做一些没用的工作来调用很难的东西,本来很简单的问题,结果,超时,报错。。。。各种错误,本来简单的一道题,白白的死了好几次还有就是敲的时候,一定要仔细。#include#include#include#includeusing namespace std;typedef long long ll;const int maxn=2e5+10;ma
2017-11-12 23:02:22 358
原创 Magic Powder - 2 CodeForces - 670D2
http://codeforces.com/problemset/problem/670/D2不知道,自己为什么又没有想到二分,遇到这种情况,自己就总是想着去暴力,然后就是dp,二分一直就没有在自己的脑子里面留下很深的印象。二分,二分,二分!!!#include#includeusing namespace std;typedef long long ll;c
2017-11-12 22:55:59 157
原创 Prime Path
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of
2017-11-04 01:02:32 149
原创 Black And White
http://acm.hdu.edu.cn/showproblem.php?pid=5113一个就是我们要有顺序的来填充,一行一行的填充,还有就是剪枝的这个语句,真的比较难想,可能之后一想很简单,当时想的话,就感觉很难。#include#includeconst int maxn=10;int mp[maxn][maxn];int val[30];int vis[max
2017-11-04 00:58:38 419
原创 War Chess
http://acm.hdu.edu.cn/showproblem.php?pid=3345就是条件有点多,我们应该模仿着做,但是要简化模型,看看能不能用等效的效果来解决这个问题。还有就是一个先后性的问题,我们不能只是想着条件平行,我们要看条件之间的 先后顺序#include#include#includeconst int maxn=110;using namespace
2017-11-04 00:54:06 328
原创 E. Pig and Palindromes
http://codeforces.com/problemset/problem/570/E第一次,真正的用到滚动数组,主要是,当前这一步只是取决于前一步的结果,还是蛮强大的。还有就是减小维度,节省空间#include#includeusing namespace std;typedef long long ll;const int mod=1e9+7;char mp
2017-11-04 00:50:42 199
原创 1625 夹克爷发红包
https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1625和蜥蜴的那道题差不多,暴力当前最大,不一定就是最优的策略,数据量不大的话,我们就可以直接暴力来做。
2017-11-01 00:22:22 196
原创 Primes or Palindromes? CodeForces - 569C
http://codeforces.com/problemset/problem/569/C神奇的暴力,注意大数相乘可能爆ll#include#include#include#include#includetypedef long long ll;using namespace std;const int maxn=9900000;int prime[maxn+10],p
2017-11-01 00:08:16 211
空空如也
希望大神解答一下,这道题用bfs+优先队列为什么不对,只能用最短路径来写
2017-08-02
c语言中指针,希望大神解答
2017-04-08
C++ 中的析构函数,望大神解答
2017-03-28
找出语句中中最长的单词
2017-03-07
希望大神指点,十分感谢
2017-03-07
c语言编程中的问题,希望大神指点
2017-03-06
c语言计算三角形面积,存在不懂知识
2016-10-19
关于c语言学习中存在的问题
2016-10-19
TA创建的收藏夹 TA关注的收藏夹
TA关注的人