摘要:
JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. Half of these cities are rich in r 阅读全文
摘要:
摘自《挑战程序设计竞赛》如有错误,请指正! (1) 定义:dp[ i ]表示以Ai为末尾的最长上升子序列。 以Ai结尾的上升子序列是:①只包含Ai的子序列②再满足 j < i 并且Aj < Ai 的以Aj为结尾的子序列,追加上Ai后得到的子序列。 于是,dp[ i ]=max(1,dp[ j ]+1 阅读全文
摘要:
Jessica's a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on it. If she 阅读全文