對于符號三角形問題,符號三角形的第一行有n個符號。符號可以為“+”或“-”,以下每一行的符號由上行得到,2個同號下面都是“+”,2個異號下面都是“-”。如下圖所示(第一行有4個符號的符號三角中的其中的一個): 符號三角形問題要求對于給定的n,計算有多少個不同的符號三角形,使其所含的“+”和“-”的個數相同。 Input 輸入包含若干個測試用例。 對于每個測試用例,輸入的一行是一個整數n(2<=n<=20),表示符號三角形第一行符號的個數。當輸入n為0時表示輸入結束。 Output 對于每個測試案例,輸出包括一行,這一行只包含一個整數,就是該測試案例總共有多少不同的符號三角形,使其所含的“+”和“-”的個數相同。 Sample Input 2 3 0 Sample Output 0 4
上傳時間: 2014-01-02
上傳用戶:陽光少年2016
Problem F:汽車加油 Time Limit:1000MS Memory Limit:65536K Total Submit:1400 Accepted:404 Language: not limited Description 一輛汽車加滿油后可行駛n公里。旅途中有若干個加油站。設計一個有效算法,指出應在哪些加油站停靠加油,使沿途加油次數最少。 編程任務: 對于給定的n和k(k <= 10000)個加油站位置,編程計算最少加油次數。 Input 第一行有2 個正整數n和k,表示汽車加滿油后可行駛n公里,且旅途中有k個加油站。接下來的1 行中,有k+1 個整數,表示第k個加油站與第 k-1 個加油站之間的距離。第0 個加油站表示出發地,汽車已加滿油。第k+1 個加油站表示目的地。 Output 輸出最少加油次數。如果無法到達目的地,則輸出”No Solution”。 Sample Input 7 7 1 2 3 4 5 1 6 6 Sample Output 4
標簽: Limit Accepted Language Problem
上傳時間: 2016-04-12
上傳用戶:youth25
In this letter, the error performance of an ultra-wideband (UWB) system with a hybrid pulse amplitude and position modulation (PAPM) scheme over indoor lognormal fading channels is analyzed. In the PAPM UWB system, input data is modulated onto both the pulse amplitudes and pulse positions.
標簽: ultra-wideband performance amplitud letter
上傳時間: 2014-01-08
上傳用戶:yulg
In this demo, I use the EM algorithm with a Rauch-Tung-Striebel smoother and an M step, which I ve recently derived, to train a two-layer perceptron, so as to classify medical data (kindly provided by Steve Roberts and Will Penny from EE, Imperial College). The data and simulations are described in: Nando de Freitas, Mahesan Niranjan and Andrew Gee Nonlinear State Space Estimation with Neural Networks and the EM algorithm After downloading the file, type "tar -xf EMdemo.tar" to uncompress it. This creates the directory EMdemo containing the required m files. Go to this directory, load matlab5 and type "EMtremor". The figures will then show you the simulation results, including ROC curves, likelihood plots, decision boundaries with error bars, etc. WARNING: Do make sure that you monitor the log-likelihood and check that it is increasing. Due to numerical errors, it might show glitches for some data sets.
標簽: Rauch-Tung-Striebel algorithm smoother which
上傳時間: 2016-04-15
上傳用戶:zhenyushaw
北京大學ACM題 Here is a geometric problem. You have an angle and some squares in the first quadrant of the plane rectangular coordinates. The vertex of the angle is fixed on the origin O of the coordinates, and both of its radial lines are specified by the input. The sizes of the squares are also specified by the input, and the squares can shift vertically and horizontally. Now your job is to use the squares and the radial lines of the angle to enclose the maximum area, which excludes the area of the squares (see Figure 1). You should note that the edges of the squares must be parallel to the axes.
標簽: geometric quadrant problem squares
上傳時間: 2013-12-25
上傳用戶:ynzfm
北京大學ACM比賽題目 In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Every even number greater than 4 can be written as the sum of two odd prime numbers. For example: 8 = 3 + 5. Both 3 and 5 are odd prime numbers. 20 = 3 + 17 = 7 + 13. 42 = 5 + 37 = 11 + 31 = 13 + 29 = 19 + 23. Today it is still unproven whether the conjecture is right. (Oh wait, I have the proof of course, but it is too long to write it on the margin of this page.) Anyway, your task is now to verify Goldbach s conjecture for all even numbers less than a million.
標簽: mathematician Christian Goldbach Leonhard
上傳時間: 2016-04-22
上傳用戶:wangchong
PlotSphereIntensity(azimuth, elevation) PlotSphereIntensity(azimuth, elevation, intensity) h = PlotSphereIntensity(...) Plots the intensity (as color) of a number of points on a unit sphere. Input: azimuth (phi), in degrees elevation (theta), in degrees intensity (optional, if not provided, a green sphere is produced) All inputs must be vectors or matrices of the same size. Data does not have to be evenly spaced. When there aren t enough points to draw a smooth sphere, additional points (with color) are interpolated. Output: h - a handle to the patch object The axes are also plotted: positive x axis is red positive y axis is green positive z axis is blue
標簽: PlotSphereIntensity elevation azimuth intensity
上傳時間: 2014-01-15
上傳用戶:ruan2570406
A technical trading system comprises a set of trading rules that can be used to generate trading signals. In general, a simple trading system has one or two parameters that determine the timing of trading signals. Each rule contained in a trading system is the results of parameterizations. (Source: The Profitability of Technical Analysis: A Review by Cheol-Ho Park and Scott H. Irwin)
標簽: trading technical comprises generate
上傳時間: 2013-12-25
上傳用戶:tianyi223
無線傳感器網絡的主要功能是實現數據發布,在接收到信息查詢時能夠以有效的方式傳輸給查詢者.目前的數據發布方式通常基于洪泛機制查詢信息,浪費了有限的能源.雖然一些最近的數據發布協議從不同程度上解決了這一問題,但不能保證查詢成功率.基于圓形節點分布網絡模型提出了一種既能減少能源消耗,又能提高成功率的數據發布模式——直徑-弦模式DCS(diameter-chord scheme).該模式利用了每個圓的弦都存在一個直徑與之垂直相交的性質.在此基礎上提出了Two-Phase協議.它在信息查詢時分成兩個工作方式不同的階段進行,在第1段查詢不中時觸發第2段查找.為了減少Two-Phase的延遲,提出了基于優先級和概率轉發兩種解決方法.理論分析和實驗結果都表明,所提出的數據發布協議具有較好的性能.
上傳時間: 2016-04-29
上傳用戶:李夢晗
Matrix Transposition and Multiplication It is a MIPS assembly program that does the following: given two matrices, M1 and M2, first transpose M2 to obtain M2tran. Then multiply M1 and M2tran.
標簽: Multiplication Transposition following assembly
上傳時間: 2016-05-03
上傳用戶:kernaling