自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 numpy 数组学习笔记

Numpy 数组的维数称为一个秩(rank).Numpy中每一个线性数组成为一个轴(axis),也就是纬度(dimensions)a=np.array([[1,2,3,4],[4,3,2,1]])print(a)[[1 2 3 4] [4 3 2 1]]例如一个二维数组相当于两个一维数组,第一个轴相当于两个底层数组,第二轴相当于底层数组里的数组Numpy数组的切片(...

2019-05-24 13:43:52 221

原创 numpy pad函数

在卷积神经网络中一个重要的操作就是padding,翻译为填充。就是把一张图片的作为填上一些像素点,以免使得在卷积过程中,图像边缘的点的信息卷积次数过少,而使信息丢失。在numpy函数中已经把padding封装好了。此处重点讨论这函数的具体用法。import numpy as npimport h5pyimport matplotlib.pyplot as plta=np...

2019-05-22 23:41:38 1808

原创 微信小程序开发1——页面跳转与传参

微信小程序开发类似于web开发,是由WXML标签,WXSS属性,JS控制事件来构成的。本文主要记录页面跳转与传值中的代码写法。页面跳转:首先监听button的事件,用js写事件的时候跳转页面具体代码如下;<button bindtap="listenerLogin">登录</button>bindtap个人理解相当于一个onclick()事件点击这个组...

2019-04-11 22:10:46 212

原创 windows10+mx150+ Cuda9.1+cudnn tensorflow-gpu环境配置

笔者使用的是python 3.6.5为了保证安装过程顺利,建议使用相同版本的python。1.先安装CUDA先安装CUDA 查看自己的显卡对应的cuda版本,没有英伟达独立显卡的自行放弃,打开英伟达控制面板,点帮助——>系统信息——>组件 ----->CUAD下载链接——>然后安装,自定义安装,不选vs那个就行了,路径默认。...

2019-03-08 16:43:07 1010

原创 Java数组排序

直接Arrays.sort()方法,默认升序。 Arrays.sort(a);要实现降序排列需要实现Comparator&lt;Integer&gt;接口,重写里面的compare()方法;代码如下public static void main(String[] args) { Scanner sc=new Scanner(System.in); Integer[]a=...

2018-12-17 13:06:50 169

原创 Java中String和StringBuilder和StringBuffer的比较

三者的区别主要在运行速度和线程安全上:运行速度由快至慢:StringBuilder &gt; StringBuffer &gt; String;String 最慢是因为String是字符串常量,而StringBuilder和StringBuffer都是变量:常量是不可修改的,而变量是可以修改的;例如String str="abc";System.out.println(str...

2018-12-13 08:50:48 252

原创 Java蓝桥杯 16进制转8进制

问题描述  给定n个十六进制正整数,输出它们对应的八进制数。输入格式  输入的第一行为一个正整数n (1&lt;=n&lt;=10)。  接下来n行,每行一个由0~9、大写字母A~F组成的字符串,表示要转换的十六进制正整数,每个十六进制数长度不超过100000。输出格式  输出n行,每行为输入对应的八进制正整数。  【注意】  输入的十六进制数不会有前导0,比如012A。  输出的八...

2018-12-13 08:39:20 643

原创 .net JQuery的Ajax方法(wustzz的备考记录)

JQuery中允许使用Ajax()方法加载远程数据。Ajax最大的优点是在不重新加载整个页面的情况下,可以与服务器交换数据并更新部分网页内容。$.ajax({ type: "get", // get 请求方式,post另一种请求方式 url: "/Home/GetInfo", // url data: { "dept": "computer", "name": ".

2018-11-15 20:33:22 183

原创 wustoj2244数学

TeleportationTime Limit: 1 Sec  Description        Hovey just learnt a powerful skill from the failurc of his chasing MMs: teleportation. He can teleport from point (x , y) to another point (x',...

2018-08-29 16:44:48 245

原创 wustoj 1506 药丸 卡特兰数

Description一个药瓶里装有n颗药丸,每天吃半颗,需要在2n天吃完。每天吃药时,从药瓶中取药,如果取到的药是整颗的,就把它分成两半,吃掉其中的一半,另一半重新放入瓶中;如果取到的是半颗药,则直接吃掉。问共有多少种吃药方法?例如:n=1,则吃药方法有1种(取一颗,取半颗)。n=2,则有2种吃药方法(取一颗,取半颗,取一颗,取半颗;取一颗,取一颗,取半颗,取半颗)。Inpu...

2018-08-29 10:42:41 388

原创 Codeforces1027D捉老鼠 图论 dfs

题目链接D. Mouse HuntMedicine faculty of Berland State University has just finished their admission campaign. As usual, about 80%80% of applicants are girls and majority of them are going to live in t...

2018-08-28 20:32:35 324

原创 Codefoeces 1025C 思维+脑洞+坑

                                               C. Plasticine zebraIs there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spending the ent...

2018-08-27 19:58:20 539

原创 Codeforces 242 E XOR on Segment 异或线段树

You've got an array a, consisting of n integers a1, a2, ..., an. You are allowed to perform two operations on this array:Calculate the sum of current array elements on the segment [l, r], that is, c...

2018-08-27 19:27:47 392

原创 Maximal Intersection Codeforces Round #506 Div. 3 贪心+暴力

You are given nn segments on a number line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in each ot...

2018-08-27 10:58:20 260

原创 高精度模板 WUSToj2238

2238: Virus outbreakTime Limit: 1 Sec  Memory Limit: 128 MB   Description        The State Veterinary Services Department recently reported an outbreak of a newly found cow disease. All cows fou...

2018-08-26 18:56:26 173

原创 hdu 5750 数论

                                                   DertouzosA positive proper divisor is a positive divisor of a number nn, excluding nn itself. For example, 1, 2, and 3 are positive proper divisors...

2018-08-19 20:25:28 378 1

原创 二进制法枚举集合——权利指数 HDU1557

                                                      权利指数在选举问题中,总共有n个小团体,每个小团体拥有一定数量的选票数。如果其中m个小团体的票数和超过总票数的一半,则此组合为“获胜联盟”。n个团体可形成若干个获胜联盟。一个小团体要成为一个“关键加入者”的条件是:在其所在的获胜联盟中,如果缺少了这个小团体的加入,则此联盟不能成为获胜联盟...

2018-08-12 23:16:12 418

原创 母函数——秤砣问题——The Balance

Now you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always achievable. So you should find out the qualities which cannot be measured from the ra...

2018-08-12 22:48:59 454

原创 单调栈求矩形块最大面积 poj 2082 两只黄鹂鸣翠柳,一行白鹭上青天

                                              Terrible Sets Let N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elem...

2018-08-10 11:23:37 1174

原创 Bad Hair Day ——牛说我瞅你咋地——单调栈POJ3250

                                                   Bad Hair Day Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, F...

2018-08-08 20:56:08 187

原创 连续子序列的最大和 HDU3415

                                   Max Sum of Max-K-sub-sequenceGiven a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour o...

2018-08-08 19:41:49 362

原创 单调队列 POJ 2823 Sliding Window

 Sliding WindowAn array of size n ≤ 10 6 is given to you. There is a sliding window of size kwhich is moving from the very left of the array to the very right. You can only see the k numbers in th...

2018-08-08 15:24:24 114

原创 拓展欧几里得——egcd poj2142

                                              The Balance Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For example, to measure 200mg of aspirin ...

2018-08-08 10:43:32 694

原创 Lucas定理 + 隔板法 HDU3037

Saving Beans Although winter is far away, squirrels have to work day and night to save beans. They need plenty of food to get through those long cold days. After some time the squirrel family thinks...

2018-08-07 20:51:11 127

原创 求组合数 Lightoj1067

                                                           Combinations Given n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you wa...

2018-08-07 19:33:46 197

原创 反素数——zoj 2562 More Divisors

                                            More DivisorsEverybody knows that we use decimal notation, i.e. the base of our notation is 10. Historians say that it is so because men have ten fingers....

2018-08-07 17:29:20 133

原创 kmp求循环节——HDU3746

                                        Cyclic NacklaceCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 ...

2018-08-07 09:52:44 177

原创 素数的两种筛子比较——埃氏筛,欧拉筛(线性筛)

埃氏筛的思想算法如下:要得到自然数n以内的全部素数,必须把不大于  的所有素数的倍数剔除,剩下的就是素数。给出要筛数值的范围n,找出以内的素数。先用2去筛,即把2留下,把2的倍数剔除掉;再用下一个质数,也就是3筛,把3留下,把3的倍数剔除掉;接下去用下一个质数5筛,把5留下,把5的倍数剔除掉;不断重复下去......。时间复杂度为O(n*lglgn);void Prime(){...

2018-08-06 19:42:53 1500

原创 买水果——hdu 2152

转眼到了收获的季节,由于有TT的专业指导,Lele获得了大丰收。特别是水果,Lele一共种了N种水果,有苹果,梨子,香蕉,西瓜……不但味道好吃,样子更是好看。 于是,很多人们慕名而来,找Lele买水果。 甚至连大名鼎鼎的HDU ACM总教头 lcy 也来了。lcy抛出一打百元大钞,"我要买由M个水果组成的水果拼盘,不过我有个小小的要求,对于每种水果,个数上我有限制,既不能少于某个特定值,也不能...

2018-08-06 10:35:33 195

原创 牛客多校第四场——splay的区间平移操作

链接:https://www.nowcoder.com/acm/contest/141/C来源:牛客网 Eddy likes to play cards game since there are always lots of randomness in the game. For most of the cards game, the very first step in the game...

2018-08-05 19:05:33 631

原创 STL——nth_element()

nth_element(a,a+m,a+n) 是一个不完全排序,效果是把数组的前m个数都比m+1小,而后面的数右都比m+1大。时间复杂度上比sort要快。一个应用  只需得到前m大的数这个题还用到了gcd,貌似STL中也可以用__gcd这个函数。(两横)#include&lt;bits/stdc++.h&gt;using namespace std;const int maxn=1e...

2018-08-05 18:52:58 466

原创 牛客网多校第6场J题 随机化暴力

牛客网多校第6场J题        链接:https://www.nowcoder.com/acm/contest/144/Jskywalkert, the new legend of Beihang University ACM-ICPC Team, retired this year leaving a group of newbies again. Rumor has it tha...

2018-08-05 18:46:38 215

原创 bfs+玄学去重——钥匙开门hdu 1885

                                                    Key TaskThe Czech Technical University is rather old — you already know that it celebrates 300 years of its existence in 2007. Some of the univers...

2018-08-04 08:48:09 217

原创 ac自动机模板题——hdu1277

                                    全文检索 我们大家经常用google检索信息,但是检索信息的程序是很困难编写的;现在请你编写一个简单的全文检索程序。 问题的描述是这样的:给定一个信息流文件,信息完全有数字组成,数字个数不超过60000个,但也不少于60个;再给定一个关键字集合,其中关键字个数不超过10000个,每个关键字的信息数字不超过60个,但也不少...

2018-08-03 15:44:24 552

原创 bfs+优先队列+诡异的梯子 hdu1277

                                             诡异的楼梯Hogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来说很难找到能使得他最快到达目的地的路线,这时...

2018-08-03 10:23:07 183

原创 bfs+优先队列,保存路径——HDU1026

                                 Ignatius and the Princess IThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's...

2018-08-03 08:35:58 342

原创 扫描线,矩形面积求并hdu 1542

                                                       AtlantisThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps ...

2018-08-02 10:23:16 143

原创 线段树区间修改,区间(单点)查询 poj2777 线段树上色

                                               Count ColorChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem...

2018-08-01 15:06:33 389 1

原创 牛客网暑期acm多校训练第4场A题——欧拉降幂+快速幂模板

题目链接A ternary string is a sequence of digits, where each digit is either 0, 1, or 2.Chiaki has a ternary string s which can self-reproduce. Every second, a digit 0 is inserted after every 1 in the ...

2018-08-01 11:23:23 484

原创 线段树维护连续区间最大长度poj 3667 住酒店

                                Hotel The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the c...

2018-07-31 16:10:00 201

空空如也

空空如也

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

TA关注的人

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