自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 问答 (1)
  • 收藏
  • 关注

原创 2048

今天用c++自己写了个2048,纯练手。记录一下~ //C.h 几乎各程序都需要用到的文件包含宏命令和使用名空间 #ifndef _C_H_ #define _C_H_ #include #include #include #include #include #include #include #include #include #include #include #inc

2016-02-13 20:20:58 482

原创 poj1247对半分

#include using namespace std; typedef struct method { int S,E; }; int main() { int guest[30],num,sum,half,count=0; method meth[100]; cin>>num; while(num) { half=sum=0; for(int i=0;i<num;i++)

2016-02-11 23:45:52 318

原创 poj1007DNA Sorting

#include #include #include using namespace std; struct DNA { string str; int revpair; }; bool cmp(const struct DNA &dna1,const struct DNA &dna2) { return (dna1.revpair<=dna2.revpair); } int main()

2016-02-09 15:28:42 313

原创 排序问题思考与总结

基于比较的排序问题的计算时间下界为Ω(nlogn)。 合并排序算法(mergeSort)(是渐近最优算法),时间复杂度为O(nlogn)。思路为将数组段二分,直到得到大小为1的n个数组段,将排好序的两个数组合并,依次合并得到排好序的最终数组。其中有递归调用。 自然合并排序(mergeSort的变形)消除了算法中的递归。此算法记录下已经排好序的子串。直接把排好序的数组段放在原数组中。因此,此种算

2016-02-09 14:26:40 511

原创 格雷码

#include//格雷码 #include #include using namespace std; #pragma warning(disable:4996) void buildgray(char **gray,int n) { for(int k=0;k<=n-1;k++) { for(int i=1;i<=pow(2,k);i++) strcpy(gray[(int)po

2016-02-09 14:23:16 526

原创 poj1006中国剩余定理

#include using namespace std; int main() {  int p,e,i,d,re[1000],count=-1,t;  while(cin>>p>>e>>i>>d)  {   if((p==-1)&&(e==-1)&&(i==-1)&&(d==-1)) break;   re[++count]=(5544*p+14421*e+1288*i-d)%

2016-02-09 14:20:12 438

空空如也

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

TA关注的人

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