好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CodeforcesRound#277(Div.2)题解_html/css_WEB-ITnose

Codeforces Round #277 (Div. 2)

How to caculate Fi? We have: Fi?=?max{F1u?+?F2v} among 1?≤?u?


正反求两遍LIS,比较一下即可.....


如果F1[i]+F2[j]-1==LIS 要用map记录下有没有相同的F1[i],F2[i] 有 输出2 没有 输出3


#include  #include  #include  #include #include  #include  #include  using namespace std;const int maxn=100100;int n,a[maxn],b[maxn];int f1[maxn],f2[maxn];int v1[maxn],n1,v2[maxn],n2;set  st;map ,int> mp;int r[maxn],rn;int ans[maxn];int main(){    scanf("%d",&n);    for(int i=0;i 

查看更多关于CodeforcesRound#277(Div.2)题解_html/css_WEB-ITnose的详细内容...

  阅读:34次