给定01串s0,生成s[1...n], 满足s[i][j] = max(s[i - 1][j], s[i - 1][j + 1]), s[i].size() == s[i - 1].size()-1
题目思路:如果s[0][i]=='1',那么过(0,i)画一条斜率为-1的线,在线下方的字符全为'1',故从右往左遍历,用last变量存当前遍历过的最左的1的位置代码:#includeusingnamespacestd;#defineintlonglongconstintmaxn=3e5+5;inta[maxn];strings;voidsolve(){intn,k;cin>>n>>k;cin>>