会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
null1019
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
···
52
下一页
2015年1月15日
hdu 5122 K.Bro Sorting
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5122题意:就是经过几个回合可以使得序列变成有序的,求回合数。思路:数状数组。倒着插入,每次求和,判断在这个数前面是不是有数,只要有数就ans++;最后插入完,ans就是答案。 1 #include 2 #inc...
阅读全文
posted @ 2015-01-15 14:20 null1019
阅读(161)
评论(0)
推荐(0)
2015年1月14日
hdu 5108 Alexandra and Prime Numbers
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5108找出最大质因子就可以。 1 #include 2 #include 3 #include 4 #define ll long long 5 #define N 100000 6 using namesp...
阅读全文
posted @ 2015-01-14 20:22 null1019
阅读(170)
评论(0)
推荐(0)
hdu 5139 Formula
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5139思路:这道题要先找规律,f(n)=n!*(n-1)!*(n-2)!.....1!; 不能直接打表,而是离线处理,一次性处理出来。 1 #include 2 #include 3 #include 4 #...
阅读全文
posted @ 2015-01-14 19:02 null1019
阅读(143)
评论(0)
推荐(0)
2015年1月3日
hdu 5154 Harry and Magical Computer
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5154思路:有向图判断有没有环,可以用floyd。。 1 #include 2 #include 3 #include 4 using namespace std; 5 const int inf=1<<20...
阅读全文
posted @ 2015-01-03 21:43 null1019
阅读(201)
评论(0)
推荐(0)
2015年1月2日
hdu 5144 NPY and shot
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5144题意:给你初始的高度和速度,然后让你求出水平的最远距离。思路:三分枚举角度,然后根据公式求出水平距离。 1 #include 2 #include 3 #include 4 #include 5 us...
阅读全文
posted @ 2015-01-02 21:16 null1019
阅读(420)
评论(0)
推荐(0)
hdu 5147 Sequence II
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5147题意:问有多少个这样的四元组(a,b,c,d),满足条件是 1 2 #include 3 #include 4 #define maxn 50001 5 #define ll long long 6 us...
阅读全文
posted @ 2015-01-02 19:29 null1019
阅读(165)
评论(0)
推荐(0)
2015年1月1日
hdu 5146 Sequence
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5146题意:判断这个序列是不是好的,好的要求是在奇数坐标上的数的和等于在偶数坐标上的数的和且这个序列不是回文序列。 1 #include 2 #include 3 #include 4 #define max...
阅读全文
posted @ 2015-01-01 17:53 null1019
阅读(177)
评论(0)
推荐(0)
hdu 5151 Sit sit sit
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5151题意:一共有N个椅子,然后有N个学生依次去坐,满足下面三个条件不能坐上去,1:这个椅子旁边有左椅子也有右椅子,2:椅子旁边都有人坐了,3:椅子旁边的椅子颜色不一样。问如果所有人都坐上去有多少情况。dp[i][...
阅读全文
posted @ 2015-01-01 17:42 null1019
阅读(186)
评论(0)
推荐(0)
hdu 5150 Sit sit sit
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5151直接判断是不是素数,然后再注意1就行。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int n; 7 int a[1001]...
阅读全文
posted @ 2015-01-01 16:43 null1019
阅读(167)
评论(0)
推荐(0)
2014年12月31日
cf C. Arithmetic Progression
摘要: http://codeforces.com/contest/382/problem/C题意:给你n个数,然后让你添加一个数使得n+1个数能形成这样的规律,a[1]-a[0]=a[2]-a[1]=a[3]-a[2].....,问这样的数有多少个?输出出来。 1 #include 2 #inclu...
阅读全文
posted @ 2014-12-31 20:27 null1019
阅读(208)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
12
13
···
52
下一页
公告