自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

qqspeed

希望CCNU的ACM越来越好,再见!

  • 博客(19)
  • 问答 (1)
  • 收藏
  • 关注

原创 Codeforces Round #190 (Div. 2) A B C

A:  题意: n个男孩和m个女孩组队跳舞 ,对于(i,j)这一对,i和j至少有一个人是第一次跳,问最多多少组 。           对于任意一个女孩,他们都可以和其中一个男孩组队,然后对于其中的一个女孩,又可以和剩下的男孩组队,  B.题意:有r朵红花,g朵绿花,b朵蓝花,有四组不同的组合方式,问一共最多多少组。          我的想法比较麻烦,分别是三种花都1.先按自己三

2013-06-29 12:18:51 1048

原创 Codeforces Round #178 (Div. 2) A and B

A:   #include#include#include#include#include#include#include#include#include#includeusing namespace std;int n,m;int x[110],y[110],a[110];int main(){ while(cin>>n) { fo

2013-06-25 16:22:20 796

原创 Codeforces Round #187 (Div. 2) A and B

A:    100的范围,直接暴力,注意一个瓶子可以开多个瓶子#include#include#includeusing namespace std;int n;int a[100+10],b[100+10],vis[100+10];int main(){ while(scanf("%d",&n)!=EOF) { memset(vis,0,

2013-06-23 21:36:30 741

原创 Codeforces Round #188 (Div. 2)

A:有一个序列,前面是1~n的奇数 ,后面是1~n的偶数,然后输入一个下标(从1开始),输出这个下标在序列对应的数字.    所以只需要判断这个数是奇数还是偶数,并且是奇数的第几个或者偶数的第几个,然后等差数列求某一项而已.B.求给定的串里有多少个子串是以"heavy"开始,以"metal"结束的.   先暴力求出"heavy"出现的位置,存入num1;再暴力求出"metal"

2013-06-22 15:31:48 969

原创 uva Check The Check (模拟)

简单的模拟题,一开始判断下一点是否可行时,大意的把k和K一起认为可行了,结果一直没找到错误,后来大师出马,帮我发现了问题#include#include#includeusing namespace std;char map[10][10];int dx_p[]={1,1},dy_p[]={-1,1};int dx_P[]={-1,-1},dy_P[

2013-06-19 22:01:41 724

原创 hdu 1007 (分治)

不多说了  分治#include#include#include#includeusing namespace std;#define INF 10000000000.0struct node{ double x,y;}p[100000+1];bool cmp1(node i,node j){ if(i.x==j.x) ret

2013-06-19 15:25:18 770

转载 kmp next函数 kmp的周期问题,深入了解kmp中next的原理(kmp)

转自大牛的博客:http://www.cnblogs.com/wuyiqi/archive/2012/01/06/2314078.html---------------------------------------------- k    m        x      j       i由上,next【i】=j,两段红色的字符串相等(两个

2013-06-18 22:02:13 776

原创 hdu 4484 Hailstone HOTPO (暴力)

Hailstone HOTPOTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 356    Accepted Submission(s): 210Problem DescriptionThe hailston

2013-06-18 21:55:11 1282

原创 hdu 4485 B-Casting (数学)

B-CastingTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 370    Accepted Submission(s): 187Problem DescriptionCasting around for

2013-06-18 21:53:39 1008

原创 最近点对 (分治)

算法设计与分析的实验。分治法。//存每个点的信息import java.util.*;public class Point implements Comparable{ double x,y; Point(double x,double y){ this.x=x; this.y=y; } //排序时,按x升序排序 public int compa

2013-06-18 12:27:55 775

原创 Huffman 编码 (贪心)

以字母出现的频率建一颗二叉树,频率越大的字母的赫夫曼编码越短,这样保证任意一个字母的编码不会是另一个字母编码的前缀,然后遍历吧.(赫夫曼编码不是唯一的)//Word .java,存字母信息public class Word { char c; int w;//出现次数}//HuffmanNode.java,每个赫夫曼节点信息public class

2013-06-17 13:18:19 1045 2

原创 hdu 4460 && hdu 4461 && hdu 4463

hdu 4463Outlets裸的最小生成树  ,只是有一条边是必须出现在树中,直接一开始把他们连在一起就行了。hdu  4461The Power of Xiangqi签到的,每个字母有自己的能量,但如果没有同时拥有B和C且总能量本来就>1,那总能量-1,求红和黑谁的能量多hdu 4460

2013-06-16 22:05:03 1202

原创 hdu 4432 Sum of divisors(暴力)

Sum of divisorsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1362 Accepted Submission(s): 495Problem Descriptionmmm is learning divis

2013-06-16 21:56:33 1075

原创 Hdu 4561 连续最大积

连续最大积Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 599 Accepted Submission(s): 247Problem Description小明和他的好朋友小西在玩一个游戏,由电脑随机生成一个由-2,0,

2013-06-16 12:59:45 2030 3

原创 Zoj 2432 Greatest Common Increasing Subsequence(DP)

Greatest Common Increasing SubsequenceTime Limit: 2 Seconds      Memory Limit: 65536 KB      Special JudgeYou are given two sequences of integer numbers. Write a program to determine their com

2013-06-11 10:59:37 1699

原创 Alignment(dp)

DescriptionIn the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the captain. The captain is not satisfied with

2013-06-07 11:13:03 708

原创 Chocolate (DP)

DescriptionIn 2100, ACM chocolate will be one of the favorite foods in the world."Green, orange, brown, red...", colorful sugar-coated shell maybe is the most attractive feature of ACM chocola

2013-06-05 21:08:37 666

原创 hdu 1005Number Sequence (矩阵快速幂)

F(n)                                 a                     b                                                   F(n-1)                              =

2013-06-01 10:53:15 1443 3

原创 Shopping Offers (dp)

DescriptionIn a shop each kind of product has a price. For example, the price of a flower is 2 ICU (Informatics Currency Units) and the price of a vase is 5 ICU. In order to attract more cus

2013-06-01 09:51:45 711

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除