原创 九度OJ-1101-計算表達式

題目描述: 對於一個不存在括號的表達式進行計算 輸入: 存在多種數據,每組數據一行,表達式不存在空格 輸出: 輸出結果 樣例輸入: 6/2+3+3*4 樣例輸出: 18 這個題目一行輸入可能有多個表達式 方法1

原创 CodeRorce- Prizes, Prizes, more Prizes

這個題目比較簡單,但是有些細節。 比如:50個輸入,每個都是10^9,但是獎品最高價格爲5. 那麼獎品5的數量將會超過int的表示範圍,所以cnt要用unsigned long long類型。 #include <stdio.

原创 Word2vec Parameter Learning Explained 論文學習筆記

原始論文:http://www-personal.umich.edu/~ronxin/pdf/w2vexp.pdf 之前學習Word2vec時,脫離了神經網絡,這周補充了下相關知識,打算之後再 看下源碼,加深自己的理解。

原创 CodeForce-245B-Internet Address

主要涉及字符串操作 #include <iostream> #include <string> using namespace std; int main(){ freopen("input.txt","r",stdi

原创 Erlang-實現進程環

M是消息傳遞數目,N進程數量,Msg是傳遞的消息 -module(exe3_2). -export([start/3,stop/0]). start(M,N,Msg) ->register(ring,spawn(fun()->r

原创 Erlang-多核併發時的樹形通信

這段代碼不是我寫的,謝謝實驗室的的師妹,接下來要把樹形通信應用到求Pi上去。 -module(my). -export([main/1,temp/2,integer_to_atom/1,judge/3,ceil/1]). mai

原创 Erlang和C實現O(n)複雜度求中位數

方法類似於快速排序,只是它只處理單側的情況。 Erlang:這裏對於奇數和偶數都是求下中位數 find_median([]) ->error; find_median(A) ->find_median(A,(len(A)+1)

原创 word2vec中 distence.c 文件源碼分析

#include <stdio.h> #include <string.h> #include <math.h> //#include <malloc.h> #include <stdlib.h> const long long

原创 word2vec.c源碼分析

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <pthread.h> #define MAX_STRI

原创 Erlang-並行梯度積分法

這個代碼寫了兩天,從沒思路到有思路,還好最終搞定了~不過這個進程數必須爲2^n個。 先貼一個運行截圖: -module(exe4). -export([start/5]). start(F,X1,X2,Num,Cores)

原创 CodeForces-233B-Non-square Equation

Description Let’s consider equation: x2 + s(x)·x - n = 0,  where x, n are positive integers, s(x) is the function

原创 telnet

http://www.cnblogs.com/peida/archive/2013/03/13/2956992.html

原创 九度OJ-1107-搬水果

題目描述: 在一個果園裏,小明已經將所有的水果打了下來,並按水果的不同種類分成了若干堆,小明決定把所有的水果合成一堆。每一次合併,小明可以把兩堆水果合併到一起,消耗的體力等於兩堆水果的重量之和。當然經過 n‐1 次合併之

原创 九度OJ-1108-堆棧的使用

#include <stdio.h> #include <string.h> #include <stdlib.h> int n; char str[10]; int top; int stack[10010]; int ma

原创 Wget命令

Linux系統中的wget是一個下載文件的工具,它用在命令行下。對於Linux用戶是必不可少的工具,我們經常要下載一些軟件或從遠程服務器恢復備份到本地服務器。wget支持HTTP,HTTPS和FTP協議,可以使用HTTP代理。所謂的自