![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp练习
小白18651
My name is WXX。I live around in ShanDong,and be single。I study in SDXU and study util 12 pm then to sleep every day.I dont't smoke and just drink a bit of wine and sleep enough for 8 hours every day.Before Sleep i will drink some coffee,and clean myself.When i go bed,i will fall asleep at time.
展开
-
P1043 数字游戏
传送门 本题有两个坑点,一个是数字溢出,一个是负数的取模。除此之外这题做法几乎与P1018一毛一样。 #include<iostream> #include<cstring> using namespace std; #define ll long long #define MAX 0x3f3f3f3f ll dp1[101][101]; ll dp2[101][101]; ll vos[101]; int main() { ll m,n; cin>>m原创 2020-10-18 15:32:43 · 73 阅读 · 0 评论 -
P1018乘积最大
传送门 高精度懒得写,用了万能的python。 m,n=map(int,input().split()) s=int('*'+input()) f=[[0 for i in range(m+1)] for j in range(n+1)] for i in range(1,m+1):是左闭右开 f[0][i]=int(str(s)[1:i+1]) for i in range(1,m+1):#枚举后缀 for j in range(0,i):#枚举前缀 for k in r原创 2020-10-17 23:09:27 · 93 阅读 · 0 评论