- 博客(14)
- 收藏
- 关注
原创 [hdu4436]str2int
str2intTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1208 Accepted Submission(s): 411Problem DescriptionIn this problem, you
2014-06-18 16:52:56
838
原创 [hdu4438]Hunters
HuntersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 989 Accepted Submission(s): 756Problem DescriptionAlice and Bob are the to
2014-06-16 17:03:02
7305
原创 [hdu4432]Sum of divisors
Sum of divisorsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2960 Accepted Submission(s): 1044Problem Descriptionmmm is learnin
2014-06-02 16:29:08
861
原创 C++ STL lower_bound upper_bound的用法以及cmp函数
bool cmp(int a,int b){ return a<b;}int main(){ int a[]={0,1,2,2,3}; printf("%d\n",lower_bound(a,a+5,2,cmp)-a); printf("%d\n",upper_bound(a,a+5,2,cmp)-a); return 0 ;}该程序运行出来的是
2014-05-20 18:27:54
15693
2
原创 hdu3474 Necklace
#include #include #include #define MAXN 1000005#define min(a, b) ((a)<=(b)?(a):(b))using namespace std;int num[MAXN];char ans[MAXN];char s[MAXN];int l[MAXN];int r[MAXN];void initx(int n)
2014-05-05 15:54:27
919
原创 [POJ2186]Popular Cows
大意就是给定一个有向图,求有多少个顶点是由任何顶点出发都可达的。顶点数定理 有向无环图中唯一出度为0的点,一定可以由任何点出发均可达由于无环,所以从任何点出发往前走,必然终止于一个出度为0的点tarjan缩点后找是否有唯一出度为0的点存在#include #include#include#include#includeusing namespace std;ve
2014-04-02 08:22:07
676
原创 [hdu4815]Little Tiger vs. Deep Monkey
概率DP,长春现场赛的题,当时没看,现在补上...f[i][j]代表答对前i道题得j分的概率转移方程f[i][j]+=f[i-1][j]/2;f[i][j+a[i]]+=f[i-1][j]/2; a[i]是第i道题的分数#include #include#includeusing namespace std;int T,a[40010],n;double p,f[50][40
2014-04-01 20:26:08
1060
原创 2013-2014 ACM ICPC Central European Regional Contest (CERC 13) B题What does the fox say?
题目链接http://codeforces.com/gym/100299/attachments/download/2035/20132014-acm-icpc-central-european-regional-contest-cerc-13-en.pdf字符串处理,之前都是用的很麻烦的方式处理这次用的strtok,处理那些用逗号或者空格分开的多个字符串十分方便,要注意用法#incl
2014-04-01 18:50:35
1553
原创 2013-2014 ACM ICPC Central European Regional Contest (CERC 13) I题Crane
这道题其实模拟一下就行了,依次按顺序把1、2、3、4等等换入对应位置有两种情况要考虑,第一种:2 1 3 4可以直接通过交换前两个数字,把1换入第一个位置第二种:2 3 4 11的位置比较靠后,无法一步完成,比如先交换到第一种情况,再利用第一种换入正确的位置step1:4 1 2 3 step2:1 4 2 3需要留意下标的计算!!按照这个思路 每个
2014-04-01 18:40:32
1563
原创 hdu4814 Golden Radio Base
2013年长春现场赛的B题。当时没有仔细看题目提示上的式子,非常遗憾地错过了这道其实比较水的题。题目大意是输入一个十进制数,要求输出用φ进制表示的该数,φ是黄金比例数1.61803399......。样例输入输出里给的是:Sample Input123610Sample Output110.01100.011010.000110100.010
2014-03-27 14:09:05
1100
原创 (⊙v⊙)写了题就发到这里来吧
先贴题目大意,出处什么的,然后是结题思路,最后是CODE。题目类型请写在“文章标签”里面,然后作者分类请写在“个人分类”里面。以上~
2014-03-27 10:40:04
675
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人