自定义博客皮肤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)
  • 资源 (3)
  • 收藏
  • 关注

原创 简单的迷宫问题

链接:https://www.nowcoder.com/acm/contest/93/D 来源:牛客网 题目描述 给你一个n*m的迷宫,这个迷宫中有以下几个标识: s代表起点 t代表终点 x代表障碍物 .代表空地 现在你们涵哥想知道能不能从起点走到终点不碰到障碍物(只能上下左右进行移动,并且不能移动到已经移动过的点)。 输入描述: 输入第一行一个整数T(1<=T<=...

2018-04-05 17:00:05 1151 1

原创 快排+二分

#include&lt;iostream&gt; using namespace std; int s1[1002]; int temp; void quick_sort(int left,int right) { if(left&gt;right) return ; int i=left; int j=right; int temp=s1[left]; while(i!=j) { ...

2018-04-29 21:35:38 299

原创 思维 ZOJ 3872 Beauty of Array

Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to know the summation of the beauty of all contiguous ...

2018-04-29 18:32:21 112

原创 pair

4、编程实践 练习:编写程序读入一系列string和int型数据,将每一组存储在一个pair对象中,然后将这些pair对象存储在vector容器 #include&lt;iostream&gt; #include&lt;string&gt; #include&lt;vector&gt; #include&lt;utility&gt; using namespace std; int main...

2018-04-29 08:01:02 1065

原创 啦啦啦

#include&lt;bits/stdc++.h&gt; using namespace std; typedef long long LL; const int maxn = 100000+100; int T,n,m; LL d[maxn]; struct node{ int u; LL c; bool operator&lt;(const node&am...

2018-04-28 22:36:11 86

原创 快速排序

#include&lt;iostream&gt; #include&lt;cstdio&gt; using namespace std; int s[1005]; void quick_sort(int left,int right) { if(left&gt;right)//一定时left&gt;right,不能写成left==right return ; int i=left; in...

2018-04-23 22:34:26 97

原创 N阶乘的位数(斯特林公式)

#include&lt;cstdio&gt; #include&lt;iostream&gt; #include&lt;cmath&gt; using namespace std; int main() { int a,n; double sum; cin&gt;&gt;n; for(int i=1;i&lt;=n;i++) { s...

2018-04-17 17:29:58 663

原创 N求大数阶乘!

#include&lt;cstdio&gt; #include&lt;iostream&gt; int s1[100005];//不知道为什么数组定义在外面运行就会非常慢,定义在main里面就运行的快多了。 using namespace std; int main() { int a; //scanf("%d",&amp;a); cin&gt;&gt;a; int temp; in...

2018-04-17 17:14:42 143

原创 dijkstra最短路算法模板(双源)

#include&lt;cstdio&gt; #include&lt;iostream&gt; #include&lt;cstring&gt; #include&lt;algorithm&gt; using namespace std; int vis[1005],dis[1005],cost[1005][1005];//vis为标记跳板点,dis为每个点与起点的距离,cost为记录点与点的权值,...

2018-04-16 21:31:32 729

原创 dijkstra最短路经算法简单模板(单源)

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b...

2018-04-13 15:43:30 260

原创 最长公共子序列

最长公共子序列 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。 tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合此条件序列中最长的,...

2018-04-12 11:44:25 91

原创 vector的简单操作

链接:https://www.nowcoder.com/acm/contest/93/L来源:牛客网共有T(T&lt;=10)组数据,每组数据第一行为两个数 N, M (N,M &lt;= 500000),代表有N只天鹅和M次操作,接下来一行是N个数字,下面M行首先会输入一个字符串S,接着会有三类操作,如果S是“insert”,接着输入一个正整数a,代表插入一只“萌”值为a的天鹅,如果S是“del...

2018-04-05 18:38:39 145

原创 阶乘分解因式

#include&lt;iostream&gt; #include&lt;cstdio&gt; #include&lt;algorithm&gt; using namespace std; int main() { int a,b,c,t,n; cin&gt;&gt;n; while(n--) { cin&gt;&gt;a&gt;&gt;b; while(a&gt;0) { ...

2018-04-03 22:23:11 257

原创 神奇的记录方式(map)

#include&lt;iostream&gt; #include&lt;cstdio&gt; #include&lt;cstring&gt; #include&lt;map&gt; using namespace std; int main() { int a,b,c,d,n,m,t,sum=0.0; char ch1,ch2,ch; cin&gt;&gt;n; while(n--) ...

2018-04-03 16:13:20 94

原创 动态规划

步骤描述最优解的结构递归定义最优解的值按自底向上的方式计算最优解的值由计算出的结果构造一个最优解vector&lt;int&gt; vec;在vector的使用方法中,不能直接定义int i =vec.begin();...

2018-04-01 20:24:21 70

原创 杭电(2089)(打表)

#include&lt;iostream&gt;#include&lt;algorithm&gt;#include&lt;cstdio&gt; using namespace std;int s[1000005];int main(){  int a,b;   s[1]=1;    for( int i=2;i&lt;1000005;i++)    {     int j=1,k=i;     w...

2018-04-01 17:06:58 234

python项目集合.zip

python自己做的一些小项目,读取excel,图像处理,以及词频分析,python自己做的一些小项目,读取excel,图像处理,以及词频分析,

2019-12-09

天干地支.txt

日历表输入日期得到天干地支属相星座日历表输入日期得到天干地支属相星座

2019-10-09

空空如也

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

TA关注的人

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