自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 LeetCode_1.两数之和

LeetCode两数之和c++实现完整代码。

2024-03-28 15:51:47 437

原创 博文尚美首页前端练习

博文尚美首页,对H5,css进行全面练习!

2023-02-23 14:51:39 313

原创 map 一面墙砖

# include<stdio.h># include<iostream># include<algorithm># include<string.h># include<map># include<set>using namespace std;int sum;map<int,int>m...

2019-03-21 10:56:21 251

原创 快速排序

#include &lt;stdio.h&gt;int a[101],n;//定义全局变量,这两个变量需要在子函数中使用void quicksort(int left, int right) { int i, j, t, temp; if(left &gt; right) return; temp = a[left]; //temp中存的就是基准数 i = left;...

2019-03-07 09:29:57 140

原创 时钟表2(繁琐)

&lt;!DOCTYPE html&gt;&lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;时钟&lt;/title&gt; &lt;/head&gt; &lt;style&gt; div{ width: 500px; height: 50

2019-01-02 12:05:40 174

原创 时钟表

&lt;!DOCTYPE html&gt;&lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;时钟&lt;/title&gt; &lt;/head&gt; &lt;style&gt; div{ width: 500px; height: 50

2019-01-02 12:03:57 436

原创 不重复数字

# include&lt;stdio.h&gt;# include&lt;algorithm&gt;# include&lt;iostream&gt;# include&lt;set&gt;using namespace std;int main(){ int t,n,r; set&lt;int&gt;s; scanf("%d",&amp;t); while(t--){..

2018-12-27 15:09:02 248

原创 {A} + {B}

# include&lt;stdio.h&gt;# include&lt;algorithm&gt;# include&lt;set&gt;using namespace std;int main(){ int n,m,num; set&lt;int&gt;s; while(scanf("%d %d",&amp;n,&amp;m)!=EOF){ s.clear(); ...

2018-12-27 14:54:17 168

原创 Let the Balloon Rise

# include&lt;stdio.h&gt;# include&lt;map&gt;# include&lt;string&gt;# include&lt;iostream&gt;using namespace std;int main(){ map&lt;string,int&gt;bn; int n; string str; while(scanf("%d",&..

2018-12-12 13:54:00 244

原创 打印沙漏

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;using namespace std;int a[120];int main(){ int T; scanf("%d",&amp;T); while(T--){ int t=1; for(int i=1;i&lt;=100...

2018-10-28 17:13:27 181

原创 [蓝桥杯][2013年第四届真题]买不到的数目

方法: a*b-(a+b)# include&lt;stdio.h&gt;int main(){ int a,b; scanf("%d %d",&amp;a,&amp;b); printf("%d\n",a*b-a-b); return 0;} 

2018-10-27 16:12:45 480

原创 数据结构实验---栈和队列

#include&lt;stdio.h&gt;#include&lt;stdlib.h&gt;#define N 105int a[N];struct node{ int data; node *next;}*h;void LinkStack()//用链表实现栈{ node *s; int n; printf("请输入需要入栈元素的数量: "); scan...

2018-10-27 10:55:41 459

原创 数据结构实验---二叉排序树的创建

  #include&lt;stdio.h&gt;#include&lt;string.h&gt;#include&lt;algorithm&gt;using namespace std;typedef struct node{ int key; struct node *l,*r;}bstnode;int bstinsert(bstnode *&amp;p,int...

2018-10-27 08:54:03 817

原创 选项卡

&lt;!DOCTYPE html&gt;&lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;选项卡&lt;/title&gt; &lt;style type="text/css"&gt; #div1 .active{background: aqu

2018-10-18 14:16:02 133

原创 链表的建立、查找、插入、删除

#include&lt;iostream&gt;#include&lt;algorithm&gt;#include&lt;stdio.h&gt;#include&lt;malloc.h&gt;#include&lt;stack&gt;using namespace std;typedef struct LNode{ int data; struct LNode *next;}...

2018-10-17 11:41:45 390

原创 HDU--1686 Oulipo

# include&lt;bits/stdc++.h&gt;using namespace std;const int maxn=1e6+30;char s[maxn];char t[maxn];int nxt[maxn];int ls,lt;int sum;void getnxt(){ int i=1,j=0; nxt[0]=0; while(i&lt;lt){...

2018-10-16 14:12:42 135

原创 HDU--2087 剪花布条

 # include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;using namespace std;# define maxn 1200char s[maxn];char z[maxn];int a[maxn];int ls,lz,sum;void abc(){ int i...

2018-10-16 14:09:26 147

原创 数据结构实验之链表三:链表的结点插入

#include&lt;stdio.h&gt;#include&lt;stdlib.h&gt;struct node{ int data; struct node *next;}*head;int len;void insert(int mi, int xi){ int i; struct node *p, *q; p = head; ...

2018-09-28 17:06:54 358

原创 数据结构实验之链表二:逆序建立链表

 #include&lt;stdio.h&gt;#include&lt;stdlib.h&gt;struct node{ int data; struct node *next;}*head;struct node *creat(int n){ struct node *p; int i; head = (struct node*)mall...

2018-09-28 17:06:33 346

原创 数据结构实验之链表一:顺序建立链表

  # include&lt;stdio.h&gt;# include&lt;stdlib.h&gt;struct node{ int data; struct node *next;}*head; struct node *creat(int n){ struct node *tail,*p; int i; head = (struct node*)malloc(si...

2018-09-27 10:56:53 349

原创 HDU-1285 确定比赛名次

 # include&lt;stdio.h&gt;# include&lt;algorithm&gt;# include&lt;string.h&gt;using namespace std;# define maxn 600int a[maxn][maxn];int vis[maxn];int n,m;void toposort(){ for(int i=1;i&lt...

2018-09-27 10:27:35 224

原创 CodeForces-701C They Are Everywhere

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;# include&lt;math.h&gt;using namespace std;char s[100005];int c[60];int vis[60];int id(char ch){ if(ch&gt;='a'&am...

2018-09-27 10:22:20 163

原创 Poj-1321 棋盘问题

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;# include&lt;iostream&gt;# include&lt;queue&gt;# define maxn 30using namespace std;char s[maxn][maxn];int vis[maxn...

2018-09-27 10:06:26 131

原创 HDU-1233 还是畅通工程

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;using namespace std;int fa[5006];int find(int x){ int r=x; while(r!=fa[r]){ r=fa[r]; } return r;}int join(...

2018-09-27 10:03:45 131

原创 HDU-1232 畅通工程

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;using namespace std;int fa[1006];int find(int x){ int r=x; while(r!=fa[r]){ r=fa[r]; } return r;}void join(in...

2018-09-27 10:02:07 121

原创 HDU-1022 Train Problem I

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;# include&lt;stack&gt;# include&lt;iostream&gt;using namespace std;char a[10];char b[10];int flag[20];int main(){...

2018-09-27 09:56:39 153

原创 Poj-2312 Battle City

#include&lt;stdio.h&gt;#include&lt;string.h&gt;#include&lt;queue&gt;using namespace std;#define MAX 1100char map[MAX][MAX];int vis[MAX][MAX];int x1,x2,y1,y2;int n,m;struct node{ int a; ...

2018-09-27 09:53:32 208

原创 HDU-1242 Rescue

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;queue&gt;# include&lt;algorithm&gt;# include&lt;iostream&gt;using namespace std;# define maxn 200+10int vis[maxn][maxn];char s[...

2018-09-27 09:50:29 150

转载 字符串插入块链实现——数据结构上机实验

1、相关类型说明#define chunksize 8#include "stdlib.h"#include "stdio.h"#include "string.h"typedef struct chunk{  char ch[chunksize];  structchunk *next;}chunk;//块链结点类型typedef struct{  chu...

2018-09-27 09:17:05 1116

原创 全排列 STL

#include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;algorithm&gt;using namespace std;char s[10];int main(){ scanf("%s",s); int len=strlen(s); ...

2018-02-24 22:44:48 240

原创 给定A和B,A和B互质,求最大不能组合数,和不能组合数的个数。

#include&lt;stdio.h&gt;int main(){ int i,j,n,m; while(scanf("%d%d",&amp;n,&amp;m)!=-1) { i=n*m-n-m; j=(m-1)*(n-1)/2; printf("%d %d\n",i,j); } return 0;} 

2018-02-12 16:06:03 1085

原创 What Is Your Grade?

# include&lt;stdio.h&gt;# include&lt;string.h&gt;# include&lt;algorithm&gt;using namespace std;struct node{ int key; int a,b,c,id;}w[120];bool cmp(node x,node y){ if(x.key!=y.key) return x...

2018-02-05 18:14:21 356

原创 快速幂 a的b次方对c取模

 #include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;cstring&gt;#include &lt;cmath&gt;using namespace std;#define N 500long long Pow(long long a, long long b, long long c){ lon...

2018-02-02 17:39:16 1269

原创 周期串

# include&lt;stdio.h&gt;# include&lt;string.h&gt;int main(){ int ok; char word[100]; scanf("%s",word); int len=strlen (word); for(int i=1;i&lt;=len ;i++){ if(len%i==0){ ok=1; for(i...

2018-01-27 21:17:12 247

原创 键盘字符串

# include&lt;stdio.h&gt;# include&lt;string.h&gt;char *s = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";int main(){ int i,c; while((c=getchar())!=EOF){ for(i=1;s[i]&amp;&amp;s[i]!=c;i+...

2018-01-27 17:33:40 344

原创 分拆素数和 加固版

# include&lt;stdio.h&gt;# include&lt;math.h&gt;# include&lt;assert.h&gt;# include&lt;iostream&gt;# include&lt;algorithm&gt;using namespace std;int is_prime(int n){ int i,m; assert(n&gt;=0);...

2018-01-27 16:56:23 193

原创 组合数 C几几

# include&lt;stdio.h&gt;# include&lt;math.h&gt;int f(int n){ int i,m=1; for(i=1;i&lt;=n;i++){ m=m*i;} return m;}int main(){ int n,m; scanf("%d %d",&amp;n,&amp;m); printf("%d\n",f(n)/(f(m...

2018-01-27 16:42:03 451

原创 python 大数加法

       

2018-01-26 14:37:26 6490

原创 节目排序

# include&lt;stdio.h&gt;# include&lt;algorithm&gt;using namespace std;struct s{ int t1; int t2;}a[105]; int cmp(s u,s v){ if(u.t2==v.t2){ return u.t1&gt;v.t1; } return u.t2&lt;v.t2;...

2018-01-26 11:25:04 419

原创 素数函数 分拆素数和

# include&lt;stdio.h&gt;# include&lt;math.h&gt;# include&lt;iostream&gt;int is_prime(int n){ int i; for(i=2;i&lt;=sqrt(n);i++){ if(n%i==0){ return 0; } } return 1;}int main(){ int n,...

2018-01-26 11:16:16 310

空空如也

空空如也

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

TA关注的人

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