http://community.topcoder.com/stat?c=problem_statement&pm=12804&rd=15706 首先A和B的长度都不一定一样,里面的元素也不一定有序.比如,A={1,4,6,7,2,8} and B={1,3,5,6,8,2,9,10}.二来,因为A和B都是代表着ratio,那么选定A[i]和B[j],假设他们是同一个,就可以把A和B数组normalize.方法是A*B[j],B*A[i].此时问题就转化成最长公共子序列了.另外要注意,因为…
body { font-family: Monospaced; font-size: 12pt } pre { font-family: Monospaced; font-size: 12pt } Problem Statement You have an array with N elements. Initially, each element is 0. You can perform the following operations: Increment operation:…
周赛时遇到的一道比较有意思的题目: Problem Statement There are N rooms in Maki's new house. The rooms are numbered from 0 to N-1. Some pairs of rooms are connected by bidirectional passages. The passages have the topology of a tree. That is, there are exactly N-…
第一次做TC,不太习惯,各种调试,只做了一题...... Problem Statement Fox Ciel is going to play Gomoku with her friend Fox Jiro. Ciel plays better, so before they start she allowed Jiro to put some of his pieces on the board. You are given a vector <string> board tha…