自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (1)
  • 收藏
  • 关注

原创 Section 1.3 Barn Reapir

贪心算法,思路不难但在提交过程中发现很多bug: 1.得到需要“切板”的位置后,应该按num排序 2.当M == 1时要特别处理,否则number为空向量,程序异常退出 3.输入牛的位置是无序的,要先按num升序排序 4.当M > C的时候,number个数应该为min(M,C)/*

2016-08-31 14:45:19 315

原创 Section 1.3 Mixing Milk

基础greedy algorithm,sort函数调用

2016-08-31 00:17:11 265

翻译 Section 1.3 Greedy Algorithm

The basic idea behind greedy algorithms is to build large solutions up from smaller ones. Unlike other approaches, however, greedy algorithms keep only the best solution they find as they go along.

2016-08-29 23:21:22 521

原创 Section 1.2 Dual Palindromes

数制转换,num2str,string方法

2016-08-29 22:33:24 380

原创 Section 1.2 Palsquare

进制转换,num2str问题/*

2016-08-28 00:25:21 358

原创 Git Learning Notes

学习笔记

2016-08-22 16:46:49 757

原创 Section 1.2 Name That Number

一个匹配搜索的问题,不过是我第一次写从文件中即时读取即时搜索。 开始的思路是通过input把number转为name,再进行搜索,后来发现这样不仅费时而且浪费空间;于是采用了把data.txt中的name转化为number,依次与input匹配的方法。

2016-08-20 00:07:01 291

原创 Machine Learning--logistic regression

本文参考http://blog.csdn.net/xiahouzuoxin/article/details/44959205 在此向原作者致谢当y的取值离散时,linear regression algorithm不再适用,而应该选择logistic regression. 下图是logistic function(or sigmoid function):下面是matlab代码:functio

2016-08-18 21:51:02 401

原创 Section 1.2 Transformations

这道搜索题没什么绕弯的地方,把transformation用矩阵位置变换表示,然后一一验证即可。对于#5 combination我写得比较啰嗦: )/*ID: alexyua2PROG: transformLANG: C++*/#include<fstream>using namespace std;ifstream fin("transform.in");ofstream fout("

2016-08-14 22:43:56 211

原创 Section 1.2 Milking Cows

做的第一个模拟时间轴的问题,关键在于search部分的对于t1,t2的不断变化。 也通过这一题学习了algorithm中的sort函数使用。/*ID: alexyua2PROG: milk2LANG: C++*/#include<fstream>#include<algorithm>#include<vector>using namespace std;ifstream fin("

2016-08-14 21:54:13 249

原创 shell script 学习记录 1

shell script 学习记录1

2016-08-10 22:00:08 227

原创 Machine Learning 房价预测实例

Stanford机器学习课程 学习笔记1

2016-08-10 18:04:14 890

OpenMP实现计算pi值和PSRS排序并行计算实验

并行计算课程实验代码,c语言写的,在MacOS系统下的openmp的pi值计算和PSRS的实现,注释清晰,且PSRS处理了不整除的情况。懒得编译可使用我提供的run.sh脚本。加上待编译的文件作为参数即可。

2019-05-08

空空如也

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

TA关注的人

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