昨天做的一道codejam题目, 这个题目的三种解法都非常有代表性, 特此一记.
题目链接在这里:
https://code.google.com/codejam/contest/8234486/dashboard#s=p2
Elliot's parents speak French and English …
昨天做的一道codejam题目, 这个题目的三种解法都非常有代表性, 特此一记.
题目链接在这里:
https://code.google.com/codejam/contest/8234486/dashboard#s=p2
Elliot's parents speak French and English …
之前一直用weka的GUI界面做机器学习的任务, 感觉这个软件虽然界面丑, 不过确实是快速开展机器学期的利器. 关于GUI的weka使用以后有时间再写. 今天这篇记录一下最近使用的java版本的weka …
recall model of computation: DFA
a univeral model of computation: turing machine
→ no more powerful model of computation.
Turing machine can compute any function that can be computed by a physically harnessable process of the natural world.
bottom line: turing machine is a simple and universal …
simplex algo: top 10 algo of the 20th century (ever?).
what is linear programming:
a general problem-solving model that works for:
shortest-path, maxflow, MST, matching, assignment, ...
toy example: choose products to maximize profit.
...
feasible region: a convex polygon.
⇒ optimum solution appears at an extreme point.
standard form …
http://www.imooc.com/learn/317
包: 文件夹 (可以有多级), 且包含__init__.py文件(每层都要有)
模块: py文件
代码分开放在多个py文件(模块名=文件名). 同 …
Goal: classify problems according to computational requirements.
bad new: for huge number of pbs we don't know...
shifing gears:
suppose we could (not) solve pb X efficiently …
http://www.imooc.com/learn/317
函数式编程: 更抽象, 更脱离指令(计算机), 更贴近计算(数学).
总结了一下C++ STL里面用的比较频繁的一些代码片段. (地址: https://github.com/X-Wei/cpp-demo-snippets/tree/master/STL)
cpp文档: http://en.cppreference.com/w/cpp
常用的library主要有:
<algorithm>, <vector>, <queue>, <set>, <map>, <cmath>
另外一个常见的cpp文件开头版本是:
#include <iostream>
#include <vector>
#include <algorithm>
using namespace …pb: reduce the size of a file, to save space/time for storing/transmitting.
applications: generic file compression(gzip), multimedia (mp3), communication(skype).
From binary data B, ⇒ generate a compressed representation C(B).

lossless compression: get exactly B from C(B)
compression ratio: |C(B …