11 2013 档案

CF214DIV 2
摘要:不得不吐槽一下!会的第一,第二题得过了PROTEST!结果各种BUG!第一题:我的英语太渣了!!!很水的一道题!第二道:更水!结果悲剧!#includeint a[200000];int main(){ int n,k; scanf("%d%d",&n,&k); for (int i=1;i<=n;i++) scanf("%d",&a[i]); int max1=109999999,p;//int max的初始值弄错了,结果挂在最后一组!无语!! for (int i=1;i<=k;i++) { int sum=a[i 阅读全文

posted @ 2013-11-27 00:54 forgot93 阅读(129) 评论(0) 推荐(0)

HDOJ3398
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3398很好的题目,考查数学思想!基本上是快速幕+ N!的快速质因数分解,看了他人的解题报告:我写的代码: 1 #include 2 #include 3 #include 4 const int max1=2000001; 5 int pri[max1]; 6 int b[max1]; 7 int ci[max1]; 8 int t=0; 9 void prime()10 {11 for (int i=4;i=pri[i];i++)59 while (kk%pri[... 阅读全文

posted @ 2013-11-24 09:32 forgot93 阅读(135) 评论(0) 推荐(0)

HDU-2136(素数问题)
摘要:Largest prime factorTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4916Accepted Submission(s): 1728Problem DescriptionEverybody knows any number can be combined by the prime number.Now, your task is telling me what position of the largest prime fa 阅读全文

posted @ 2013-11-23 22:12 forgot93 阅读(121) 评论(0) 推荐(0)

HDOJ1391
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1391其实就是找规律的题目,但是我一眼没看到规律!于是按照自己的方法写!代码: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 struct node{ 7 int x1,y1; 8 int num; 9 }a[20000];10 int cmp(node x,node y)11 {12 if (x.x1==y.x1) return x.y1<y.y1;13 return x.x1<y.x1;1... 阅读全文

posted @ 2013-11-19 08:11 forgot93 阅读(105) 评论(0) 推荐(0)

CF212DIV2
摘要:A题: 题目呢连接:http://codeforces.com/contest/362/problem/A。刚开始想用DFS搜索,但是忘记了:可以move through"#"这个条件!就是说可以走到"#"(很关键),但不能在这里相聚!直接委掉了!先贴下DFS的代码写的很垃圾! 1 #include 2 #include 3 #include 4 5 int x[4]={-2,2,-2,2}; 6 int y[4]={-2,-2,2,2}; 7 8 int t; 9 char s[10][10];10 int v[10][10],b[10][10];11 阅读全文

posted @ 2013-11-16 00:56 forgot93 阅读(260) 评论(0) 推荐(0)

导航