其它
文章平均质量分 60
天使v之翼
Keep on fighting!
展开
-
青岛网赛1001 HDU5878 I Count Two Three
可以知道在int范围内,满足2^a*3^b*5^c*7*d的数不会太多,直接打表然后二分查找即可。#include#include#include#include#includeusing namespace std;#define LL long longconst int c=1e9;int p=0;LL a[10000],f2[32],f3[32],f5[32],f原创 2016-09-17 19:26:41 · 795 阅读 · 0 评论 -
青岛网赛1002 HDU5879 Cure
首先题目要求保留小数点后5位,那么当n大到一定程度,前5位是不会再改变了。对于会变的情况直接打表预处理,大于则直接输出不变的结果。题目很坑,没说n的范围,需要用字符串读入。#include#include#includeusing namespace std;#define LL long longconst int maxn=1000010;const int c=130原创 2016-09-17 19:32:11 · 629 阅读 · 0 评论 -
青岛网赛1005 HDU5882 Balanced Game
水水水!#include#include#includeusing namespace std;#define LL long longconst int maxn=2016;int main(){ int t,n; scanf("%d",&t); while(t--) { scanf("%d",&n); i原创 2016-09-17 19:35:02 · 452 阅读 · 0 评论 -
HDU 5965 扫雷 CCPC合肥
比赛现场没做出来,调了2小时。赛后一下想明白了,今天交了一发AC。枚举第一列放的个数,后面的便可以有前面的列确定。#include#include#includeusing namespace std;const int maxn=10010;const int mod=1e8+7;char str[maxn];int a[maxn],m[maxn],ans[3];原创 2016-11-05 18:10:30 · 1323 阅读 · 0 评论 -
CSU 1922 Irony Ring 类似单调栈的瞎搞或者线段树
题意:有n个铁环,内外半径和高度已知,问这些铁环最多能叠多高,外径必须非减,上面的铁环的外径必须大于下面铁环的内径,才能保证不掉下去。 用一个栈维护能叠在一起的铁环,如后面一个不能放上去,则一直pop,直到能放上去,在这个过程中维护一个高度的最大值即可。线段树貌似也能实现,把[r,R]看做一个区间,两个区间有交叉则答案+1,再维护一个答案最大值即可。#include#in原创 2017-05-09 17:08:26 · 435 阅读 · 0 评论