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
相关文章
相关标签/搜索