自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 set的排序方式

#include #include #include using namespace std;   struct node{ int key; string s; bool operator return key } node(int kk,string ss){ key=kk; s=ss; } };  sets; int

2018-02-04 12:19:37 949

原创 结构体按key的sort方式—vector方式实现

#include #include #include #include using namespace std; struct node{ int key; string s; node(int kk,string ss){ key=kk; s=ss; } }; bool cmp(node n1,node

2018-02-04 12:00:49 312

原创 优先队列优先级

#include #include #include using namespace std; struct node{ int key; string s; bool operator return key>n1.key; } node(int kk,string ss){ key=kk; s=ss; } }; p

2018-02-04 11:48:45 224

原创 迪杰斯特拉优先队列实现(带path路径)

#include #include #include #include #define max 1000 #define inf 50000 using namespace std; int  n,m; struct node{ int v,l; node(int vv,int ll){ v=vv; l=ll; } bool  operato

2018-02-04 11:22:48 577

原创 v

#include using namespace std; int fob1(int n){   if(n==1)  return 2;   if(n==2)  return 3;    else  return fob1(n-1)+fob1(n-2);    } int fob2(int n){   if(n==1)  return 1;   if(n==2)  retur

2017-09-28 17:31:11 268

原创 ccf "I'm stuck!"(AC)

#include #include #include #include #include using namespace std;  struct node{ int x,y; node(int xx=0,int yy=0){ x=xx; y=yy; } }; int r,c,sr,sc,tr,tc;//r行c列 char map[52][5

2017-09-20 17:17:37 283

原创 201609-3 炉石传说 (只有90分)

#include using namespace std; #include #include #include class  summon{ public: int health; int attack; }; summon a[8]; summon b[8]; int t=0; int main(){     a[0].hea

2017-08-23 20:26:39 358

原创 ccf 201609-2 火车购票 (只有90分)

#include using namespace std; class a{ public: int num; int type; }; a b[101]; void solve(int s); int main(){ int n,s; for(int i=1;i b[i].num=i; b[i].type=0; } cin>>n; fo

2017-08-23 20:24:42 759

原创 ccf 201609-1 最大波动

#include using namespace std; #include #include #include int main(){ int n,s,a[100000]; vectorq; cin>>n; for(int i=0;i    cin>>a[i]; } for(int i=1;i q.push_back(abs(a[i]-a[i-1])); }

2017-08-23 20:21:17 328

原创 ccf 201612-4 压缩编码

#inclu#include   #include   #include   #include   #include #include #define maxl 0x7fffffff    using namespace std;  int data[1001];      int dp[1001][1001];   int sum[1001];

2017-08-23 20:05:00 313

原创 ccf 201612-2 工资计算

#include #include #include #include using namespace std; int main(){ int  T,A,S=0,k=1; cin>>T; int i=T; while(i if(i cout break; } else { A=i-3500; if(A S+=A*0.03; }

2017-08-23 20:01:10 339

原创 ccf 201612-1 中间数 (100分)

#include using namespace std; #include #include int main(){    int a;    int e,k,kk=0,kkk=0;    vectorq;         cin>>a;    for(int i=0;i    {cin>>e;      q.push_back(e); }  

2017-08-23 20:00:06 286

原创 ccf 201703 4-地铁修建(100分)

#include using namespace std; #define Max 1000100 #include #include #include using namespace std; int p[Max]; struct node{    int x,y,z;  //  node (int xx,int yy,int zz):x(xx),y(yy),z(zz

2017-08-23 19:57:32 321

原创 ccf 2017032-学生排队(只有90分)

#include using namespace std; int main(){    int n,m,p,q,num[1000],pos;        cin>>n>>m;    for(int i=1;i    num[i]=i;       for(int i=0;i      cin>>p>>q;    for(int j=1;j     if(p==n

2017-08-23 19:53:43 418

原创 用优先队列的huffman编码实现

#include #include  #include #include using namespace std; struct huffman{    int num;    int weight;    string s="";    int parent;    int lchild;    int rchild; huffman(){ } huf

2017-08-23 19:39:39 497 1

原创 迪杰斯特拉基本算法

#include #include #include using namespace std; short int  dist[10005]; bool final[10005]; vectorpath; short int  a[10005][10005]; const int  inf=1050; int mini=inf; int main(){

2017-08-23 19:10:48 331

空空如也

空空如也

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

TA关注的人

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