- 博客(28)
- 资源 (6)
- 收藏
- 关注
原创 Numpy 学习笔记
NumpyNumpy 属性这次我们会介绍几种 numpy 的属性: - ndim:维度 - shape:行数和列数 - size:元素个数 使用numpy首先要导入模块`import numpy as np #为了方便使用numpy 采用np简写“ 列表转化为矩阵:array = np.array([[1,2,3],[2,3,4]]) #列表转化为矩阵prin...
2018-03-29 19:11:20
522
原创 LeetCode 46. Permutations
LeetCode 46. PermutationsGiven a collection of distinct numbers,return all possible permutations. For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,
2017-11-21 11:38:07
310
原创 POJ 1068 Parencodings
ParencodingsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 27370Accepted: 16089DescriptionLet S = s1s2...s2n be a well-formed string of parent
2017-11-13 19:07:26
376
原创 POJ 1328 Radar Installation
Radar InstallationTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 91342Accepted: 20438DescriptionAssume thecoasting is an infinite straight lin
2017-09-12 16:28:32
311
原创 LeetCode 40. Combination Sum II
LeetCode 40. Combination Sum IIGiven acollection of candidate numbers (C) and a target number (T),find all unique combinations in C where the candidatenumbers sums to T.Each numberin C may only be
2017-09-12 10:26:02
287
原创 LeetCode 17. Letter Combinations of a Phone Number
17. Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinationsthat the number could represent.A mapping of digit to letters (just like on the telephonebutto
2017-09-11 21:05:04
265
原创 poj 3094 Quicksum
poj 3094 Quicksum 水 QuicksumTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 17095Accepted: 11865DescriptionA checksum is analgorithm that
2017-09-10 16:43:05
372
原创 POJ 2255 Tree Recovery
Tree RecoveryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15363Accepted: 9510DescriptionLittle Valentineliked playing with binary trees very
2017-09-10 16:11:27
301
原创 poj 3006 Dirichlet's Theorem on Arithmetic Progressions
poj 3006 Dirichlet's Theorem onArithmetic ProgressionsDirichlet's Theorem on Arithmetic ProgressionsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19133Ac
2017-09-09 20:19:26
307
原创 POJ – 1503 Integer Inquiry Integer Inquiry
POJ –1503 Integer Inquiry Integer InquiryTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 34728Accepted: 13523DescriptionOne of the firstusers
2017-09-09 20:04:16
347
原创 POJ 2739 Sum of Consecutive Prime Numbers
POJ 2739 Sum of Consecutive Prime NumbersSum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 26176Accepted: 14204De
2017-09-06 17:37:34
380
原创 POJ 2159 Ancient Cipher
POJ 2159 Ancient Cipher Ancient CipherTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 35432Accepted: 11550DescriptionAncient Romanempire
2017-09-06 15:55:47
275
原创 POJ 3299 Humidex
Adapted fromWikipedia, the free encyclopediaThe humidex is ameasurement used by Canadian meteorologists to reflect the combined effect ofheat and humidity. It differs from the heat index used in the
2017-09-05 17:03:30
360
原创 LeetCode 39. Combination Sum
Given a set ofcandidate numbers (C) (without duplicates) and atarget number (T), find all unique combinations in C wherethe candidate numbers sums to T.The same repeatednumber may be chosen from C
2017-09-04 11:39:08
207
原创 遗传算法 与旅行商问题
遗传算法通常实现方式为一种计算机模拟。对于一个最优化问题,一定数量的候选解(称为个体)可抽象表示为染色体,使种群向更好的解进化。传统上,解用二进制表示(即0和1的串),但也可以用其他表示方法。进化从完全随机个体的种群开始,之后一代一代发生。在每一代中评价整个种群的适应度,从当前种群中随机地选择多个个体(基于它们的适应度),通过自然选择和突变产生新的生命种群,该种群在算法的下一次迭代中成为当前种群。
2017-05-23 14:30:27
1526
原创 alpha beta 剪枝算法
alpha-β修剪的好处在于可以消除搜索树的分支。这样,搜索时间可以限制在“更有希望”的子树中,并且可以在同一时间执行更深入的搜索。该算法和极小化极大算法一样,都是分支限界类算法。若节点搜索顺序达到最佳优化或近似最佳优化(将最佳选择排在各节点首位),则同样时间内搜索深度可达极小化极大算法的两倍多。
2017-05-22 21:13:43
3296
原创 LeetCode 45. Jump Game II
45. Jump Game IIGiven an array of non-negative integers, you are initiallypositioned at the first index of the array.Each element in the array represents your maximum jump length atthat position.
2017-03-30 21:26:21
397
原创 LeetCode 42. Trapping Rain Water
Given n non-negativeintegers representing an elevation map where the width of each bar is 1,compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]
2017-03-30 10:03:50
282
原创 LeetCode 41. First Missing Positive
41. First Missing PositiveGiven an unsorted integer array, find the first missing positiveinteger.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n)
2017-03-29 20:56:30
416
原创 freopen---重定向文件流----解决刷oj时手动输入的烦恼
刷oj时每次都手动输入很不方便---好在输入段其实也是一种流我们可以使用文件定向到标准输入与输出流来简便处理输入与输出问题。先接受下函数 FILE * freopen ( const char * filename, const char * mode, FILE * stream ); 【参数说明】filename: 要打开的文件名mode: 文件打开的模式,和fope
2017-03-27 10:41:09
770
原创 LeetCode 6. ZigZag Conversion
leetcode 题目The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H
2016-11-05 21:31:51
336
原创 c#窗体控件datagriview与dataset的运用:修改,新增,删除,查找,保存,更新
最近学习c#中关于数据库的一部分(很浅的一部分,毕竟没有学过数据库)。现在我介绍一下通过dataset完成数据库的一些基本操作(建议先看我上一篇关于数据库常用对象的介绍在看本文)新增: DataRow row = ds.Tables[0].NewRow(); row[0] = n; row[1] = Name.Text.ToString(); row[2] =
2016-05-21 10:20:18
3909
原创 c#中数据库对象的介绍:dataset,dataadapter,connection,command,datareader
c#数据库对象的简介。
2016-05-21 09:44:13
1398
原创 关于c#数据库的简单应用-datagriview连接数据库及更相关操作
先介绍下关于数据库的连接:我们首先通过connection对象对数据连接:string str1 = Application.StartupPath; string str = "provider=Microsoft.Jet.OLEDB.4.0; data Source="+str1+@"\telephone.mdb; Persist Security Info=F
2016-05-06 13:06:17
1981
原创 汇编语言DosBox下在64位上运行实现编译(masm)与调试即debug命令。
首相运行dosbox,可以通过点击exe文件或者使用cmd(Windows +r,可以调出运行框,然后就是输入cmd就可以),下面进入正题:据我所知有两种方法实现masm:找到asm文件右击选择默认打开方式,然后将方式改为dosbox就可以了:接下来就是:masm ****.asm(无错误提示的话,连续按三个回车)link ****.obj*****.exe这样就可以
2016-04-24 11:52:38
49888
原创 c语言实现扫雷(简易版,控制台)
通过graphic库实现图像输出,加载图片。我的思路比较直接,通过大量的数组记录数据,没次鼠标点击在判断数据最后实现。当然还有许多功能未能完善。代码://扫雷初级//9*9,9个雷//2016.3.1////#include#include#include#include#include/****************************使用到的数据类型*
2016-04-12 22:16:15
2297
2
转载 vs2013 窗体应用编程—控件大小随窗体变化(通过代码实现)
在form.cs:添加变量记录窗体大小,每次窗体大小变化时记录放缩比并且更改大小数据(通过窗体的Resize事件触发),对于控件则是同控件标签Tag来记录大小并且控制变化。具体代码如下:namespace Example{ public partial class Form1 : Form { public Form1() {
2016-04-11 23:15:35
3226
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人