CodeForces - 935E Fafa and Ancient Mathematics [DP]

題意:給你一個表達式,?表示操做符,?能夠取+或-,+號只能爲p個,-號只能爲m個,求這個表達式的最大值。ios 題解:dfs找表達式,dp[i][j][2]表示i位置上的用加號或減號爲j個的時候的最值。spa AC代碼:code #include<stdio.h> #include<string.h> #include<iostream> #define inf 10000000 using n
相關文章
相關標籤/搜索