1.SURF: Speeded Up Robust Features" is a performant scale- and rotation-invariant interest point detector and descriptor.函數surf的作用:畫三維曲面(色)圖,起作用與mesh相似surf(X,Y,Z) X、Y、Z中Z通常是X,Y的函數,即Z(X,Y)。X、Y通常是通過調用meshgrid函數產生的資料格(具體參見meshgrid)。 surf(Z)
Problem Description給你N個整數,x1,x2...xn,任取兩個整數組合得到|xi-xj|,(0<i,j<=N,i!=j)。現在請你計算第K大的組合數是哪個(一個組合數為第K大是指有K-1個不同的組合數小於它)。 Input輸入資料首先包含一個正整數C,表示包含C組測試案例.每組測試資料的第一行包含兩個整數N,K。(1<N<=1000,0<K<=2000)接下去一行包含N個整數,代表x1,x2..xn。(0<=xi<=2000)
Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, ..., an, if we move the first m >= 0 numbers to the
題目連結:http://acm.hdu.edu.cn/showproblem.php?pid=4704題目大意:給一個n,求出由1~n個正整數組成n的不同種數。解題思路:隔板法。由一個數組成的話為C(n-1,0),兩個的話為C(n-1,1),三個的C(n-1,2)....所以結果為2^(n-1).由於n很大有10^100000,顯然不能直接快速冪,這裡有兩種處理方式。1 因為2和M互質,所以由費馬小定理得2^(M-1)=1 mod (M).所以2^n=2^((M-1)*k+p)=2^p mod
E. Graph Reconstructiontime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputI have an undirected graph consisting of n nodes, numbered 1 through n. Each node has at most two incident edges. For each
RelocationTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1479 Accepted: 597DescriptionEmma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate.